Spaces:
Paused
Paused
CONTAINER="docker.qualityminds.de/rd/ai-christmas:latest" | |
podTemplate(containers: [ | |
containerTemplate(name: 'docker', image: 'docker:24.0.6-dind', args: '--mtu 1400', privileged: true, ttyEnabled: true, | |
resourceRequestCpu: '100m', resourceRequestMemory: '8Gi', resourceLimitMemory: '8Gi') | |
]) { | |
node(POD_LABEL) { | |
stage('checkout') { | |
checkout scm | |
} | |
container('docker') { | |
stage('docker build') { | |
sh "docker build --tag $CONTAINER ." | |
} | |
stage('docker push') { | |
withCredentials([usernamePassword(credentialsId: 'nexus_jenkins_user', passwordVariable: 'password', usernameVariable: 'user')]) { | |
sh "docker login $QM_DOCKER_REGISTRY -p \$password -u \$user" | |
} | |
sh "docker push $CONTAINER" | |
} | |
} | |
} | |
} | |