podTemplate(yaml: """ kind: Pod spec: containers: - name: kaniko image: gcr.io/kaniko-project/executor@sha256:f652f28537fa76e8f4f9393de13a064f0206003c451ce2ad6e4359fd5a21acbc imagePullPolicy: Always command: - /busybox/cat 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 """ ) { node(POD_LABEL) { stage('Build with Kaniko') { git url: 'ssh://git@git.ervine.org/jonny/x86_64-alpine-sonarr', credentialsId: 'jenkins2git' container('kaniko') { sh '/kaniko/executor --force -f `pwd`/Dockerfile -c `pwd` --cache=false --destination=harbor.ervine.dev/public/x86_64/ubi/sonarr:v3.0.9.1549' } } stage('Notify gchat') { googlechatnotification (url: 'https://chat.googleapis.com/v1/spaces/AAAA-nNKzdA/messages?key=AIzaSyDdI0hCZtE6vySjMm-WEfRq3CPzqKqqsHI&token=FySO2Zy2wfNJ7QKoqT9zy0uzNJF8bwj74ansor3BTu0%3D', message: "Sonarr 3.0.9.1549 on RHEL UBI has built") } } }