Vendored
+2
-4
@@ -28,10 +28,8 @@ pipeline {
|
||||
stage('Deploy to Nomad') {
|
||||
steps {
|
||||
script {
|
||||
// Read the jobspec.json file
|
||||
def jobSpec = readFile 'jobspec.json'
|
||||
|
||||
sh 'curl -X POST -H "Content-Type: application/json" -d "$jobSpec" http://nomad.service.consul:4646/v1/jobs'
|
||||
// Post jobspec.json to http://nomad.service.consul:4646/v1/jobs
|
||||
sh 'curl -X POST -d @jobspec.json http://nomad.service.consul:4646/v1/jobs'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user