-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
34 lines (30 loc) · 813 Bytes
/
.gitlab-ci.yml
File metadata and controls
34 lines (30 loc) · 813 Bytes
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
image: python:3.9-slim
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.pip-cache"
cache:
paths:
- .pip-cache/
stages:
- sync-teams
sync-teams:
stage: sync-teams
script:
- pip install -r src/scripts/gitlab_team_resource_manager/requirements.txt
- |
if [ ! -f $STATE_FILE ]; then
echo '{"current_team_index": 0}' > $STATE_FILE
fi
- python src/scripts/gitlab_team_resource_manager/gitlab_team_resource_manager.py
variables:
JIT_CLIENT_ID: ${JIT_CLIENT_ID}
JIT_CLIENT_SECRET: ${JIT_CLIENT_SECRET}
TEAM_METADATA_FILE: "team_metadata.json"
TEAM_STATE_FILE: ${STATE_FILE}
environment:
name: production
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
when: always
- if: $CI_PIPELINE_SOURCE == "web"
when: always
- when: never