fix
Gitea/homepage/pipeline/head There was a failure building this commit

This commit is contained in:
Georgios Jason Efstathiou
2024-12-22 20:13:05 +01:00
parent d018bafc9d
commit b7b69d0882
Vendored
+17 -9
View File
@@ -1,19 +1,27 @@
pipeline {
agent any
environment {
REGISTRY = "docker-registry.service.consul"
IMAGE_NAME = "efstajas/homepage"
}
stages {
stage('Clone repository') {
checkout scm
stage('Docker Build') {
steps {
script {
dockerImage = docker.build("$REGISTRY/$IMAGE_NAME")
}
}
}
stage('Build image') {
app = docker.build("efstajas/homepage")
stage('Docker Publish') {
steps {
script {
docker.withRegistry("http://$REGISTRY:4124") {
dockerImage.push("latest")
}
stage('Push image') {
docker.withRegistry('https://registry.hub.docker.com', 'git') {
app.push("${env.BUILD_NUMBER}")
app.push("latest")
}
}
}
}