Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
spring-ci-advanced
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Bùi Bá Trường
spring-ci-advanced
Commits
e00ceab0
Commit
e00ceab0
authored
Jul 30, 2019
by
Bùi Bá Trường
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
truongbb - test ci
parent
8ca1629b
Pipeline
#364
failed with stages
in 1 minute
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
build-test.sh
build-test.sh
+14
-7
No files found.
build-test.sh
View file @
e00ceab0
...
...
@@ -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
(){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment