3.11.6 #1

Merged
jonny merged 49 commits from 3.11.6 into master 2020-07-20 13:17:56 +00:00
Showing only changes of commit da0ee7b286 - Show all commits

56
Jenkinsfile vendored
View File

@ -1,30 +1,36 @@
node("docker-node") {
docker.withRegistry('https://harbor.ervine.dev', 'jenkins-to-harbor') {
git branch: "3.11.6", url: "ssh://git@git.ervine.org/jonny/x86_64-alpine-nzbhydra", credentialsId: 'jenkins-to-git'
sh "git rev-parse HEAD > .git/commit-id"
def commit_id = readFile('.git/commit-id').trim()
println commit_id
try { podTemplate(yaml: """
stage "build" kind: Pod
def app = docker.build "library/x86_64/alpine/nzbhydra2" spec:
containers:
stage "publish" - name: kaniko
app.push("${env.BUILD_NUMBER}") image: gcr.io/kaniko-project/executor:debug-539ddefcae3fd6b411a95982a830d987f4214251
app.push("2.25.0") imagePullPolicy: Always
app.push("2.25") command:
app.push("2") - /busybox/cat
app.push("latest") tty: true
volumeMounts:
- name: jenkins-docker-cfg
mountPath: /kaniko/.docker
volumes:
- name: jenkins-docker-cfg
projected:
sources:
- secret:
name: regcred
items:
- key: .dockerconfigjson
path: config.json
"""
) {
stage('Deploy on K8s'){ node(POD_LABEL) {
sh "/usr/local/bin/kubectl -n media delete po nzbhydra-0" stage('Build with Kaniko') {
} git url: 'ssh://git@git.ervine.org/jonny/x86_64-alpine-nzbhydra.git', credentialsId: 'jenkins-to-git'
} container('kaniko') {
catch (err) { sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=true --destination=harbor.ervine.dev/library/x86_64/alpine/nzbhydra2:2.25.0 --destination=harbor.ervine.dev/library/x86_64/alpine/nzbhydra2:2.25 --destination=harbor.ervine.dev/library/x86_64/alpine/nzbget2:2'
currentBuild.result = 'FAILURE' }
}
} }
}
} }