-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
66 lines (59 loc) · 1.65 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
60
61
62
63
64
65
66
---
image: docker:cli
services:
- docker:dind
# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
PIPENV_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pipenv"
# Create the certificates inside this directory for both the server
# and client. The certificates used by the client will be created in
# /certs/client so we only need to share this directory with the
# volume mount in `config.toml`.
DOCKER_TLS_CERTDIR: "/certs"
PY_COLORS: 1
ANSIBLE_FORCE_COLOR: '1'
# Pip's cache doesn't store the python packages
# https://pip.pypa.io/en/stable/reference/pip_install/#caching
#
# If you want to also cache the installed packages, you have to install
# them in a virtualenv and cache it as well.
cache:
paths:
- .cache
before_script:
- apk add --no-cache
python3 python3-dev py3-pip gcc git curl build-base
autoconf automake py3-cryptography linux-headers
musl-dev libffi-dev openssl-dev openssh
- docker info
- python3 --version
- pip3 install pipenv --ignore-installed distlib
- pipenv install --deploy
- pipenv run ansible --version
- pipenv run molecule --version
stages:
- lint
- test
lint:
stage: lint
script:
- pipenv run yamllint .
- pipenv run ansible-lint roles playbooks
- pipenv run flake8
test:
stage: test
script:
- pipenv run molecule test -s $SCENARIO -p $PLATFORM --destroy never
parallel:
matrix:
- SCENARIO:
- default
- build_openssl
- build_upgrade
- config
PLATFORM:
- ubuntu-20.04
- debian-11
- rockylinux-9