-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
59 lines (54 loc) · 1.64 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
53
54
55
56
57
58
59
---
stages: [process, schedule]
variables:
BUILD_REPO: garuda
GIT_AUTHOR_EMAIL: [email protected]
GIT_AUTHOR_NAME: GitLab CI
REDIS_SSH_HOST: builds.garudalinux.org
REDIS_SSH_PORT: 400
REDIS_SSH_USER: package-deployer
REPO_NAME: garuda
CI_HUMAN_REVIEW: "true"
REPO_URL: https://oauth2:[email protected]/garuda-linux/pkgbuilds-aur
default:
before_script:
- apk add --no-cache --upgrade git bash findutils grep curl jq shfmt rsync diffutils gawk
- git remote set-url origin $REPO_URL
- git fetch --tags --all --depth 20
on-commit:
stage: process
image: alpine:latest
script:
- .ci/on-commit.sh
artifacts:
paths:
- .ci/schedule-params.txt
expire_in: 1 hour
resource_group: chaotic
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $SCHEDULED != "1"
on-schedule:
stage: process
image: alpine:latest
script:
- .ci/on-schedule.sh
artifacts:
paths:
- .ci/schedule-params.txt
expire_in: 1 hour
resource_group: chaotic
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $SCHEDULED == "1"
do-schedule:
stage: schedule
image:
name: registry.gitlab.com/garuda-linux/tools/chaotic-manager/manager
entrypoint: [""] # override entrypoint as we don't have the needed key during first execution yet
before_script:
- '[[ -z ${DEPLOY_KEY+x} ]] && echo "No deploy key available, backing off!" && exit 1'
- echo "$DEPLOY_KEY" >/app/sshkey
- chmod 400 /app/sshkey
script:
- if [ -f .ci/schedule-params.txt ]; then read -ra arr < ".ci/schedule-params.txt"; /entry_point.sh "${arr[@]}"; fi
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH