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
+17 -21
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('Docker Publish') { stage('Test image') {
steps { app.inside {
script { sh 'echo "Tests passed"'
docker.withRegistry("http://$REGISTRY") { }
dockerImage.push("latest") }
}
} stage('Push image') {
} docker.withRegistry('https://registry.hub.docker.com', 'git') {
app.push("${env.BUILD_NUMBER}")
app.push("latest")
} }
} }
} }