Test new Jenkins File
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
a3655a8ee4
commit
64d96165fe
57
Jenkinsfile
vendored
57
Jenkinsfile
vendored
@ -1,40 +1,35 @@
|
|||||||
#!groovy
|
#!groovy
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent none
|
agent {
|
||||||
|
label 'linux'
|
||||||
|
}
|
||||||
|
when {
|
||||||
|
beforeAgent true;
|
||||||
|
branch 'main'
|
||||||
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Compile List and Push to Gitea') {
|
stage('NPM Install') {
|
||||||
when {
|
steps {
|
||||||
beforeAgent true;
|
sh 'npm clean-install'
|
||||||
branch 'main'
|
|
||||||
}
|
}
|
||||||
agent {
|
}
|
||||||
label 'linux'
|
stage('Compile Adblock List') {
|
||||||
|
steps {
|
||||||
|
sh 'npm run compile'
|
||||||
}
|
}
|
||||||
stages {
|
}
|
||||||
stage('NPM Install') {
|
stage('git push') {
|
||||||
steps {
|
steps {
|
||||||
sh 'npm clean-install'
|
withCredentials([
|
||||||
}
|
gitUsernamePassword(credentialsId: 'gitea-jenkins-user-token')
|
||||||
}
|
]) {
|
||||||
stage('Compile Adblock List') {
|
sh '''
|
||||||
steps {
|
git checkout main
|
||||||
sh 'npm run compile'
|
git add .
|
||||||
}
|
git commit -m "Update Compiled Adblock List"
|
||||||
}
|
git push
|
||||||
stage('git push') {
|
'''
|
||||||
steps {
|
|
||||||
withCredentials([
|
|
||||||
gitUsernamePassword(credentialsId: 'gitea-jenkins-user-token')
|
|
||||||
]) {
|
|
||||||
sh '''
|
|
||||||
git add .
|
|
||||||
git commit -m "Update Compiled Adblock List"
|
|
||||||
git push
|
|
||||||
'''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user