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 15:01:04 +00:00
|
|
|
- name: notify-start
|
2020-08-04 15:00:41 +00:00
|
|
|
image: plugins/matrix
|
|
|
|
settings:
|
|
|
|
template: >
|
|
|
|
*Build started*: {{ repo.owner }}/{{ repo.name }}
|
|
|
|
<{{ build.link }}|Visit build page ↗>
|
|
|
|
homeserver:
|
|
|
|
from_secret: matrix-homeserver
|
|
|
|
roomid:
|
|
|
|
from_secret: matrix-roomid
|
|
|
|
username:
|
|
|
|
from_secret: matrix-username
|
|
|
|
password:
|
|
|
|
from_secret: matrix-pass
|
|
|
|
|
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 15:00:41 +00:00
|
|
|
|
2020-08-04 15:01:04 +00:00
|
|
|
- name: notify-result
|
2020-08-04 14:52:50 +00:00
|
|
|
image: plugins/matrix
|
|
|
|
settings:
|
|
|
|
template: >
|
|
|
|
{{#success build.status}}
|
2020-08-04 15:00:41 +00:00
|
|
|
*Build {{build.number}}* on {{ repo.owner }}/{{ repo.name }} succeeded. Good job.
|
2020-08-04 14:52:50 +00:00
|
|
|
{{else}}
|
2020-08-04 15:00:41 +00:00
|
|
|
*Build {{build.number}}* on {{ repo.owner }}/{{ repo.name }} failed. Fix me please.
|
2020-08-04 14:52:50 +00:00
|
|
|
{{/success}}
|
2020-08-04 15:00:41 +00:00
|
|
|
<{{ build.link }}|Visit build page ↗>
|
2020-08-04 14:52:50 +00:00
|
|
|
homeserver:
|
|
|
|
from_secret: matrix-homeserver
|
|
|
|
roomid:
|
|
|
|
from_secret: matrix-roomid
|
|
|
|
username:
|
|
|
|
from_secret: matrix-username
|
|
|
|
password:
|
2020-08-04 14:53:31 +00:00
|
|
|
from_secret: matrix-pass
|