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
a1372b91
Commit
a1372b91
authored
Jul 30, 2019
by
Bùi Bá Trường
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
truongbb - test ci
parent
9950f8a7
Pipeline
#374
passed with stages
in 25 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
43 deletions
+42
-43
.gitlab-ci.yml
.gitlab-ci.yml
+40
-40
build-test.sh
build-test.sh
+2
-3
No files found.
.gitlab-ci.yml
View file @
a1372b91
...
...
@@ -34,27 +34,27 @@ checkout:
-
git clone https://truongbb96:hoanghuynh0801@git.myitsol.com/truongbb96/spring-ci-advanced.git
-
cd ./spring-ci-advanced
compile
:
stage
:
compile
only
:
-
master
# - merge_requestsssss
script
:
-
cd /root/GitlabRunner/repo/spring-ci-advanced
-
ls
-
chmod +x ./build-test.sh
-
./build-test.sh compile
sonnar_scanner
:
stage
:
sonnar_scanner
only
:
-
master
# - merge_requests
script
:
-
cd /root/GitlabRunner/repo/spring-ci-advanced
-
ls
-
chmod +x ./build-test.sh
-
./build-test.sh sonar-scan
#
compile:
#
stage: compile
#
only:
#
- master
#
# - merge_requestsssss
#
script:
#
- cd /root/GitlabRunner/repo/spring-ci-advanced
#
- ls
#
- chmod +x ./build-test.sh
#
- ./build-test.sh compile
#
#
sonnar_scanner:
#
stage: sonnar_scanner
#
only:
#
- master
#
# - merge_requests
#
script:
#
- cd /root/GitlabRunner/repo/spring-ci-advanced
#
- ls
#
- chmod +x ./build-test.sh
#
- ./build-test.sh sonar-scan
check_quality_gate
:
stage
:
check_quality_gate
...
...
@@ -67,23 +67,23 @@ check_quality_gate:
-
chmod +x ./build-test.sh
-
./build-test.sh quality-gate
build_up
:
stage
:
build_up
only
:
# - master
-
merge_requests
script
:
-
cd /root/GitlabRunner/repo/spring-ci-advanced
-
ls
#
build_up:
#
stage: build_up
#
only:
#
# - master
#
- merge_requests
#
script:
#
- cd /root/GitlabRunner/repo/spring-ci-advanced
#
- ls
send_email
:
stage
:
send_email
only
:
-
master
# - merge_requests
script
:
-
curl --request POST
--url https://api.sendgrid.com/v3/mail/send
--header 'Authorization:Bearer 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'
--header 'Content-Type:application/json'
--data '{"personalizations":[{"to":[{"email":"truongbb96@gmail.com"}]}],"from":{"email":"truongbb@itsol.vn"},"subject":"CI pipeline result","content":[{"type":"text/plain","value":"CI pipeline done!"}]}'
\ No newline at end of file
#send_email:
# stage: send_email
# only:
# - master
# # - merge_requests
# script:
# - curl --request POST
# --url https://api.sendgrid.com/v3/mail/send
# --header 'Authorization:Bearer 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'
# --header 'Content-Type:application/json'
# --data '{"personalizations":[{"to":[{"email":"truongbb96@gmail.com"}]}],"from":{"email":"truongbb@itsol.vn"},"subject":"CI pipeline result","content":[{"type":"text/plain","value":"CI pipeline done!"}]}'
\ No newline at end of file
build-test.sh
View file @
a1372b91
...
...
@@ -70,9 +70,8 @@ sub_quality-gate(){
content
=
$(
curl
--request
POST
\
--url
http://192.168.1.210:9000/api/qualitygates/project_status?projectKey
=
spring-ci
\
--header
'cache-control: no-cache'
--header
'content-type: application/json'
)
status
=
$(
jq
-r
'.data'
<<<
"
${
content
}
"
)
echo
"body: "
${
status
}
--header
'cache-control: no-cache'
--header
'content-type: application/json'
| jq
-r
'.data'
)
echo
"body: "
${
content
}
}
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