fix jenkinsfile
Gitea/homepage/pipeline/head This commit looks good

This commit is contained in:
Georgios Jason Efstathiou
2025-01-17 22:47:14 +01:00
parent dee4180241
commit 6ebd843f04
Vendored
+1 -4
View File
@@ -34,10 +34,7 @@ pipeline {
// Read the jobspec.json file // Read the jobspec.json file
def jobSpec = readJSON file: 'jobspec.json' def jobSpec = readJSON file: 'jobspec.json'
// Write the updated jobspec back to the file sh 'curl -X POST -H "Content-Type: application/json" -d "$jobSpec" http://nomad.service.consul:4646/v1/jobs'
def updatedJobSpec = sh(script: "jq '.meta[\"image_hash\"] = \"$imageHash\"' jobspec.json", returnStdout: true).trim()
sh 'curl -X POST -H "Content-Type: application/json" -d "$updatedJobSpec" http://nomad.service.consul:4646/v1/jobs'
} }
} }
} }