jenkins-container/Jenkinsfile
Jim Nicholson 12385e38d8
Some checks reported errors
Homelab/jenkins-container/pipeline/head Something is wrong with the build of this commit
try
2022-09-01 16:29:19 -07:00

51 lines
1.2 KiB
Groovy

#!/usr/bin/env groovy
POD_LABEL = "jenkins-builder-${UUID.randomUUID()}"
REGISTRY = 'docker.thejimnicholson.com/jenkins'
podTemplate(
name: POD_LABEL,
namespace: 'jenkins',
podRetention(always),
containers: [
containerTemplate(
name: 'kaniko',
image: 'gcr.io/kaniko-project/executor:debug',
command: 'sleep',
args: '30d'
)
],
volumes: [
secretVolume(mountPath: '/kaniko/.docker/config.json', secretName: 'regcred')
],
workspaceVolume: dynamicPVC()
) {
node(POD_LABEL) {
stage('Checkout') {
checkout scm
}
}
}
// {
// node(POD_LABEL) {
// stage('Checkout') {
// checkout scm
// }
// container('kaniko') {
// stage('Image') {
// ansiColor('xterm') {
// sh "/kaniko/executor \
// -f `pwd`/Dockerfile \
// -c `pwd` \
// --insecure \
// --skip-tls-verify \
// --destination=${REGISTRY}/jenkins:2.346 \
// --destination=${REGISTRY}/jenkins:latest"
// }
// }
// }
// }
// }