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
46c6850f
Commit
46c6850f
authored
Jan 09, 2025
by
mingyard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:gitlab
parent
4be5d60a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
0 deletions
+60
-0
.gitlab-ci.yml
.gitlab-ci.yml
+60
-0
No files found.
.gitlab-ci.yml
0 → 100644
View file @
46c6850f
image
:
docker:stable
variables
:
IMAGE_NAME
:
"
work-server"
IMAGE_TAG
:
"
prod"
TITLE
:
"
translation-server正式环境更新"
CONTENT
:
${CI_COMMIT_TITLE// /-}
VIEW_URL
:
"
https://beta.laihua.com"
PIPELINES_URL
:
"
https://gitlab.laihua.com/qinmingyuan/translation-server/pipelines"
# 定义阶段的执行顺序 分为 3个阶段
stages
:
-
stage-test
-
stage-build
-
stage-deploy
-
stage-cleanup
test_job
:
stage
:
stage-test
tags
:
-
admin-api-runner
only
:
-
release
script
:
-
echo "开始单元测试..."
-
echo "单元测试完成!"
docker_job
:
stage
:
stage-build
tags
:
-
admin-api-runner
only
:
-
release
script
:
-
echo "开始docker镜像构建..."
-
docker login -u $CN_HUAWEIYUNAK -p $CN_HUAWEIYUNSK swr.cn-south-1.myhuaweicloud.com;
-
echo "Tagging Docker image..."
-
docker build -t swr.cn-south-1.myhuaweicloud.com/laihua-swr/${IMAGE_NAME}:${IMAGE_TAG} .
-
echo "Pushing Docker image..."
-
docker push swr.cn-south-1.myhuaweicloud.com/laihua-swr/${IMAGE_NAME}:${IMAGE_TAG}
-
echo "docker镜像构建完成!"
when
:
manual
allow_failure
:
false
deploy_job
:
stage
:
stage-deploy
tags
:
-
admin-api-runner
only
:
-
release
script
:
-
echo "请在rancher中部署..."
dependencies
:
-
docker_job
cleanup_job
:
stage
:
stage-cleanup
script
:
-
sudo rm -rf ./node_modules
when
:
on_failure
\ No newline at end of file
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