This commit is contained in:
2024-04-10 17:31:19 +02:00
parent 3d3fc5a70d
commit 5f43bde9b8

45
Jenkinsfile vendored
View File

@ -11,14 +11,6 @@ pipeline {
branch 'main' branch 'main'
} }
steps { steps {
// dir ('build-dir') {
// checkout poll: false, scm: scmGit([
// branches: [[name: 'main']],
// userRemoteConfigs: [[credentialsId: 'gitea-jenkins-user-token', url: 'https://gitea.fahrecker.com/andreas-personal/AndysAdguardHomeBlocklist.git']]
// ])
// sh 'git checkout main'
// sh 'pwd'
// }
sh 'git checkout main' sh 'git checkout main'
} }
} }
@ -28,10 +20,7 @@ pipeline {
branch 'main' branch 'main'
} }
steps { steps {
// dir ('build-dir') { sh 'npm clean-install'
sh 'pwd'
sh 'npm clean-install'
// }
} }
} }
stage('Compile Adblock List') { stage('Compile Adblock List') {
@ -40,14 +29,12 @@ pipeline {
branch 'main' branch 'main'
} }
steps { steps {
// dir ('build-dir') { sh 'mkdir -p out'
sh ''' sh 'rm out/andysadguardhomeblocklist.txt'
mkdir -p out sh '''
npm run compile:test git add out/andysadguardhomeblocklist.txt
git add out/andysadguardhomeblocklist.txt git commit -m "Update Compiled Adblock List"
git commit -m "Update Compiled Adblock List" '''
'''
// }
} }
} }
stage('git push') { stage('git push') {
@ -56,16 +43,14 @@ pipeline {
branch 'main' branch 'main'
} }
steps { steps {
// dir ('build-dir') { withCredentials([
withCredentials([ gitUsernamePassword(credentialsId: 'gitea-jenkins-user-token')
gitUsernamePassword(credentialsId: 'gitea-jenkins-user-token') ]) {
]) { sh '''
sh ''' git pull origin main
git pull origin main git push
git push '''
''' }
}
// }
} }
} }
} }