podTemplate(yaml: """ kind: Pod spec: containers: - name: kaniko image: gcr.io/kaniko-project/executor: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: 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-nzbhydra.git', credentialsId: 'jenkins2git' container('kaniko') { sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=false --destination=harbor.ervine.dev/public/x86_64/alpine/nzbhydra2:v5.1.7' } } stage('Notify gchat') { googlechatnotification (url: 'https://chat.googleapis.com/v1/spaces/AAAA-nNKzdA/messages?key=AIzaSyDdI0hCZtE6vySjMm-WEfRq3CPzqKqqsHI&token=FySO2Zy2wfNJ7QKoqT9zy0uzNJF8bwj74ansor3BTu0%3D', message: "NZBhydra 5.1.7 on Alpine has built") } } }