Adjust pipeline.

This commit is contained in:
Ben Binder
2025-02-23 23:40:02 -06:00
parent 2f63f3b805
commit b33348b8a6
2 changed files with 19 additions and 35 deletions

View File

@@ -1,35 +0,0 @@
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
privileged: true
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

19
.woodpecker.yml Normal file
View File

@@ -0,0 +1,19 @@
pipeline:
build-and-push:
image: woodpeckerci/plugin-docker-buildx
settings:
registry: registry.binderlab.io
repo: registry.binderlab.io/harbormaster
tags: latest
deploy:
image: appleboy/drone-ssh
settings:
host: binderlab.io
username: binderb
key: $SSH_PUBLIC_KEY
script:
- 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