feat:drone
This commit is contained in:
parent
84b84c0fec
commit
4b6966a10c
|
|
@ -0,0 +1,34 @@
|
||||||
|
kind: pipeline
|
||||||
|
type: ssh
|
||||||
|
name: humas-fe-build
|
||||||
|
|
||||||
|
server:
|
||||||
|
host:
|
||||||
|
from_secret: ssh_host
|
||||||
|
user:
|
||||||
|
from_secret: ssh_user
|
||||||
|
ssh_key:
|
||||||
|
from_secret: ssh_key
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: prepare repo
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- prod
|
||||||
|
commands:
|
||||||
|
- rm -rf /opt/build/web-humas-fe
|
||||||
|
- mkdir -p /opt/build/web-humas-fe
|
||||||
|
- cd /opt/build
|
||||||
|
- git clone http://38.47.180.165:3000/humas/web-humas-fe.git
|
||||||
|
- cd /opt/build/web-humas-fe
|
||||||
|
- git checkout $DRONE_BRANCH
|
||||||
|
|
||||||
|
- name: build image
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- prod
|
||||||
|
commands:
|
||||||
|
- docker login 38.47.180.165:3000 -u administrator -p HarborDockerImageRep0
|
||||||
|
- cd /opt/build/web-humas-fe
|
||||||
|
- docker build -t 38.47.180.165:3000/humas/web-humas-fe:$DRONE_BRANCH .
|
||||||
|
- docker push 38.47.180.165:3000/humas/web-humas-fe:$DRONE_BRANCH
|
||||||
Loading…
Reference in New Issue