Browse Source

Yeet'd kaniko into oblivion in favor fo dind

master
Daniel Gyulai 4 years ago
parent
commit
dc7b064903
  1. 35
      Jenkinsfile

35
Jenkinsfile

@ -1,30 +1,37 @@
podTemplate(yaml: """ podTemplate(yaml: """
apiVersion: v1
kind: Pod kind: Pod
spec: spec:
volumes:
- name: docker-socket
emptyDir: {}
containers: containers:
- name: kaniko - name: docker
image: gcr.io/kaniko-project/executor:debug image: docker:19.03.1
imagePullPolicy: Always
command: command:
- /busybox/cat - sleep
args:
- 99d
volumeMounts: volumeMounts:
- name: certs - name: docker-socket
mountPath: /kaniko/ssl/certs mountPath: /var/run
tty: true - name: docker-daemon
volumes: image: docker:19.03.1-dind
- name: certs securityContext:
configMap: privileged: true
name: ca-certificates volumeMounts:
""" - name: docker-socket
mountPath: /var/run
'''
) { ) {
node(POD_LABEL) { node(POD_LABEL) {
stage('Git') { stage('Git') {
git url: 'https://gyulai.cloud/git/bme/covidok-backend.git', git url: 'https://gyulai.cloud/git/bme/covidok-backend.git',
credentialsId: '1b1c30a0-590d-41d4-b775-bdb90e837bc8' credentialsId: '1b1c30a0-590d-41d4-b775-bdb90e837bc8'
container('kaniko') { container('docker') {
stage('Build and publish dev Docker image') { stage('Build and publish dev Docker image') {
sh '/kaniko/executor --dockerfile=/home/jenkins/agent/workspace/gitea-bme_covidok-backend_master/CoviDok/Dockerfile.CI -c /home/jenkins/agent/workspace --destination=docker.local/bme/covidok' sh 'docker build -f /home/jenkins/agent/workspace/gitea-bme_covidok-backend_master/CoviDok/Dockerfile.CI -t docker.local/bme/covidok:latest /home/jenkins/agent/workspace && docker push docker.local/bme/covidok'
} }
} }
} }

Loading…
Cancel
Save