Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
ppt_server
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
Li Feifei
ppt_server
Commits
67404cfb
Commit
67404cfb
authored
Feb 23, 2020
by
qp65053
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ci/cd
parent
76f7aea0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
0 deletions
+68
-0
.gitlab-ci.yml
.gitlab-ci.yml
+45
-0
Dockerfile
Dockerfile
+23
-0
No files found.
.gitlab-ci.yml
0 → 100644
View file @
67404cfb
stages
:
-
build
-
make
-
deploy
variables
:
VERSION
:
"
3.$CI_PIPELINE_ID"
BUILDDIR
:
"
/builds"
LOCALDIR
:
"
/opt/gitlab-runner/builds"
NAMESPACE
:
"
srs-prd"
ppt-server-build
:
stage
:
build
tags
:
-
test-ppt-server-shell
only
:
-
test
retry
:
2
script
:
#- GO111MODULE=auto
#- mkdir -p ${BUILDDIR}/ppt-server
#- rm -rf ${BUILDDIR}/ppt-server/*
#- go build -o ${BUILDDIR}/ppt-server/ppt-server
#- cp -f Dockerfile ${BUILDDIR}/ppt-server/
#- cp -rf conf ${BUILDDIR}/ppt-server/
#- cd ${BUILDDIR}/ppt-server/
-
docker build -t registry.cn-beijing.aliyuncs.com/offcn_llive/ppt-server:$VERSION .
-
docker push registry.cn-beijing.aliyuncs.com/offcn_llive/ppt-server:$VERSION
-
docker rmi registry.cn-beijing.aliyuncs.com/offcn_llive/ppt-server:$VERSION &
ppt-server-deploy
:
stage
:
deploy
tags
:
-
test-ppt-server-shell
only
:
-
test
retry
:
2
before_script
:
-
CLUSTER="hb2-center"
script
:
-
set -x
-
for cs in ${CLUSTER[@]};do \
-
kubectl set image -n ${NAMESPACE} deployment/ppt-server-deployment ppt-server=registry.cn-beijing.aliyuncs.com/offcn_llive/ppt-server:$VERSION; \
-
done
\ No newline at end of file
Dockerfile
0 → 100644
View file @
67404cfb
FROM
registry.cn-beijing.aliyuncs.com/offcn_llive/go:build as build
COPY
. /tmp/develop
RUN
cd
/tmp/develop
\
&&
go build
-o
/tmp/ppt-server main.go
#FROM debian:buster-slim
FROM
registry.cn-beijing.aliyuncs.com/offcn_llive/go:runtime-alpine-3.10
ENV
branch test
ENV
rb_host rmq-cluster-balancer
ENV
rb_user video
ENV
rb_pass 1fqH4WFR19uckgRyHzgISw
ENV
read_sql rr-2ze1xl88115o8i2umlo.mysql.rds.aliyuncs.com
ENV
read_user video
ENV
read_pass 'vlty&AxMwT$lmLv6bN8dkDuBYlh%N5pe'
ENV
write_sql rm-2zevlk47ul0ovuci80o.mysql.rds.aliyuncs.com
ENV
write_user video
ENV
write_pass 'vlty&AxMwT$lmLv6bN8dkDuBYlh%N5pe'
COPY
--chown=1000:1000 --from=build /tmp/ppt-server /src/ppt-server/
COPY
--chown=1000:1000 conf/ /src/ppt-server/conf
RUN
chmod +x /src/ppt-server/ppt-server
WORKDIR
/src/ppt-server/
CMD
["./ppt-server"]
\ 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