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

truongbb - test ci

parent e1819e6c
Pipeline #405 failed
...@@ -17,8 +17,8 @@ variables: ...@@ -17,8 +17,8 @@ variables:
stages: stages:
- checkout - checkout
# - compile - compile
# - sonnar_scanner - sonnar_scanner
- check_quality_gate - check_quality_gate
- build_up # for merge request - build_up # for merge request
- send_email - send_email
...@@ -37,27 +37,27 @@ checkout: ...@@ -37,27 +37,27 @@ checkout:
- git clone https://truongbb96:hoanghuynh0801@git.myitsol.com/truongbb96/spring-ci-advanced.git - git clone https://truongbb96:hoanghuynh0801@git.myitsol.com/truongbb96/spring-ci-advanced.git
- cd ./spring-ci-advanced - cd ./spring-ci-advanced
#compile: compile:
# stage: compile stage: compile
# only: only:
# - master - master
# # - merge_requestsssss # - merge_requestsssss
# script: script:
# - cd /root/GitlabRunner/repo/spring-ci-advanced - cd /root/GitlabRunner/repo/spring-ci-advanced
# - ls - ls
# - chmod +x ./build-test.sh - chmod +x ./build-test.sh
# - ./build-test.sh compile - ./build-test.sh compile
#
#sonnar_scanner: sonnar_scanner:
# stage: sonnar_scanner stage: sonnar_scanner
# only: only:
# - master - master
# # - merge_requests # - merge_requests
# script: script:
# - cd /root/GitlabRunner/repo/spring-ci-advanced - cd /root/GitlabRunner/repo/spring-ci-advanced
# - ls - ls
# - chmod +x ./build-test.sh - chmod +x ./build-test.sh
# - ./build-test.sh sonar-scan - ./build-test.sh sonar-scan
check_quality_gate: check_quality_gate:
stage: check_quality_gate stage: check_quality_gate
...@@ -68,8 +68,7 @@ check_quality_gate: ...@@ -68,8 +68,7 @@ check_quality_gate:
- cd /root/GitlabRunner/repo/spring-ci-advanced - cd /root/GitlabRunner/repo/spring-ci-advanced
- ls - ls
- 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)
- export QUALITY_GATE=0
- echo $QUALITY_GATE - echo $QUALITY_GATE
# force pipeline exit and fail job if QUALITY GATE is FAIL # force pipeline exit and fail job if QUALITY GATE is FAIL
- sh ./stop_job.sh - sh ./stop_job.sh
......
#!/usr/bin/env bash #!/usr/bin/env bash
# stop pipeline if QUALITY GATE is FAIL
if [[ $QUALITY_GATE = 0 ]] if [[ $QUALITY_GATE = 0 ]]
then then
exit -1 exit -1
......
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