-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
52 lines (46 loc) · 1.25 KB
/
.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
image: mtr.devops.telekom.de/mcsps/mcsps-tools:latest
# image: docker:latest
cache: {}
# beware of the rate limits
# https://developer.github.com/v3/#rate-limiting
# anonymous: 60 per hour
# registered: 5000 per hour
before_script:
- apk add --update --no-cache findutils bash curl wget git jq openssh-client && apk upgrade
- mkdir -p ~/.ssh/
- ssh-keyscan -v github.com
- ssh-keyscan github.com >> ~/.ssh/known_hosts
- echo "done ssh-keyscan"
- chmod 644 ~/.ssh/known_hosts
- eval $(ssh-agent -s)
- echo "$GITHUB_SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- git config --global user.email '[email protected]'
- git config --global user.name 'Deploy User'
- echo "done before_script"
variables:
BRANCH: $CI_COMMIT_REF_NAME
# GITHUB_OAUTH: OAuth token to access Github API
# DEPLOY_TOKEN: Deploy token for Github
# GITHUB_USER: Github m2m user
# GITHUB_PASSWORD: Github m2m password
# GITHUB_SSH_PRIVATE_KEY: Github m2m ssh private key
stages:
- fetchreleasenote
- publishgithub
check-release:
tags:
- k8s-executor
stage: fetchreleasenote
script:
- ci/fetchrelease.sh
except:
- tags
- pipelines
publish-github:
tags:
- k8s-executor
stage: publishgithub
script:
- ci/publishgithub.sh
except:
- tags