-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
65 lines (56 loc) · 1.68 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
---
#
# GitLab CI for the Onionprobe Ansible role
#
# Copyright (C) 2024 The Tor Project, Inc.
# SPDX-License-Identifier: AGPL-3.0-or-later
#
# Linting
lint:
stage: test
image: debian:bookworm
before_script:
- apt-get update
- apt install -y python3-pip ansible
- python3 -m pip install ansible-lint --break-system-packages
- ansible --version
- ansible-lint --version
- mkdir -p molecule/podman/roles && ln -s ../../.. molecule/podman/roles/onionprobe
- mkdir -p molecule/local/roles && ln -s ../../.. molecule/local/roles/onionprobe
script:
- ansible-lint
# Podman CI workflow
molecule_podman:
stage: test
image:
name: containers.torproject.org/tpo/tpa/base-images/podman:bookworm
docker:
user: root
before_script:
- apt-get update
- apt install -y sudo python3-pip ansible
- python3 -m pip install molecule-plugins[podman] --break-system-packages
- sudo -u podman python3 --version
- sudo -u podman ansible --version
- sudo -u podman molecule --version
- sudo -u podman podman info
- sudo -u podman mkdir -p molecule/podman/roles && sudo -u podman ln -s ../../.. molecule/podman/roles/onionprobe
script:
- sudo -u podman molecule test -s podman
# Run Ansible tests directly in the CI containers
#molecule_local:
# stage: test
#
# image: debian:bookworm
#
# before_script:
# - apt-get update
# - apt install -y python3-pip ansible
# - python3 -m pip install molecule --break-system-packages
# - python3 --version
# - ansible --version
# - molecule --version
# - mkdir -p molecule/podman/roles && ln -s ../../.. molecule/podman/roles/onionprobe
#
# script:
# - molecule test -s local