Skip to content

Commit 859bd75

Browse files
committedOct 12, 2019
Speedup YAML dumping by moving to zabbix server runner and pip caching
1 parent b35c3dd commit 859bd75

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed
 

‎.gitlab-ci.yml

+9-4
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,32 @@ variables:
1111
NEW_XML_REPO: $NEW_XML_REPO
1212
USER_EMAIL: $USER_EMAIL
1313
USER_NAME: $USER_NAME
14+
PIP_CACHE_DIR: "$CI_PROJECT_DIR/pip-cache"
15+
16+
cache:
17+
paths:
18+
- "$CI_PROJECT_DIR/pip-cache"
19+
key: "$CI_PROJECT_ID"
1420

1521
before_script:
1622
- date
17-
- python -m pip install --user -r requirements.txt
1823

1924
after_script:
2025
- date
2126

2227
.review: &review
2328
tags:
24-
- dind
25-
image: python:3
29+
- zabbix
2630
script:
31+
- python3 -m pip install --user -r requirements.txt
2732
- git config --global user.email "$USER_EMAIL"
2833
- git config --global user.name "$USER_NAME"
2934
- git clone https://oauth2:$GITLAB_TOKEN@$GITLAB_FQDN/$GITLAB_GROUP/$GITLAB_REPO.git
3035
- cd $GITLAB_REPO
3136
- git checkout -b develop origin/develop || git checkout develop
3237
- git pull
3338
- rm -rf *
34-
- python ../zabbix-export.py $SAVE_YAML
39+
- python3 ../zabbix-export.py $SAVE_YAML
3540
- git add .
3641
- d=$(date +%Y-%m-%d)
3742
- "git commit -m':robot: Autobackup' ||:"

0 commit comments

Comments
 (0)
Please sign in to comment.