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

This commit is contained in:
Georgios Jason Efstathiou
2024-12-23 15:56:07 +01:00
parent d596894f9b
commit f89afef0da
3 changed files with 63 additions and 46 deletions
Vendored
+1 -2
View File
@@ -32,8 +32,7 @@ pipeline {
// The next step is to make a POST request to http://nomad.service.consul/v1/jobs with content-type: application/json and content should { "Job": <parsed job specification> }
steps {
script {
sh 'curl -X POST -H "Content-Type: application/json" -d "{ \"JobHCL\": \"$(cat jobspec.hcl)\" }" http://nomad.service.consul/v1/jobs/parse > parsed_job.json'
sh 'curl -X POST -H "Content-Type: application/json" -d "{ \"Job\": $(cat parsed_job.json) }" http://nomad.service.consul/v1/jobs'
sh 'curl -X POST -H "Content-Type: application/json" -d @jobspec.json http://nomad.service.consul:4646/v1/jobs'
}
}
}