Try Jenkinsfile
Some checks failed
andreas-personal/AndysAdguardHomeBlockList/pipeline/head There was a failure building this commit

This commit is contained in:
2024-04-10 00:42:48 +02:00
parent 11c4a5340c
commit a3655a8ee4
3 changed files with 49 additions and 0 deletions

42
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,42 @@
#!groovy
pipeline {
agent none
stages {
stage('Compile List and Push to Gitea') {
when {
beforeAgent true;
branch 'main'
}
agent {
label 'linux'
}
stages {
stage('NPM Install') {
steps {
sh 'npm clean-install'
}
}
stage('Compile Adblock List') {
steps {
sh 'npm run compile'
}
}
stage('git push') {
steps {
withCredentials([
gitUsernamePassword(credentialsId: 'gitea-jenkins-user-token')
]) {
sh '''
git add .
git commit -m "Update Compiled Adblock List"
git push
'''
}
}
}
}
}
}
}