2020-07-17 15:08:28 +00:00
|
|
|
kind: pipeline
|
2020-08-04 11:29:43 +00:00
|
|
|
name: Push Content
|
2020-07-17 15:08:28 +00:00
|
|
|
type: docker
|
|
|
|
|
|
|
|
steps:
|
2020-08-04 14:48:14 +00:00
|
|
|
- name: notify
|
|
|
|
image: plugins/matrix
|
|
|
|
settings:
|
2020-08-04 14:50:59 +00:00
|
|
|
template: >
|
2020-08-04 14:50:40 +00:00
|
|
|
{{#success build.status}}
|
|
|
|
build {{build.number}} succeeded. Good job.
|
|
|
|
{{else}}
|
|
|
|
build {{build.number}} failed. Fix me please.
|
|
|
|
{{/success}}
|
2020-08-04 14:48:14 +00:00
|
|
|
homeserver:
|
|
|
|
from_secret: matrix-homeserver
|
|
|
|
roomid:
|
|
|
|
from_secret: matrix-roomid
|
|
|
|
username:
|
|
|
|
from_secret: matrix-username
|
|
|
|
password:
|
|
|
|
from_secret: matrix-pass
|
2020-08-04 14:50:40 +00:00
|
|
|
|
2020-08-04 14:48:50 +00:00
|
|
|
|
2020-08-04 11:29:43 +00:00
|
|
|
- name: Push Content
|
2020-08-04 11:36:48 +00:00
|
|
|
image: alpine
|
2020-07-17 15:08:28 +00:00
|
|
|
commands:
|
2020-08-04 11:36:20 +00:00
|
|
|
- apk add --no-cache openssh-client ca-certificates bash
|
2020-08-04 11:34:50 +00:00
|
|
|
- apk add rsync
|
2020-08-04 11:30:13 +00:00
|
|
|
- echo Début du Push
|
2020-08-04 11:29:43 +00:00
|
|
|
- eval `ssh-agent -s`
|
|
|
|
- echo "$SSH_KEY" | ssh-add -
|
|
|
|
- mkdir -p ~/.ssh
|
|
|
|
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
|
|
|
|
- rsync -rv --delete -e "ssh -p 22" ./ sshcontent@91.121.90.228:~/raw.opytex.org/www/ --checksum
|
|
|
|
environment:
|
|
|
|
SSH_KEY:
|
2020-08-04 11:33:35 +00:00
|
|
|
from_secret: sshcontent-key
|
2020-08-04 11:29:43 +00:00
|
|
|
|
2020-07-17 15:38:23 +00:00
|
|
|
|