Skip to content

Commit b073236

Browse files
Jenkins pipeline updated
1 parent 09ca01b commit b073236

File tree

1 file changed

+23
-16
lines changed

1 file changed

+23
-16
lines changed

jenkinfile

+23-16
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,32 @@ pipeline {
2929
}
3030
}
3131
stage('WAITING FOR PODS') {
32-
echo "I am going to sleep for 2 minutes"
33-
sleep(time:120,unit:"SECONDS")
32+
steps {
33+
echo "I am going to sleep for 2 minutes"
34+
sleep(time:120,unit:"SECONDS")
35+
}
3436
}
3537
stage('DEPLOYING BPMNS') {
36-
sh """#!/bin/bash
37-
HOST=http://localhost:3306/zeebe/upload
38-
deploy(){
39-
cmd="curl --location --request POST $HOST \
40-
--header 'Platform-TenantId: ibank-india' \
41-
--form 'file=@"$PWD/$1"'"
42-
eval $cmd
43-
}
38+
steps {
39+
sh """#!/bin/bash
40+
if [ "${BPMN}" = "Disable" ]; then
41+
echo "Skipping bpmn deployment"
42+
exit 0
43+
fi
44+
HOST=http://localhost:3306/zeebe/upload
45+
deploy(){
46+
cmd="curl --location --request POST \$HOST \
47+
--header 'Platform-TenantId: ibank-india' \
48+
--form 'file=@"\$PWD/\$1"'"
49+
eval \$cmd
50+
}
4451

45-
LOC=orchestration/feel/*.bpmn
46-
for f in $LOC; do
47-
deploy $f
48-
done
49-
50-
"""
52+
LOC=orchestration/feel/*.bpmn
53+
for f in \$LOC; do
54+
deploy \$f
55+
done
56+
"""
57+
}
5158
}
5259
}
5360
}

0 commit comments

Comments
 (0)