kontenhumas-fe/.drone.yml

44 lines
1.2 KiB
YAML
Raw Permalink Normal View History

2026-02-19 04:02:39 +00:00
kind: pipeline
2026-02-19 05:27:04 +00:00
type: ssh
2026-02-19 04:02:39 +00:00
name: kontenhumas-fe-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:
- dev-1
- main
commands:
2026-02-19 06:44:42 +00:00
- rm -rf /opt/build/kontenhumas-fe
2026-02-19 04:02:39 +00:00
- mkdir -p /opt/build
- cd /opt/build
- git clone http://38.47.180.165:3000/kontenhumas/kontenhumas-fe.git
- name: build image
when:
branch:
- dev-1
- main
commands:
- docker login 38.47.180.165:3000 -u administrator -p HarborDockerImageRep0
2026-02-19 06:45:11 +00:00
- cd /opt/build/kontenhumas-fe
2026-02-19 04:02:39 +00:00
- docker build -t 38.47.180.165:3000/kontenhumas/kontenhumas-fe:$DRONE_BRANCH .
- docker push 38.47.180.165:3000/kontenhumas/kontenhumas-fe:$DRONE_BRANCH
- name: deploy
when:
branch:
- main
commands:
- docker pull 38.47.180.165:3000/kontenhumas/kontenhumas-fe:$DRONE_BRANCH
- docker stop new-netidhub || true
- docker rm new-netidhub || true
2026-02-19 04:17:43 +00:00
- docker run -dt -p 4242:3000 --restart always --name new-netidhub 38.47.180.165:3000/kontenhumas/kontenhumas-fe:$DRONE_BRANCH