Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
translation-server
Project
Project
Details
Activity
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
qinmingyuan
translation-server
Commits
235fe4dd
Commit
235fe4dd
authored
Jan 11, 2025
by
mingyard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:gitlab cli
parent
f39804e7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
.gitlab-ci.yml
.gitlab-ci.yml
+3
-6
No files found.
.gitlab-ci.yml
View file @
235fe4dd
...
...
@@ -46,18 +46,15 @@ docker_job:
deploy_job
:
stage
:
stage-deploy
image
:
curlimages/curl:latest
tags
:
-
admin-api-runner
only
:
-
dev
script
:
-
echo "开始Rancher部署..."
# 根据返回的结果判断是否部署成功
-
response=$(curl -s -o /dev/null -w "%{http_code}" -u "${RANCHER_ACCESS_KEY}:${RANCHER_SECRET_KEY}" \
-X POST \
"https://rancher.laihua.com/v3/project/local:p-b6lgm/workloads/deployment:test-domestic:translation-server?action=redeploy")
-
if [ "$response" -eq 200 ]; then echo "Rancher部署成功!"; else echo "Rancher部署失败!"; exit 1; fi
-
'
curl
--request
POST
--header
"Authorization:
Bearer
${RANCHER_ACCESS_KEY}:${RANCHER_SECRET_KEY}"
"https://rancher.laihua.com/v3/project/local:p-b6lgm/workloads/deployment:test-domestic:translation-server?action=redeploy"'
-
echo "Rancher部署完成!"
dependencies
:
-
docker_job
...
...
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