add deploy task

This commit is contained in:
Pim Kunis 2023-05-20 01:33:36 +02:00
parent 54b52b5aa3
commit ca028b8ff7

View file

@ -12,7 +12,7 @@ resources:
password: ((registry_token))
jobs:
- name: build-static-website
- name: build-and-deploy-static-website
plan:
- get: site-repo
trigger: true
@ -59,3 +59,23 @@ jobs:
- put: site-registry-image
params:
image: image/image.tar
- task: deploy-site
config:
platform: linux
image_resource:
type: registry-image
source:
repository: raesene/alpine-containertools
params:
DOCKER_HOST: ssh://root@maestro.dmz
run:
path: sh
args:
- -exc
- |
ls -lash
mkdir $HOME/.ssh
echo -e "Host maestro.dmz\n\tStrictHostKeyChecking no" > $HOME/.ssh/config
echo "((private_key))" > $HOME/.ssh/id_ed25519
chmod 600 $HOME/.ssh/id_ed25519
docker service update static_static --force