Skip to content

Commit

Permalink
Merge pull request #2617 from LiskHQ/2615-disable-percy-on-hourly-builds
Browse files Browse the repository at this point in the history
Add parameter that allows to skip running percy
  • Loading branch information
Andrei Klimenok committed Nov 4, 2019
2 parents 9308402 + 451735a commit eff4ce3
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions Jenkinsfile
Expand Up @@ -9,6 +9,9 @@ pipeline {
environment {
LISK_CORE_VERSION = '1.5.0'
}
parameters {
booleanParam(name: 'SKIP_PERCY', defaultValue: false, description: 'Skip running percy.')
}
stages {
stage('Install npm dependencies') {
steps {
Expand Down Expand Up @@ -162,10 +165,16 @@ EOF
}
},
"percy": {
ansiColor('xterm') {
nvm(getNodejsVersion()) {
withCredentials([string(credentialsId: 'PERCY_TOKEN', variable: 'PERCY_TOKEN')]) {
sh 'npm run percy'
script {
if(params.SKIP_PERCY){
echo 'Skipping percy run as requested.'
} else {
ansiColor('xterm') {
nvm(getNodejsVersion()) {
withCredentials([string(credentialsId: 'PERCY_TOKEN', variable: 'PERCY_TOKEN')]) {
sh 'npm run percy'
}
}
}
}
}
Expand Down

0 comments on commit eff4ce3

Please sign in to comment.