fix:drone yml
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
d34d071a45
commit
35d234e578
31
.drone.yml
31
.drone.yml
|
|
@ -15,28 +15,29 @@ steps:
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- main
|
- main
|
||||||
commands:
|
commands:
|
||||||
- rm -rf /opt/build/narasi-ahli-be
|
- rm -rf /opt/build/narasi-ahli-be
|
||||||
- mkdir -p /opt/build/narasi-ahli-be
|
- mkdir -p /opt/build/narasi-ahli-be
|
||||||
- cd /opt/build/narasi-ahli-be
|
- cd /opt/build
|
||||||
- git clone http://38.47.180.165:3000/narasi-ahli/narasiahli-be.git
|
- git clone http://38.47.180.165:3000/narasi-ahli/narasiahli-be.git
|
||||||
|
- cd /opt/build/narasi-ahli-be
|
||||||
|
|
||||||
- name: build image
|
- name: build image
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- main
|
- main
|
||||||
commands:
|
commands:
|
||||||
- docker login 38.47.180.165:3000 -u administrator -p HarborDockerImageRep0
|
- docker login 38.47.180.165:3000 -u administrator -p HarborDockerImageRep0
|
||||||
- cd /opt/build/narasi-ahli-be/narasiahli-be
|
- cd /opt/build/narasi-ahli-be/narasiahli-be
|
||||||
- docker build -t 38.47.180.165:3000/narasi-ahli/narasi-ahli-be:$DRONE_BRANCH .
|
- docker build -t 38.47.180.165:3000/narasi-ahli/narasi-ahli-be:$DRONE_BRANCH .
|
||||||
- docker push 38.47.180.165:3000/narasi-ahli/narasi-ahli-be:$DRONE_BRANCH
|
- docker push 38.47.180.165:3000/narasi-ahli/narasi-ahli-be:$DRONE_BRANCH
|
||||||
|
|
||||||
- name: deploy
|
- name: deploy
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- main
|
- main
|
||||||
commands:
|
commands:
|
||||||
- docker pull 38.47.180.165:3000/narasi-ahli/narasi-ahli-be:$DRONE_BRANCH
|
- docker pull 38.47.180.165:3000/narasi-ahli/narasi-ahli-be:$DRONE_BRANCH
|
||||||
- docker stop narasi-ahli-be || true
|
- docker stop narasi-ahli-be || true
|
||||||
- docker rm narasi-ahli-be || true
|
- docker rm narasi-ahli-be || true
|
||||||
- docker run -dt -e TZ=Asia/Jakarta -p 8801:8800 --restart always --name narasi-ahli-be 38.47.180.165:3000/narasi-ahli/narasi-ahli-be:$DRONE_BRANCH
|
- docker run -dt -e TZ=Asia/Jakarta -p 8801:8800 --restart always --name narasi-ahli-be 38.47.180.165:3000/narasi-ahli/narasi-ahli-be:$DRONE_BRANCH
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue