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 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
@ -17,7 +14,6 @@ steps:
- name: prepare repo - name: prepare repo
when: when:
branch: branch:
- dev-1
- main - main
commands: commands:
- rm -rf /opt/build/arah-negeri - rm -rf /opt/build/arah-negeri
@ -25,23 +21,20 @@ 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 app - name: build fe
when:
branch:
- dev-1
- main
commands: commands:
- cd /opt/build/arah-negeri - export NVM_DIR="$HOME/.nvm"
- git checkout $DRONE_BRANCH - source ~/.nvm/nvm.sh
- git pull - nvm use 18
- npm install - node -v
- npm install --legacy-peer-deps
- npm run build - npm run build
- name: build image - name: build image
when: when:
branch: branch:
- dev-1
- 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/arah-negeri - cd /opt/build/arah-negeri
@ -53,12 +46,7 @@ steps:
branch: branch:
- main - main
commands: commands:
- docker pull 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 arah-negeri || true - docker stop web-arah-negeri || true
- docker rm arah-negeri || true - docker rm web-arah-negeri || true
- docker run -d \ - 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
-p 4252:3000 \
--name arah-negeri \
--network=apps_network \
--restart=always \
38.47.180.165:3000/medol/web-arah-negeri.git:$DRONE_BRANCH