-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
tox.ini
122 lines (113 loc) · 3.35 KB
/
tox.ini
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
[tox]
envlist=lint
skipsdist=True
[galaxy-setup]
deps=
ansible-core
jinjanator
pyyaml
setuptools
setenv=
TAG=main
ANSIBLE_COLLECTIONS_PATH={envtmpdir}/collections
commands_pre=
jinjanate -o src/galaxy.yml workflow-support/templates/galaxy.yml.j2
jinjanate -o src/roles/bond/vars/main.yml workflow-support/templates/bond-vars.yml.j2 workflow-support/parameter_mapping.yml
jinjanate -o src/roles/dummy/vars/main.yml workflow-support/templates/dummy-vars.yml.j2 workflow-support/parameter_mapping.yml
jinjanate -o src/roles/link/vars/main.yml workflow-support/templates/link-vars.yml.j2 workflow-support/parameter_mapping.yml
jinjanate -o src/roles/network/vars/main.yml workflow-support/templates/network-vars.yml.j2 workflow-support/parameter_mapping.yml
jinjanate -o src/roles/tunnel/vars/main.yml workflow-support/templates/tunnel-vars.yml.j2 workflow-support/parameter_mapping.yml
jinjanate -o src/roles/vlan/vars/main.yml workflow-support/templates/vlan-vars.yml.j2 workflow-support/parameter_mapping.yml
jinjanate -o src/roles/wireguard/vars/main.yml workflow-support/templates/wireguard-vars.yml.j2 workflow-support/parameter_mapping.yml
commands=
ansible-galaxy collection install -p {env:ANSIBLE_COLLECTIONS_PATH} src
[lint-base]
deps=
{[galaxy-setup]deps}
ansible-lint
antsibull-docs
setenv=
{[galaxy-setup]setenv}
allowlist_externals=
bash
commands_pre=
{[galaxy-setup]commands_pre}
{[galaxy-setup]commands}
commands=
bash -c 'shellcheck workflow-support/*.sh'
bash -c 'mkdir {envtmpdir}/docs-build'
bash -c 'chmod g-w {envtmpdir}/docs-build'
antsibull-docs collection --fail-on-error --use-current --dest-dir {envtmpdir}/docs-build kpfleming.systemd_networkd
[testenv:lint-action]
deps=
{[lint-base]deps}
setenv=
{[lint-base]setenv}
allowlist_externals=
{[lint-base]allowlist_externals}
commands_pre=
{[lint-base]commands_pre}
{[lint-base]commands}
commands=
ansible-lint --strict --profile production -v
[testenv:lint]
deps=
{[lint-base]deps}
setenv=
{[lint-base]setenv}
allowlist_externals=
{[lint-base]allowlist_externals}
commands_pre=
{[lint-base]commands_pre}
{[lint-base]commands}
commands=
ansible-lint --fix=all --strict --profile production -v
[testenv:py3{11,12,13}-ci-action]
deps=
{[galaxy-setup]deps}
setenv=
{[galaxy-setup]setenv}
commands_pre=
{[galaxy-setup]commands_pre}
{[galaxy-setup]commands}
[build-base]
deps=
{[galaxy-setup]deps}
commands_pre=
{[galaxy-setup]commands_pre}
commands=
ansible-galaxy collection build --force src
[testenv:build]
deps=
{[build-base]deps}
setenv=
TAG=main
commands=
{[build-base]commands_pre}
{[build-base]commands}
[testenv:make-tag]
deps=
{[build-base]deps}
passenv=
TAG
allowlist_externals=
git
bash
commands_pre=
{[build-base]commands_pre}
commands=
git add --force src/galaxy.yml src/roles/*/vars/main.yml
bash -c 'git commit -am "Prepare tag ${TAG}"'
bash -c 'git tag -a -m "Version ${TAG}" ${TAG}'
bash -c 'git push kpf ${TAG}'
git reset --hard HEAD~1
[testenv:publish-action]
deps=
{[build-base]deps}
passenv=
ANSIBLE_GALAXY_TOKEN
TAG
commands_pre=
{[build-base]commands}
commands=
ansible-galaxy collection publish --token {env:ANSIBLE_GALAXY_TOKEN} kpfleming-systemd_networkd-{env:TAG}.tar.gz