-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
47 lines (44 loc) · 1.22 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
workflow:
rules:
- if: $CI_COMMIT_BRANCH
stages:
- test
- build
molecule test:
image: havlasme/ansible-molecule-podman:latest
stage: test
variables:
ANSIBLE_FORCE_COLOR: 'true'
before_script:
- echo -e '[storage]\ndriver = "overlay"\nrunroot = "/var/obj/podman/storage"\ngraphroot = "/var/obj/podman/storage"\n[storage.options.overlay]\nmount_program = "/usr/bin/fuse-overlayfs"\nmountopt = "nodev,metacopy=on"' > /etc/containers/storage.conf
- echo -e '[containers]\ncgroupns="host"\ncgroups="disabled"\n[engine]\ncgroup_manager = "cgroupfs"\nevents_logger = "file"' > /etc/containers/containers.conf
- echo $PATH
- podman info
- python3 --version
- ansible --version
- molecule --version
- ansible-galaxy install -r requirements.yml
script:
- make test
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
publish collection:
image: havlasme/ansible-molecule-podman:latest
stage: build
variables:
ANSIBLE_FORCE_COLOR: 'true'
before_script:
- echo $PATH
- python3 --version
- ansible --version
script:
- make build publish
needs:
- molecule test
artifacts:
paths:
- dist/*
expire_in: 1 week
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: manual