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:
parent
cdc2f8e713
commit
2b84326d80
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
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
@ -4,8 +4,9 @@
|
||||
"description": "A blocklist for Adguard Home",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"compile": "hostlist-compiler -c configuration.json -o dist/andysadguardhomeblocklist.txt",
|
||||
"compile:verbose": "hostlist-compiler -c configuration.json -o dist/andysadguardhomeblocklist.txt -v"
|
||||
"compile": "hostlist-compiler -c configuration.json -o out/andysadguardhomeblocklist.txt",
|
||||
"compile:verbose": "hostlist-compiler -c configuration.json -o out/andysadguardhomeblocklist.txt -v",
|
||||
"compile:test": "echo 'Test' > out/andysadguardhomeblocklist.txt"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
Reference in New Issue
Block a user