blob: 64979bee5adf53296a958d690e6dff1aefdfd6db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
image: docker:stable
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "push"
when: never
- if: $CI_PIPELINE_SOURCE == "schedule"
when: always
stages:
- main
main-job:
stage: main
before_script:
- apk update && apk add git jq make curl python3 bash openssh-client
- git config user.email "_@users.noreply.gitlab.com"
- git config user.name "Snapshot Automation Bot"
- git remote add cdci_origin git@gitlab.com:$CI_PROJECT_PATH.git
- eval `ssh-agent -s`
- echo "${SSH_PRIVATE_KEY_TOOLKIT}" | tr -d '\r' | ssh-add - > /dev/null
- echo "${SSH_PRIVATE_KEY_MIRROR}" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- touch ~/.ssh/config
- echo -e "Host gitlab.com\n\tStrictHostKeyChecking no" >> ~/.ssh/config
- echo "$SSH_KNOWN_HOSTS_MIRROR" >> ~/.ssh/known_hosts
- chmod 600 ~/.ssh/config ~/.ssh/known_hosts
script:
- git checkout gitlab
- make clean
- make
- git add --all
- git commit -sm 'Data snapshot commit'
- git push cdci_origin gitlab
- ssh -T cdci@embla.dev.snart.me
|