Jenkins build file
This commit is contained in:
parent
dcc0b6607b
commit
4456be0e58
50
Jenkinsfile
vendored
Normal file
50
Jenkinsfile
vendored
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
kubernetes {
|
||||||
|
defaultContainer 'kaniko'
|
||||||
|
yaml """
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: kaniko
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: kaniko
|
||||||
|
image: gcr.io/kaniko-project/executor:v1.5.1-debug
|
||||||
|
imagePullPolicy: Always
|
||||||
|
command:
|
||||||
|
- /busybox/cat
|
||||||
|
tty: true
|
||||||
|
volumeMounts:
|
||||||
|
- name: jenkins-docker-cfg
|
||||||
|
mountPath: /kaniko/.docker
|
||||||
|
volumes:
|
||||||
|
- name: jenkins-docker-cfg
|
||||||
|
projected:
|
||||||
|
sources:
|
||||||
|
- secret:
|
||||||
|
name: docker-credentials
|
||||||
|
items:
|
||||||
|
- key: data
|
||||||
|
path: config.json
|
||||||
|
"""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
environment {
|
||||||
|
IMAGE_PUSH_DESTINATION="ghcr.io/ruakij/routingtabletowg/routingtabletowg"
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Build with Kaniko') {
|
||||||
|
steps {
|
||||||
|
checkout scm
|
||||||
|
container(name: 'kaniko', shell: '/busybox/sh') {
|
||||||
|
withEnv(['PATH+EXTRA=/busybox']) {
|
||||||
|
sh '''#!/busybox/sh
|
||||||
|
/kaniko/executor --context `pwd` --destination $IMAGE_PUSH_DESTINATION --force
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user