Commit 889350fa authored by Bùi Bá Trường's avatar Bùi Bá Trường

truongbb - test ci

parent 933df3c6
Pipeline #389 failed with stages
in 1 minute and 13 seconds
...@@ -70,7 +70,7 @@ check_quality_gate: ...@@ -70,7 +70,7 @@ check_quality_gate:
- chmod +x ./build-test.sh - chmod +x ./build-test.sh
- export QUALITY_GATE=$(./build-test.sh quality-gate) - export QUALITY_GATE=$(./build-test.sh quality-gate)
- echo $QUALITY_GATE - echo $QUALITY_GATE
- if [[ $QUALITY_GATE = 0 ]]; then exit 0 fi - if [[ $QUALITY_GATE = 0 ]] then exit 0 fi
build_up: build_up:
stage: build_up stage: build_up
......
...@@ -47,14 +47,14 @@ sub_quality-gate(){ ...@@ -47,14 +47,14 @@ sub_quality-gate(){
qualityGateStatus=$(curl --request POST \ qualityGateStatus=$(curl --request POST \
--url http://192.168.1.210:9000/api/qualitygates/project_status?projectKey=spring-ci \ --url http://192.168.1.210:9000/api/qualitygates/project_status?projectKey=spring-ci \
--header 'cache-control: no-cache' --header 'content-type: application/json' | jq -r '.projectStatus.status') --header 'cache-control: no-cache' --header 'content-type: application/json' | jq -r '.projectStatus.status')
# echo "Quality gate status: " ${qualityGateStatus} # echo "Quality gate status: " ${qualityGateStatus}
if [[ ${qualityGateStatus} != "OK" ]] if [[ ${qualityGateStatus} = "OK" ]]
then then
# TODO - Fail quality gate --> stop pipeline??? # TODO - Fail quality gate --> stop pipeline???
# echo "*******QUALITY GATE FAILED!**********" # echo "*******QUALITY GATE FAILED!**********"
echo 0 echo 0
else else
# echo "*******QUALITY GATE PASSED!**********" # echo "*******QUALITY GATE PASSED!**********"
echo 1 echo 1
fi fi
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment