diff --git a/Jenkinsfile b/Jenkinsfile index 448f0d3..0d7fb98 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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' } } }