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'
|
label 'linux'
|
||||||
}
|
}
|
||||||
stages {
|
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') {
|
stage('NPM Install') {
|
||||||
when {
|
when {
|
||||||
beforeAgent true;
|
beforeAgent true;
|
||||||
@ -21,10 +33,9 @@ pipeline {
|
|||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
sh '''
|
sh '''
|
||||||
git checkout -b build-${BUILD_NUMBER}
|
|
||||||
mkdir -p dist
|
mkdir -p dist
|
||||||
npm run compile
|
npm run compile:test
|
||||||
git add .
|
git add out/andysadguardhomeblocklist.txt
|
||||||
git commit -m "Update Compiled Adblock List"
|
git commit -m "Update Compiled Adblock List"
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
@ -39,11 +50,7 @@ pipeline {
|
|||||||
gitUsernamePassword(credentialsId: 'gitea-jenkins-user-token')
|
gitUsernamePassword(credentialsId: 'gitea-jenkins-user-token')
|
||||||
]) {
|
]) {
|
||||||
sh '''
|
sh '''
|
||||||
git checkout main
|
git push -u origin main
|
||||||
git rebase --abort
|
|
||||||
git pull --rebase
|
|
||||||
git merge build-${BUILD_NUMBER} --no-ff -m "Merge build ${BUILD_NUMBER}"
|
|
||||||
git push
|
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,8 +4,9 @@
|
|||||||
"description": "A blocklist for Adguard Home",
|
"description": "A blocklist for Adguard Home",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"compile": "hostlist-compiler -c configuration.json -o dist/andysadguardhomeblocklist.txt",
|
"compile": "hostlist-compiler -c configuration.json -o out/andysadguardhomeblocklist.txt",
|
||||||
"compile:verbose": "hostlist-compiler -c configuration.json -o dist/andysadguardhomeblocklist.txt -v"
|
"compile:verbose": "hostlist-compiler -c configuration.json -o out/andysadguardhomeblocklist.txt -v",
|
||||||
|
"compile:test": "echo 'Test' > out/andysadguardhomeblocklist.txt"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
Reference in New Issue
Block a user