Files
Georgios Jason Efstathiou 6418d78e7d
Gitea/homepage/pipeline/head This commit looks good
another try
2025-01-17 22:50:42 +01:00

38 lines
722 B
Groovy

pipeline {
agent any
environment {
REGISTRY = "docker.internal.jason-e.dev:8443"
IMAGE_NAME = "efstajas/homepage"
}
stages {
stage('Docker Build') {
steps {
script {
dockerImage = docker.build("$IMAGE_NAME")
}
}
}
stage('Docker Publish') {
steps {
script {
docker.withRegistry("https://$REGISTRY") {
dockerImage.push("latest")
}
}
}
}
stage('Deploy to Nomad') {
steps {
script {
// Post jobspec.json to http://nomad.service.consul:4646/v1/jobs
sh 'curl -X POST -d @jobspec.json http://nomad.service.consul:4646/v1/jobs'
}
}
}
}
}