Files
homepage/Jenkinsfile
T
Georgios Jason Efstathiou ec960c158a
Gitea/homepage/pipeline/head This commit looks good
remove ai prompt lol
2024-12-23 16:00:07 +01:00

37 lines
685 B
Groovy

pipeline {
agent any
environment {
REGISTRY = "docker-registry.service.consul"
IMAGE_NAME = "efstajas/homepage"
}
stages {
stage('Docker Build') {
steps {
script {
dockerImage = docker.build("$IMAGE_NAME")
}
}
}
stage('Docker Publish') {
steps {
script {
docker.withRegistry("http://$REGISTRY:4124") {
dockerImage.push("latest")
}
}
}
}
stage('Deploy to Nomad') {
steps {
script {
sh 'curl -X POST -H "Content-Type: application/json" -d @jobspec.json http://nomad.service.consul:4646/v1/jobs'
}
}
}
}
}