maybe fix fix it?
Gitea/homepage/pipeline/head This commit looks good

This commit is contained in:
Georgios Jason Efstathiou
2025-01-17 22:49:37 +01:00
parent 6ebd843f04
commit f444f93b0b
Vendored
+1 -4
View File
@@ -28,11 +28,8 @@ pipeline {
stage('Deploy to Nomad') { stage('Deploy to Nomad') {
steps { steps {
script { script {
// Calculate the hash of your Docker image (or your application code)
def imageHash = sh(script: "docker images --no-trunc $IMAGE_NAME | grep latest | awk '{print \$3}'", returnStdout: true).trim()
// Read the jobspec.json file // Read the jobspec.json file
def jobSpec = readJSON file: 'jobspec.json' def jobSpec = readFile 'jobspec.json'
sh 'curl -X POST -H "Content-Type: application/json" -d "$jobSpec" http://nomad.service.consul:4646/v1/jobs' sh 'curl -X POST -H "Content-Type: application/json" -d "$jobSpec" http://nomad.service.consul:4646/v1/jobs'
} }