fixing drone
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
5a5c40839e
commit
c027c84c16
25
.drone.yml
25
.drone.yml
|
|
@ -2,9 +2,6 @@ kind: pipeline
|
||||||
type: ssh
|
type: ssh
|
||||||
name: arah-negeri-build-deploy
|
name: arah-negeri-build-deploy
|
||||||
|
|
||||||
clone:
|
|
||||||
disable: true
|
|
||||||
|
|
||||||
server:
|
server:
|
||||||
host:
|
host:
|
||||||
from_secret: ssh_host
|
from_secret: ssh_host
|
||||||
|
|
@ -24,32 +21,22 @@ steps:
|
||||||
- cd /opt/build
|
- cd /opt/build
|
||||||
- git clone http://38.47.180.165:3000/medol/web-arah-negeri.git
|
- git clone http://38.47.180.165:3000/medol/web-arah-negeri.git
|
||||||
|
|
||||||
- name: build fe
|
|
||||||
commands:
|
|
||||||
- export NVM_DIR="$HOME/.nvm"
|
|
||||||
- source ~/.nvm/nvm.sh
|
|
||||||
- nvm use 18
|
|
||||||
- node -v
|
|
||||||
- npm install --legacy-peer-deps
|
|
||||||
- npm run build
|
|
||||||
|
|
||||||
- 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/web-arah-negeri
|
- cd /opt/build/web-arah-negeri
|
||||||
- docker compose build
|
- docker build -t 38.47.180.165:3000/medol/arah-negeri:$DRONE_BRANCH .
|
||||||
- docker push 38.47.180.165:3000/medol/web-arah-negeri.git:$DRONE_BRANCH
|
- docker push 38.47.180.165:3000/medol/arah-negeri:$DRONE_BRANCH
|
||||||
|
|
||||||
- name: deploy
|
- name: deploy
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- main
|
- main
|
||||||
commands:
|
commands:
|
||||||
- docker pull 38.47.180.165:3000/medol/web-arah-negeri:$DRONE_BRANCH
|
- docker pull 38.47.180.165:3000/medol/arah-negeri:$DRONE_BRANCH
|
||||||
- docker stop web-arah-negeri || true
|
- docker stop new-web-arah-negeri || true
|
||||||
- docker rm web-arah-negeri || true
|
- docker rm new-web-arah-negeri || true
|
||||||
- sudo docker run -dt -p 4252:3000 --restart always --name web-arah-negeri 38.47.185.86:8900/medols/web-arah-negeri:dev:$DRONE_BRANCH
|
- docker run -dt -p 4252:3000 --restart always --name new-web-arah-negeri 38.47.180.165:3000/medol/arah-negeri:$DRONE_BRANCH
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue