-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
33 lines (32 loc) · 1.04 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
---
include:
- project: shore/ci-stuff
file: templates/pre-commit.yml
pre-commit-try-repo:
stage: test
image: registry.shore.co.il/ci-images:pre-commit
tags: [ns4.shore.co.il]
variables:
PIP_CONSTRAINT: /tmp/constraint.txt
XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache"
before_script:
- >-
curl https://apt.releases.hashicorp.com/gpg |
GNUPGHOME=/tmp gpg --dearmor >
/usr/share/keyrings/hashicorp.gpg
- . /etc/os-release
# yamllint disable rule:line-length
- >-
echo "deb [ signed-by=/usr/share/keyrings/hashicorp.gpg ] https://apt.releases.hashicorp.com $VERSION_CODENAME main" >
/etc/apt/sources.list.d/hashicorp.list
# yamllint enable rule:line-length
- apt-get update
- apt-get install -y terraform packer
# See https://github.com/yaml/pyyaml/issues/736 for the reason for this
# workaround. Needed until Ansible doesn't require pyyaml<6.
- echo 'Cython < 3.0' > "$PIP_CONSTRAINT"
script:
- pre-commit try-repo --all-files ./
cache:
paths:
- .cache/