web-humas-fe/.drone.yml

50 lines
1.3 KiB
YAML
Raw Normal View History

2026-03-30 13:20:52 +00:00
kind: pipeline
type: ssh
name: web-humas-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-restructure
commands:
- rm -rf /opt/build/web-humas-fe
- mkdir -p /opt/build
- cd /opt/build
- git clone http://38.47.180.165:3000/humas/web-humas-fe.git
- name: build image
2026-04-01 15:13:11 +00:00
image: plugins/docker
settings:
repo: humas
tags: latest
2026-04-01 15:16:58 +00:00
no_cache: true
2026-04-01 15:13:11 +00:00
environment:
DOCKER_OPTS: "--dns 1.1.1.1"
2026-03-30 13:20:52 +00:00
when:
branch:
- dev-restructure
commands:
- docker login 38.47.180.165:3000 -u administrator -p HarborDockerImageRep0
- cd /opt/build/web-humas-fe
- docker build -t 38.47.180.165:3000/humas/web-humas-fe:$DRONE_BRANCH .
- docker push 38.47.180.165:3000/humas/web-humas-fe:$DRONE_BRANCH
- name: deploy
when:
branch:
- dev-restructure
commands:
- docker pull 38.47.180.165:3000/humas/web-humas-fe:$DRONE_BRANCH
- docker stop web-humas-fe|| true
- docker rm web-humas-fe || true
- docker run -dt -p 4100:4000 --restart always --name web-humas-fe 38.47.180.165:3000/humas/web-humas-fe:$DRONE_BRANCH