Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working on e2e test fix - Closes #3456 #3841

Merged
merged 25 commits into from
Nov 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 23 additions & 65 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,33 @@
properties([disableConcurrentBuilds(), pipelineTriggers([])])
pipeline {
agent { node { label 'lisk-desktop' } }
options {
buildDiscarder(logRotator(numToKeepStr: '168', artifactNumToKeepStr: '5'))
}
parameters {
booleanParam(name: 'SKIP_PERCY', defaultValue: false, description: 'Skip running percy.')
string(name: 'LISK_CORE_VERSION', defaultValue: 'release/3.0.0-beta.1', description: 'Use lisk-core branch.', )
string(name: 'LISK_CORE_IMAGE_VERSION', defaultValue: '3.0.0-beta.1-a7842d112d5136d9462501763c4cb2895096e900', description: 'Use lisk-core docker image.', )
string(name: 'LISK_SERVICE_VERSION', defaultValue: 'v0.2.0', description: 'Use lisk-service branch.', )
}
stages {
stage('Install npm dependencies') {
stage('install') {
steps {
nvm(getNodejsVersion()) {
sh 'npm ci'
}
}
}
stage('Build') {
stage('build') {
steps {
parallel (
"ESLint": {
"lint": {
ansiColor('xterm') {
nvm(getNodejsVersion()) {
sh 'npm run --silent lint'
sh 'npm run lint'
}
}
},
"build": {
"linux": {
withCredentials([string(credentialsId: 'github-lisk-token', variable: 'GH_TOKEN')]) {
nvm(getNodejsVersion()) {
sh '''
cp -R /home/lisk/fonts/basier-circle src/assets/fonts
cp -R /home/lisk/fonts/gilroy src/assets/fonts
npm run --silent build

npm run build
npm run install:electron:dependencies
USE_SYSTEM_XORRISO=true npm run dist:linux
npm run dist:linux
'''
}
}
Expand All @@ -50,7 +40,7 @@ pipeline {
)
}
}
stage('Deploy build') {
stage('deploy') {
agent { node { label 'explorer-www' } }
steps {
unstash 'build'
Expand All @@ -60,65 +50,33 @@ pipeline {
rm -rf $WORKSPACE/app/build
'''
githubNotify context: 'Jenkins test deployment',
description: 'Commit was deployed to test',
description: 'Commit was deployed to test',
status: 'SUCCESS',
targetUrl: "${HUDSON_URL}test/" + "${JOB_NAME}".tokenize('/')[0] + "/${BRANCH_NAME}"

}
}
stage('Run tests') {
environment {
LISK_CORE_IMAGE_VERSION = "${params.LISK_CORE_IMAGE_VERSION}"
}
stage('test') {
steps {
parallel (
"jest": {
ansiColor('xterm') {
nvm(getNodejsVersion()) {
sh 'ON_JENKINS=true npm run --silent test'
script {
// we don't want to fail the build if reporting to coveralls.io fails
try {
withCredentials([string(credentialsId: 'lisk-hub-coveralls-token', variable: 'COVERALLS_REPO_TOKEN')]) {
sh 'cat coverage/jest/lcov.info |coveralls'
}
} catch(err) {
println 'Could not report coverage statistics:\n${err}'
}
"cypress": {
nvm(getNodejsVersion()) {
ansiColor('xterm') {
wrap([$class: 'Xvfb']) {
sh 'CYPRESS_baseUrl=https://jenkins.lisk.com/test/${JOB_NAME%/*}/$BRANCH_NAME/#/ npm run cypress:run'
}
}
}
}
},
"jest": {
nvm(getNodejsVersion()) {
ansiColor('xterm') {
sh 'ON_JENKINS=true npm run test'
}
}
},
)
}
}
}
post {
always {
cobertura autoUpdateHealth: false,
autoUpdateStability: false,
coberturaReportFile: 'coverage/jest/cobertura-coverage.xml',
conditionalCoverageTargets: '70, 0, 0',
failUnhealthy: false,
failUnstable: false,
fileCoverageTargets: '100, 0, 0',
lineCoverageTargets: '80, 0, 0',
maxNumberOfBuilds: 0,
methodCoverageTargets: '80, 0, 0',
onlyStable: false,
sourceEncoding: 'ASCII'
junit 'coverage/jest/junit.xml'
}
cleanup {
ansiColor('xterm') {
sh 'cat $WORKSPACE/server.log || true'
sh '( cd $WORKSPACE/$BRANCH_NAME-service && make -f Makefile.jenkins logs || true ) || true'
sh '( cd $WORKSPACE/$BRANCH_NAME-service && make -f Makefile.jenkins mrproper || true ) || true'
sh '( cd $WORKSPACE/$BRANCH_NAME && docker-compose logs || true ) || true'
sh '( cd $WORKSPACE/$BRANCH_NAME && make mrproper || true ) || true'
}
cleanWs()
}
}
}
// vim: filetype=groovy
2 changes: 1 addition & 1 deletion i18n/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@
"Send {{token}}": "Send {{token}}",
"Send {{token}} here": "Send {{token}} here",
"Sender": "Sender",
"Session timed out": "Your session was timed out after 10 minutes of no network activity. Please sign in to continue using your account.",
"Session timed out": "Session timed out",
"Settings": "Settings",
"Settings saved!": "Settings saved!",
"Share": "Share",
Expand Down
Loading