Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
op-web-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
op-web-service
Commits
1053e0ab
Commit
1053e0ab
authored
Jun 09, 2021
by
luchaowu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update ci
parent
cf94d28b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
0 deletions
+39
-0
check_port.sh
deploy/check_port.sh
+21
-0
dingdingrobot.sh
deploy/dingdingrobot.sh
+8
-0
remove_old_docker.sh
deploy/remove_old_docker.sh
+10
-0
No files found.
deploy/check_port.sh
0 → 100644
View file @
1053e0ab
# !/bin/bash
# 检查一个端口是否活着
port
=
$1
echo
"check listening
$port
..."
count
=
5
while
true
;
do
#s=`netstat -ntl | grep ":${port} " -c`
s
=
`
echo exit
| telnet 127.0.0.1
${
port
}
|
grep
'Connected'
-c
`
if
[
"X
$s
"
!=
"X"
]
&&
[
"
$s
"
!=
"0"
]
;
then
break
fi
echo
'nothing listen on $port, wait for 10s repeat...'
count
=
$((
count-1
))
if
[
$count
-le
0
]
;
then
echo
'job fail!'
exit
1
fi
echo
$count
sleep
10
;
done
;
deploy/dingdingrobot.sh
0 → 100644
View file @
1053e0ab
#!/bin/bash
title
=
$1
content
=
$2
#测试机器人
#curl -H 'Content-Type: application/json;charset=utf-8' -XPOST https://oapi.dingtalk.com/robot/send?access_token=7d0877aee8c8d5e1e3f622874a01a655ef5cb284fc134e1d5c7352b5c0dbdf0d -d "{'msgtype': 'markdown', 'markdown': {'title':'$title', 'text':'$content'}}"
curl
-H
'Content-Type: application/json;charset=utf-8'
-XPOST
https://oapi.dingtalk.com/robot/send?access_token
=
1625b01bebd353a1f80a31856185753da89281ea139e1fe63611eac8d59bcd55
-d
"{'msgtype': 'markdown', 'markdown': {'title':'
$title
', 'text':'
$content
'}}"
\ No newline at end of file
deploy/remove_old_docker.sh
0 → 100644
View file @
1053e0ab
#!/bin/bash
CONTAINER_NAME_PREFIX
=
$1
old_containers
=
$(
docker ps |
grep
$CONTAINER_NAME_PREFIX
|
awk
'{print $1}'
)
for
item
in
$old_containers
do
docker
rm
-f
$item
echo
"stop
$item
"
done
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