-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
37 lines (33 loc) · 944 Bytes
/
.gitlab-ci.yml
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
image: mtr.devops.telekom.de/mcsps/mcsps-tools:latest
#
#
before_script:
- apk add openssh-client
- mkdir -p ~/.ssh/
- ssh-keyscan github.com >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- eval $(ssh-agent -s)
- echo "$GITHUB_SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- echo "finish before_script"
stages:
- kubesec
- deliver-github
kubesec:
stage: kubesec
tags:
- k8s-executor
script:
- for i in `find . -name "*.yaml"`;do echo "=====$i====="; curl -sSX POST --data-binary @$i https://kubesec.mcsps.telekomcloud.com/scan/;done
deliver-github:
stage: deliver-github
tags:
- k8s-executor
script:
- git config --global user.name "MCSPS Dol Sync"
- git config --global user.email "mcsps-dis@telekom.de"
- git remote remove github || true
- git remote add github git@github.com:mcsps/use-cases.git
- git remote -v
- git fetch github
- git push github --force HEAD:master
# vim: sts=2 sw=2 ts=2 et: