Gitea/jenkins-inbound-agent-with-docker/pipeline/head Something is wrong with the build of this commit
29 lines
501 B
Groovy
29 lines
501 B
Groovy
pipeline {
|
|
agent any
|
|
|
|
environment {
|
|
REGISTRY = "docker-registry.service.consul"
|
|
IMAGE_NAME = "efstajas/jenkins-inbound-agent-with-docker"
|
|
}
|
|
|
|
stages {
|
|
stage('Docker Build') {
|
|
steps {
|
|
script {
|
|
dockerImage = docker.build("$IMAGE_NAME")
|
|
}
|
|
}
|
|
}
|
|
|
|
stage('Docker Publish') {
|
|
steps {
|
|
script {
|
|
docker.withRegistry("http://$REGISTRY:4124") {
|
|
dockerImage.push("latest")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|