From 6418d78e7d55a53036413da6d12ca002b05fd6a3 Mon Sep 17 00:00:00 2001 From: Georgios Jason Efstathiou Date: Fri, 17 Jan 2025 22:50:42 +0100 Subject: [PATCH] another try --- Jenkinsfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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' } } }