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

This commit is contained in:
Georgios Jason Efstathiou
2024-12-22 20:06:11 +01:00
parent c7afc41a1c
commit 32d5ac9dec
Vendored
+14 -18
View File
@@ -1,28 +1,24 @@
pipeline { node {
agent any def app
environment { stage('Clone repository') {
REGISTRY = "docker-registry.service.consul" checkout scm
IMAGE_NAME = "homepage"
} }
stages { stage('Build image') {
stage('Docker Build') { app = docker.build("brandonjones085/test")
steps {
script {
dockerImage = docker.build("$REGISTRY/$IMAGE_NAME")
} }
stage('Test image') {
app.inside {
sh 'echo "Tests passed"'
} }
} }
stage('Docker Publish') { stage('Push image') {
steps { docker.withRegistry('https://registry.hub.docker.com', 'git') {
script { app.push("${env.BUILD_NUMBER}")
docker.withRegistry("http://$REGISTRY") { app.push("latest")
dockerImage.push("latest")
}
}
}
} }
} }
} }