Files
harbormaster-server/.drone.yml
2025-02-23 23:03:18 -06:00

34 lines
958 B
YAML

kind: pipeline
type: docker
name: deploy-harbormaster
trigger:
event:
- custom
steps:
- name: build-and-push
image: plugins/docker
settings:
username:
from_secret: DOCKER_USERNAME
password:
from_secret: DOCKER_PASSWORD
repo: registry.binderlab.io/harbormaster
registry: registry.binderlab.io
tags: latest
- name: deploy
image: plugins/docker
environment:
DOCKER_USERNAME:
from_secret: DOCKER_USERNAME
DOCKER_PASSWORD:
from_secret: DOCKER_PASSWORD
commands:
- echo "Deploying new version..."
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin registry.binderlab.io
- docker pull registry.binderlab.io/harbormaster:latest
- docker stop harbormaster || true
- docker rm harbormaster || true
- docker run -d --name harbormaster -p 8080:8080 registry.binderlab.io/harbormaster:latest