fix drone

This commit is contained in:
Anang Yusman 2026-02-24 14:37:05 +08:00
parent 7f465fdfa6
commit 43f30e44ba
1 changed files with 42 additions and 0 deletions

42
.drone.yml Normal file
View File

@ -0,0 +1,42 @@
kind: pipeline
type: ssh
name: isu-kini-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/web-isu-kini
- mkdir -p /opt/build
- cd /opt/build
- git clone http://38.47.180.165:3000/medol/web-isu-kini.git
- name: build image
when:
branch:
- main
commands:
- docker login 38.47.180.165:3000 -u administrator -p HarborDockerImageRep0
- cd /opt/build/web-isu-kini
- docker build -t 38.47.180.165:3000/medol/web-isu-kini:$DRONE_BRANCH .
- docker push 38.47.180.165:3000/medol/web-isu-kini:$DRONE_BRANCH
- name: deploy
when:
branch:
- main
commands:
- docker pull 38.47.180.165:3000/medol/web-arah-negeri:$DRONE_BRANCH
- docker stop web-isu-kini || true
- docker rm web-isu-kini || true
- docker run -dt -p 4247:3000 --restart always --name web-isu-kini 38.47.180.165:3000/medol/web-isu-kini:$DRONE_BRANCH