fix drone
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
2360ed406d
commit
cff79d6bf9
|
|
@ -0,0 +1,43 @@
|
||||||
|
kind: pipeline
|
||||||
|
type: ssh
|
||||||
|
name: jaecoo-be-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/jaecoo-be
|
||||||
|
- mkdir -p /opt/build/jaecoo-be
|
||||||
|
- cd /opt/build/jeacoo-be
|
||||||
|
- git clone http://38.47.180.165:3000/jaecoo/jaecoo-be.git
|
||||||
|
|
||||||
|
- name: build image
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- main
|
||||||
|
commands:
|
||||||
|
- docker login 38.47.180.165:3000 -u administrator -p HarborDockerImageRep0
|
||||||
|
- cd /opt/build/qudoco-be/jaecoo-be
|
||||||
|
- docker build -t 38.47.180.165:3000/jaecoo/jaecoo-be:main .
|
||||||
|
- docker push 38.47.180.165:3000/jaecoo/jaecoo-be:main
|
||||||
|
|
||||||
|
- name: deploy
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- main
|
||||||
|
commands:
|
||||||
|
- docker login 38.47.180.165:3000 -u administrator -p HarborDockerImageRep0
|
||||||
|
- docker pull 38.47.180.165:3000/jaecoo/jaecoo-be:main
|
||||||
|
- docker stop jaecoo-be || true
|
||||||
|
- docker rm jaecoo-be || true
|
||||||
|
- docker run -dt -p 8810:8800 --name jaecoo-be 38.47.180.165:3000/jaecoo/jaecoo-be:main
|
||||||
Loading…
Reference in New Issue