Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
I
install.api
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
Script
install.api
Commits
84e708c0
Commit
84e708c0
authored
Mar 12, 2020
by
金凯强
🎨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ci修改
parent
2a0fd1ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
.gitlab-ci.yml
.gitlab-ci.yml
+16
-16
No files found.
.gitlab-ci.yml
View file @
84e708c0
...
@@ -6,8 +6,8 @@ stages:
...
@@ -6,8 +6,8 @@ stages:
-
deploy
-
deploy
variables
:
variables
:
APP_NAME
:
# 这里写上app名称
APP_NAME
:
install_api
APP_CODE
:
# 这里写上appCode
APP_CODE
:
InstallAPI
APP_IMAGE
:
"
${HUANSI_REGISTRY_URL}/huansi/${APP_NAME}"
APP_IMAGE
:
"
${HUANSI_REGISTRY_URL}/huansi/${APP_NAME}"
before_script
:
before_script
:
...
@@ -36,17 +36,17 @@ push:
...
@@ -36,17 +36,17 @@ push:
only
:
only
:
-
web
-
web
deploy-dev
:
#deploy-dev:
stage
:
deploy
# stage: deploy
retry
:
2
# retry: 2
tags
:
# tags:
-
dev
# - dev
variables
:
# variables:
APP_CNAME
:
"
${APP_NAME}-${CI_COMMIT_REF_NAME}"
# APP_CNAME: "${APP_NAME}-${CI_COMMIT_REF_NAME}"
APP_PORT
:
# app的端口号
# APP_PORT: # app的端口号
script
:
# script:
-
docker ps -a | grep -i ${APP_CNAME} > /dev/null 2>&1 && docker stop ${APP_CNAME} && docker rm ${APP_CNAME}
# - docker ps -a | grep -i ${APP_CNAME} > /dev/null 2>&1 && docker stop ${APP_CNAME} && docker rm ${APP_CNAME}
-
docker images|grep none|grep ${APP_IMAGE} > /dev/null 2>&1 && docker images|grep none|grep ${APP_IMAGE}|awk '{print $3}'|xargs docker rmi
# - docker images|grep none|grep ${APP_IMAGE} > /dev/null 2>&1 && docker images|grep none|grep ${APP_IMAGE}|awk '{print $3}'|xargs docker rmi
-
docker run --name ${APP_CNAME} -d --env-file variable.env -p ${APP_PORT}:8080 -v /huansi/temp_data/mes_api:/huansi_app/static_file/temp ${APP_IMAGE}:${CI_COMMIT_REF_NAME}
# - docker run --name ${APP_CNAME} -d --env-file variable.env -p ${APP_PORT}:8080 -v /huansi/temp_data/mes_api:/huansi_app/static_file/temp ${APP_IMAGE}:${CI_COMMIT_REF_NAME}
only
:
# only:
-
dev
# - dev
\ No newline at end of file
\ 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