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 { pipeline {
agent any agent any
environment {
REGISTRY = "docker-registry.service.consul"
IMAGE_NAME = "efstajas/homepage"
}
stages { stages {
stage('Clone repository') { stage('Docker Build') {
checkout scm steps {
script {
dockerImage = docker.build("$REGISTRY/$IMAGE_NAME")
}
}
} }
stage('Build image') { stage('Docker Publish') {
app = docker.build("efstajas/homepage") 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")
} }
} }
} }