Test
Some checks failed
andreas-personal/AndysAdguardHomeBlockList/pipeline/head There was a failure building this commit
Some checks failed
andreas-personal/AndysAdguardHomeBlockList/pipeline/head There was a failure building this commit
This commit is contained in:
parent
9d2501cd4e
commit
1196994f0d
43
Jenkinsfile
vendored
43
Jenkinsfile
vendored
@ -8,26 +8,31 @@ pipeline {
|
||||
stage('Checkout') {
|
||||
when {
|
||||
beforeAgent true;
|
||||
allOf {
|
||||
branch 'main'
|
||||
not {
|
||||
changeset 'out/andysadguardhomeblocklist.txt'
|
||||
}
|
||||
}
|
||||
branch 'main'
|
||||
}
|
||||
steps {
|
||||
sh 'git checkout main'
|
||||
}
|
||||
}
|
||||
stage('Check last Commit') {
|
||||
when {
|
||||
beforeAgent true;
|
||||
branch 'main'
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
// Replace 'Jenkins' with the name Jenkins uses to commit
|
||||
if (sh(script: 'git log -1 --pretty=format:"%an"', returnStdout: true).trim() == 'Jenkins') {
|
||||
currentBuild.result = 'ABORTED'
|
||||
error('Last commit was by Jenkins, skipping build')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('NPM Install') {
|
||||
when {
|
||||
beforeAgent true;
|
||||
allOf {
|
||||
branch 'main'
|
||||
not {
|
||||
changeset 'out/andysadguardhomeblocklist.txt'
|
||||
}
|
||||
}
|
||||
branch 'main'
|
||||
}
|
||||
steps {
|
||||
sh 'npm clean-install'
|
||||
@ -36,12 +41,7 @@ pipeline {
|
||||
stage('Compile Adblock List') {
|
||||
when {
|
||||
beforeAgent true;
|
||||
allOf {
|
||||
branch 'main'
|
||||
not {
|
||||
changeset 'out/andysadguardhomeblocklist.txt'
|
||||
}
|
||||
}
|
||||
branch 'main'
|
||||
}
|
||||
steps {
|
||||
sh 'mkdir -p out'
|
||||
@ -55,12 +55,7 @@ pipeline {
|
||||
stage('git push') {
|
||||
when {
|
||||
beforeAgent true;
|
||||
allOf {
|
||||
branch 'main'
|
||||
not {
|
||||
changeset 'out/andysadguardhomeblocklist.txt'
|
||||
}
|
||||
}
|
||||
branch 'main'
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
|
Reference in New Issue
Block a user