This commit is contained in:
Vendored
-4
@@ -26,10 +26,6 @@ pipeline {
|
||||
}
|
||||
|
||||
stage('Deploy to Nomad') {
|
||||
// First, it should convert the local jobspec.hcl file to JSON. To do so, it must make a POST request to http://nomad.service.consul/v1/jobs/parse with content-type: application/json,
|
||||
// content should be { "JobHCL": <job definition> }, where <job definition> is the content of the ./jobspec.hcl file
|
||||
// The response will be a JSON object with a key "Job" containing the parsed job specification. The value of this key is the JSON representation of the job specification.
|
||||
// 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 @jobspec.json http://nomad.service.consul:4646/v1/jobs'
|
||||
|
||||
Reference in New Issue
Block a user