Vendored
+1
-2
@@ -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'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user