update drone.yml
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Anang Yusman 2026-02-18 15:37:51 +08:00
parent 439d2b1e54
commit 79dcd73971
1 changed files with 11 additions and 23 deletions

View File

@ -2,9 +2,6 @@ kind: pipeline
type: ssh
name: arah-negeri-build-deploy
clone:
disable: true
server:
host:
from_secret: ssh_host
@ -17,7 +14,6 @@ steps:
- name: prepare repo
when:
branch:
- dev-1
- main
commands:
- rm -rf /opt/build/arah-negeri
@ -25,23 +21,20 @@ steps:
- cd /opt/build
- git clone http://38.47.180.165:3000/medol/web-arah-negeri.git
- name: build app
when:
branch:
- dev-1
- main
- name: build fe
commands:
- cd /opt/build/arah-negeri
- git checkout $DRONE_BRANCH
- git pull
- npm install
- 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
when:
branch:
- dev-1
- main
commands:
- docker login 38.47.180.165:3000 -u administrator -p HarborDockerImageRep0
- cd /opt/build/arah-negeri
@ -53,12 +46,7 @@ steps:
branch:
- main
commands:
- docker pull 38.47.180.165:3000/medol/web-arah-negeri.git:$DRONE_BRANCH
- docker stop arah-negeri || true
- docker rm arah-negeri || true
- docker run -d \
-p 4252:3000 \
--name arah-negeri \
--network=apps_network \
--restart=always \
38.47.180.165:3000/medol/web-arah-negeri.git:$DRONE_BRANCH
- docker pull 38.47.180.165:3000/medol/web-arah-negeri:$DRONE_BRANCH
- docker stop web-arah-negeri || true
- docker rm 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