2022-11-22 15:37:45 +00:00
|
|
|
library 'status-jenkins-lib@v1.6.2'
|
2022-08-01 11:19:58 +00:00
|
|
|
|
2022-09-21 10:06:45 +00:00
|
|
|
/* Options section can't access functions in objects. */
|
|
|
|
def isPRBuild = utils.isPRBuild()
|
|
|
|
|
2022-08-01 11:19:58 +00:00
|
|
|
pipeline {
|
2022-08-17 18:17:35 +00:00
|
|
|
agent { label 'linux' }
|
2022-08-01 11:19:58 +00:00
|
|
|
|
|
|
|
parameters {
|
|
|
|
booleanParam(
|
|
|
|
name: 'RELEASE',
|
|
|
|
description: 'Decides whether binaries are built with debug symbols.',
|
|
|
|
defaultValue: params.RELEASE ?: false
|
|
|
|
)
|
|
|
|
choice(
|
|
|
|
name: 'VERBOSE',
|
|
|
|
description: 'Level of verbosity based on nimbus-build-system setup.',
|
|
|
|
choices: ['0', '1', '2']
|
|
|
|
)
|
|
|
|
}
|
2022-08-18 17:51:18 +00:00
|
|
|
|
2022-08-01 11:19:58 +00:00
|
|
|
options {
|
|
|
|
timestamps()
|
|
|
|
/* Prevent Jenkins jobs from running forever */
|
2022-08-12 15:07:40 +00:00
|
|
|
timeout(time: 120, unit: 'MINUTES')
|
2022-08-01 11:19:58 +00:00
|
|
|
/* manage how many builds we keep */
|
|
|
|
buildDiscarder(logRotator(
|
|
|
|
numToKeepStr: '10',
|
|
|
|
daysToKeepStr: '30',
|
|
|
|
artifactNumToKeepStr: '3',
|
|
|
|
))
|
2022-08-17 18:17:35 +00:00
|
|
|
/* Throttle number of concurrent builds. */
|
|
|
|
throttleJobProperty(
|
|
|
|
throttleEnabled: true,
|
|
|
|
throttleOption: 'category',
|
|
|
|
categories: ['status-desktop-e2e-tests'],
|
|
|
|
maxConcurrentPerNode: 1,
|
|
|
|
maxConcurrentTotal: 1
|
|
|
|
)
|
2022-09-21 10:06:45 +00:00
|
|
|
/* Abort old PR builds. */
|
|
|
|
disableConcurrentBuilds(
|
|
|
|
abortPrevious: isPRBuild
|
|
|
|
)
|
2022-08-01 11:19:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
environment {
|
|
|
|
TARGET = 'e2e'
|
|
|
|
/* Improve make performance */
|
|
|
|
MAKEFLAGS = "-j4 V=${params.VERBOSE}"
|
|
|
|
/* Disable colors in Nim compiler logs */
|
|
|
|
NIMFLAGS = '--colors:off'
|
|
|
|
/* Makefile assumes the compiler folder is included */
|
|
|
|
QTDIR = "/opt/qt/5.14.2/gcc_64"
|
|
|
|
/* Control output the filename */
|
|
|
|
STATUS_CLIENT_APPIMAGE = "pkg/${utils.pkgFilename(ext: 'AppImage')}"
|
|
|
|
STATUS_CLIENT_TARBALL = "pkg/${utils.pkgFilename(ext: 'tar.gz')}"
|
|
|
|
/* Include library in order to compile the project */
|
|
|
|
LD_LIBRARY_PATH = "$QTDIR/lib:$WORKSPACE/vendor/status-go/build/bin:$WORKSPACE/vendor/status-keycard-go/build/libkeycard/"
|
2022-08-08 10:07:29 +00:00
|
|
|
INFURA_TOKEN = "cd313fedd0dd4699b194d72b5184be06"
|
2022-11-09 08:27:46 +00:00
|
|
|
GANACHE_NETWORK_RPC_URL = "http://0.0.0.0:${855 + env.EXECUTOR_NUMBER}"
|
2022-08-01 11:19:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
stages {
|
|
|
|
stage('Deps') {
|
|
|
|
steps {
|
|
|
|
/* trigger fetching of git submodules */
|
|
|
|
sh 'make check-pkg-target-linux'
|
|
|
|
/* TODO: Re-add caching of Nim compiler. */
|
|
|
|
sh 'make deps'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('status-go') {
|
|
|
|
steps { sh 'make status-go' }
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('build') {
|
|
|
|
steps { sh 'make' }
|
2022-08-18 17:51:18 +00:00
|
|
|
|
2022-08-01 11:19:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
stage('Tests') {
|
|
|
|
steps {
|
2022-08-18 17:51:18 +00:00
|
|
|
script {
|
2022-09-20 12:22:04 +00:00
|
|
|
def goerli_rpc_port = 855 + env.EXECUTOR_NUMBER
|
2022-08-18 17:51:18 +00:00
|
|
|
def mnemonic = "pelican chief sudden oval media rare swamp elephant lawsuit wheat knife initial"
|
|
|
|
def goerli_db_path = "$WORKSPACE/test/ui-test/fixtures/ganache-dbs/goerli"
|
2022-11-03 09:18:40 +00:00
|
|
|
def tcp_port = 6010 + env.EXECUTOR_NUMBER
|
2022-08-18 17:51:18 +00:00
|
|
|
docker.image('trufflesuite/ganache:v7.4.1').withRun(
|
2022-09-20 12:22:04 +00:00
|
|
|
"-p 127.0.0.1:${goerli_rpc_port}:8545 -v ${goerli_db_path}:/goerli-db",
|
2022-08-18 17:51:18 +00:00
|
|
|
"-e 10 -m='${mnemonic}' --chain.chainId 5 --database.dbPath /goerli-db"
|
|
|
|
) { c ->
|
2022-11-03 09:18:40 +00:00
|
|
|
docker.image('statusteam/nim-waku').withRun(
|
|
|
|
"-p 127.0.0.1:${tcp_port}:60000/tcp",
|
|
|
|
"--use-db=true --persist-messages=true --nat=none --nodekey=1122334455667788990011223344556677889900112233445566778899001122"
|
2022-08-12 15:07:40 +00:00
|
|
|
) { c2 ->
|
2022-11-03 09:18:40 +00:00
|
|
|
env.PEER_ENR = "/ip4/127.0.0.1/tcp/" + tcp_port + "/p2p/16Uiu2HAmMGhfSTUzKbsjMWxc6T1X4wiTWSF1bEWSLjAukCm7KiHV"
|
2022-10-27 08:45:59 +00:00
|
|
|
withEnv(["TEST_PEER_ENR=${env.PEER_ENR}"]){
|
2022-08-12 15:07:40 +00:00
|
|
|
wrap([
|
|
|
|
$class: 'Xvfb',
|
|
|
|
autoDisplayName: true,
|
|
|
|
parallelBuild: true,
|
|
|
|
screen: '2560x1440x24',
|
|
|
|
]) {
|
|
|
|
script {
|
|
|
|
def res = squish([
|
|
|
|
extraOptions: '''
|
|
|
|
--retry
|
|
|
|
2
|
2022-08-12 18:55:06 +00:00
|
|
|
|
2022-10-27 08:45:59 +00:00
|
|
|
--tags
|
|
|
|
~mayfail
|
2022-11-09 08:27:46 +00:00
|
|
|
|
2022-10-27 08:45:59 +00:00
|
|
|
--tags
|
|
|
|
~merge
|
2022-10-13 16:03:10 +00:00
|
|
|
|
2022-10-27 08:45:59 +00:00
|
|
|
--tags
|
|
|
|
~relyon-mailserver
|
|
|
|
|
|
|
|
--config
|
|
|
|
addAUT
|
|
|
|
nim_status_client
|
|
|
|
${WORKSPACE}/bin
|
|
|
|
''',
|
|
|
|
squishPackageName: 'squish-6.7.2-qt514x-linux64',
|
|
|
|
testSuite: '${WORKSPACE}/test/ui-test/testSuites/*',
|
2022-08-12 15:07:40 +00:00
|
|
|
])
|
2022-10-19 11:15:32 +00:00
|
|
|
echo res
|
2022-08-12 15:07:40 +00:00
|
|
|
if ( res == "SUCCESS" || res == "UNSTABLE" ) {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
throw new Exception("squish test didn't end with success")
|
2022-08-18 17:51:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-08-01 11:19:58 +00:00
|
|
|
}
|
2022-10-27 08:45:59 +00:00
|
|
|
sh "docker logs ${c.id}"
|
2022-08-01 11:19:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-08-18 17:51:18 +00:00
|
|
|
|
2022-08-01 11:19:58 +00:00
|
|
|
post {
|
|
|
|
success { script { github.notifyPR(true) } }
|
|
|
|
failure { script { github.notifyPR(false) } }
|
2022-11-22 12:40:45 +00:00
|
|
|
cleanup { sh './scripts/clean-git.sh' }
|
2022-08-01 11:19:58 +00:00
|
|
|
}
|
|
|
|
}
|