2026-02-18 06:52:18 +00:00
|
|
|
kind: pipeline
|
|
|
|
|
type: ssh
|
|
|
|
|
name: arah-negeri-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:
|
2026-02-18 08:09:19 +00:00
|
|
|
- rm -rf /opt/build/web-arah-negeri
|
2026-02-18 06:52:18 +00:00
|
|
|
- mkdir -p /opt/build
|
|
|
|
|
- cd /opt/build
|
2026-02-18 08:02:33 +00:00
|
|
|
- git clone http://38.47.180.165:3000/medol/web-arah-negeri.git
|
2026-02-18 06:52:18 +00:00
|
|
|
|
|
|
|
|
- name: build image
|
|
|
|
|
when:
|
|
|
|
|
branch:
|
|
|
|
|
- main
|
|
|
|
|
commands:
|
|
|
|
|
- docker login 38.47.180.165:3000 -u administrator -p HarborDockerImageRep0
|
2026-02-18 08:09:19 +00:00
|
|
|
- cd /opt/build/web-arah-negeri
|
2026-02-19 03:46:34 +00:00
|
|
|
- docker build -t 38.47.180.165:3000/medol/arah-negeri:$DRONE_BRANCH .
|
|
|
|
|
- docker push 38.47.180.165:3000/medol/arah-negeri:$DRONE_BRANCH
|
2026-02-18 06:52:18 +00:00
|
|
|
|
|
|
|
|
- name: deploy
|
|
|
|
|
when:
|
|
|
|
|
branch:
|
|
|
|
|
- main
|
|
|
|
|
commands:
|
2026-02-19 03:46:34 +00:00
|
|
|
- docker pull 38.47.180.165:3000/medol/arah-negeri:$DRONE_BRANCH
|
2026-02-24 06:06:20 +00:00
|
|
|
- docker stop web-arah-negeri || true
|
|
|
|
|
- docker rm web-arah-negeri || true
|
2026-02-24 06:14:27 +00:00
|
|
|
- docker run -dt -p 4252:3000 --restart always --name web-arah-negeri 38.47.180.165:3000/medol/arah-negeri:$DRONE_BRANCH
|