Adrianux.net/Jenkinsfile
2025-02-14 08:53:29 +01:00

32 lines
No EOL
934 B
Groovy

pipeline {
agent { dockerfile true }
stages {
stage('Pull Alpine Image') {
steps {
script {
// Pull the Alpine Docker image
dockerImage = docker.image('alpine:latest')
dockerImage.pull()
}
}
}
stage('Build') {
steps {
script {
docker.withRegistry('https://git.adrianux.net/ahoemann/') {
/* Build the container image */
def dockerImage = docker.build("adrianux:${env.BUILD_ID}")
/* Push the container to the custom Registry */
dockerImage.push()
}
/* Remove docker image*/
sh 'docker rmi -f adrianux:${env.BUILD_ID}'
}
}
}
}