add deploy task
This commit is contained in:
parent
54b52b5aa3
commit
ca028b8ff7
1 changed files with 21 additions and 1 deletions
22
pipeline.yml
22
pipeline.yml
|
@ -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
|
||||
|
|
Reference in a new issue