Jenkins 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:
23
Jenkinsfile
vendored
23
Jenkinsfile
vendored
@ -5,6 +5,18 @@ pipeline {
|
||||
label 'linux'
|
||||
}
|
||||
stages {
|
||||
stage('Checkout') {
|
||||
when {
|
||||
beforeAgent true;
|
||||
branch 'main'
|
||||
}
|
||||
steps {
|
||||
checkout poll: false, scm: scmGit([
|
||||
branches: [[name: 'main']],
|
||||
userRemoteConfigs: [[credentialsId: 'gitea-jenkins-user-token', url: 'https://gitea.fahrecker.com/andreas-personal/AndysAdguardHomeBlocklist.git']]
|
||||
])
|
||||
}
|
||||
}
|
||||
stage('NPM Install') {
|
||||
when {
|
||||
beforeAgent true;
|
||||
@ -21,10 +33,9 @@ pipeline {
|
||||
}
|
||||
steps {
|
||||
sh '''
|
||||
git checkout -b build-${BUILD_NUMBER}
|
||||
mkdir -p dist
|
||||
npm run compile
|
||||
git add .
|
||||
npm run compile:test
|
||||
git add out/andysadguardhomeblocklist.txt
|
||||
git commit -m "Update Compiled Adblock List"
|
||||
'''
|
||||
}
|
||||
@ -39,11 +50,7 @@ pipeline {
|
||||
gitUsernamePassword(credentialsId: 'gitea-jenkins-user-token')
|
||||
]) {
|
||||
sh '''
|
||||
git checkout main
|
||||
git rebase --abort
|
||||
git pull --rebase
|
||||
git merge build-${BUILD_NUMBER} --no-ff -m "Merge build ${BUILD_NUMBER}"
|
||||
git push
|
||||
git push -u origin main
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user