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

truongbb - test ci

parent 8ca1629b
Pipeline #364 failed with stages
in 1 minute
......@@ -42,13 +42,20 @@ sub_sonar-scan(){
mvn clean --settings settings.xml package sonar:sonar \
-Dsonar.projectName='SpringCIAdvanced' \
-Dsonar.projectKey='spring-ci-advanced'
curl -s -w "\n%{http_code}" 'http://192.168.1.210:9000/api/qualitygates/project_status?projectKey=spring-ci' | {
echo "1111111111111111111111"
read body
read code
echo ${code}
echo ${body}
}
# curl -s -w "\n%{http_code}" 'http://192.168.1.210:9000/api/qualitygates/project_status?projectKey=spring-ci' | {
# echo "1111111111111111111111"
# read body
# read code
# echo ${code}
# jq .name <<< "$body"
# }
response=$(curl -s -w "\n%{http_code}" 'http://192.168.1.210:9000/api/qualitygates/project_status?projectKey=spring-ci')
response=(${response[@]}) # convert to array
code=${response[-1]} # get last element (last line)
body=${response[@]::${#response[@]}-1} # get all elements except last
name=$(echo $body | jq '.name')
echo $code
echo "name: "$name
}
sub_send-email(){
......
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