Test new Jenkins File
Some checks failed
andreas-personal/AndysAdguardHomeBlockList/pipeline/head There was a failure building this commit

This commit is contained in:
Andreas Fahrecker 2024-04-10 01:34:07 +02:00
parent a3655a8ee4
commit 64d96165fe

57
Jenkinsfile vendored
View File

@ -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
'''
}
}
} }
} }
} }