Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cicd
Overview
Overview
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
郑天保
cicd
Commits
379a984b
Commit
379a984b
authored
Jan 02, 2019
by
zhengtianbao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add gitlab ci yaml
parent
bbaa4715
Pipeline
#1
failed with stage
in 19 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
.gitlab-ci.yml
.gitlab-ci.yml
+17
-0
No files found.
.gitlab-ci.yml
0 → 100644
View file @
379a984b
stages
:
-
deploy
docker-deploy
:
stage
:
deploy
script
:
-
docker build -t testweb .
# 删除已经在运行的容器
-
if [ $(docker ps -aq --filter name=testweb ) ]; then docker rm -f testweb; fi
# 通过镜像启动容器,并把本机8000端口映射到容器8000端口
-
docker run -d -p 5000:5000 --name testweb testweb
tags
:
# 执行Job的服务器
-
test
only
:
# 只有在master分支才会执行
-
master
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