fix drone
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
45d40186ea
commit
16f18c8001
|
|
@ -0,0 +1,42 @@
|
|||
kind: pipeline
|
||||
type: ssh
|
||||
name: info-kreasi-build-deploy
|
||||
|
||||
server:
|
||||
host:
|
||||
from_secret: ssh_host
|
||||
user:
|
||||
from_secret: ssh_user
|
||||
ssh_key:
|
||||
from_secret: ssh_key
|
||||
|
||||
steps:
|
||||
- name: prepare repo
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
commands:
|
||||
- rm -rf /opt/build/web-info-kreasi
|
||||
- mkdir -p /opt/build
|
||||
- cd /opt/build
|
||||
- git clone http://38.47.180.165:3000/medol/web-info-kreasi.git
|
||||
|
||||
- name: build image
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
commands:
|
||||
- docker login 38.47.180.165:3000 -u administrator -p HarborDockerImageRep0
|
||||
- cd /opt/build/web-info-kreasi
|
||||
- docker build -t 38.47.180.165:3000/medol/info-kreasi:$DRONE_BRANCH .
|
||||
- docker push 38.47.180.165:3000/medol/info-kreasi:$DRONE_BRANCH
|
||||
|
||||
- name: deploy
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
commands:
|
||||
- docker pull 38.47.180.165:3000/medol/info-kreasi:$DRONE_BRANCH
|
||||
- docker stop web-info-kreasi || true
|
||||
- docker rm web-info-kreasi || true
|
||||
- docker run -dt -p 4248:3000 --restart always --name web-info-kreasi 38.47.180.165:3000/medol/info-kreasi:$DRONE_BRANCH
|
||||
Loading…
Reference in New Issue