Adjust CI pipeline.
This commit is contained in:
@@ -1,43 +0,0 @@
|
|||||||
steps:
|
|
||||||
build-and-push:
|
|
||||||
image: woodpeckerci/plugin-docker-buildx:5.1
|
|
||||||
settings:
|
|
||||||
username:
|
|
||||||
from_secret: REGISTRY_USERNAME
|
|
||||||
password:
|
|
||||||
from_secret: REGISTRY_PASSWORD
|
|
||||||
registry: registry.binderlab.io
|
|
||||||
repo: registry.binderlab.io/harbormaster-client
|
|
||||||
tags: latest
|
|
||||||
dockerfile: docker/Dockerfile
|
|
||||||
context: .
|
|
||||||
push: true
|
|
||||||
when:
|
|
||||||
event: manual
|
|
||||||
|
|
||||||
deploy-static-site:
|
|
||||||
image: appleboy/drone-ssh
|
|
||||||
environment:
|
|
||||||
REGISTRY_USERNAME:
|
|
||||||
from_secret: REGISTRY_USERNAME
|
|
||||||
REGISTRY_PASSWORD:
|
|
||||||
from_secret: REGISTRY_PASSWORD
|
|
||||||
DEPLOY_PATH:
|
|
||||||
from_secret: DEPLOY_PATH
|
|
||||||
settings:
|
|
||||||
host: binderlab.io
|
|
||||||
username: binderb
|
|
||||||
envs:
|
|
||||||
- REGISTRY_USERNAME
|
|
||||||
- REGISTRY_PASSWORD
|
|
||||||
- DEPLOY_PATH
|
|
||||||
key:
|
|
||||||
from_secret: SSH_PRIVATE_KEY
|
|
||||||
script:
|
|
||||||
- echo "$REGISTRY_PASSWORD" | docker login registry.binderlab.io --username "$REGISTRY_USERNAME" --password-stdin
|
|
||||||
- docker pull registry.binderlab.io/harbormaster-client:latest
|
|
||||||
- docker create --name temp-harbormaster-client registry.binderlab.io/harbormaster-client:latest
|
|
||||||
- docker cp temp-harbormaster-client:/app/build/ $DEPLOY_PATH
|
|
||||||
- docker rm temp-harbormaster-client
|
|
||||||
when:
|
|
||||||
event: manual
|
|
||||||
18
.woodpecker/.build-push.yml
Normal file
18
.woodpecker/.build-push.yml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
steps:
|
||||||
|
build-and-push:
|
||||||
|
image: woodpeckerci/plugin-docker-buildx:5.1
|
||||||
|
settings:
|
||||||
|
username:
|
||||||
|
from_secret: REGISTRY_USERNAME
|
||||||
|
password:
|
||||||
|
from_secret: REGISTRY_PASSWORD
|
||||||
|
registry: registry.binderlab.io
|
||||||
|
repo: registry.binderlab.io/harbormaster-client
|
||||||
|
tags: latest
|
||||||
|
dockerfile: docker/Dockerfile
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
when:
|
||||||
|
event: push
|
||||||
|
branch:
|
||||||
|
- main
|
||||||
@@ -22,6 +22,7 @@ steps:
|
|||||||
- echo "$REGISTRY_PASSWORD" | docker login registry.binderlab.io --username "$REGISTRY_USERNAME" --password-stdin
|
- echo "$REGISTRY_PASSWORD" | docker login registry.binderlab.io --username "$REGISTRY_USERNAME" --password-stdin
|
||||||
- docker pull registry.binderlab.io/harbormaster-client:latest
|
- docker pull registry.binderlab.io/harbormaster-client:latest
|
||||||
- docker create --name temp-harbormaster-client registry.binderlab.io/harbormaster-client:latest
|
- docker create --name temp-harbormaster-client registry.binderlab.io/harbormaster-client:latest
|
||||||
|
- pwd
|
||||||
- docker cp temp-harbormaster-client:/app/build/ $DEPLOY_PATH
|
- docker cp temp-harbormaster-client:/app/build/ $DEPLOY_PATH
|
||||||
- docker rm temp-harbormaster-client
|
- docker rm temp-harbormaster-client
|
||||||
when:
|
when:
|
||||||
|
|||||||
Reference in New Issue
Block a user