forked from kpfleming/ansible-systemd-networkd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
109 lines (99 loc) · 2.72 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
[tox]
envlist=lint
skipsdist=True
[ansible-base]
deps=
ansible
commands=
python -VV
[galaxy-base]
deps=
{[ansible-base]deps}
setenv=
ANSIBLE_COLLECTIONS_PATH={envtmpdir}/collections
commands=
ansible-playbook -i localhost, workflow-support/make-galaxy-files.yml
ansible-playbook -i localhost, workflow-support/make-vars-yml.yml
ansible-galaxy collection install -p {env:ANSIBLE_COLLECTIONS_PATH} src
[lint-base]
deps=
ansible-lint==6.16.*
commands=
{[galaxy-base]commands}
bash -c 'shellcheck workflow-support/*.sh'
[build-base]
deps=
{[galaxy-base]deps}
git+https://gitlab.com/kpfleming/ansible-role-docs
setenv=
{[galaxy-base]setenv}
commands=
{[galaxy-base]commands}
ansible-role-docs --output-file src/roles/bond/README.md src/roles/bond markdown
ansible-role-docs --output-file src/roles/dummy/README.md src/roles/dummy markdown
ansible-role-docs --output-file src/roles/link/README.md src/roles/link markdown
ansible-role-docs --output-file src/roles/network/README.md src/roles/network markdown
ansible-role-docs --output-file src/roles/tunnel/README.md src/roles/tunnel markdown
ansible-role-docs --output-file src/roles/vlan/README.md src/roles/vlan markdown
ansible-role-docs --output-file src/roles/wireguard/README.md src/roles/wireguard markdown
ansible-playbook -i localhost, workflow-support/build.yml
[testenv:lint-action]
ignore_errors=true
allowlist_externals=bash
deps=
{[galaxy-base]deps}
{[lint-base]deps}
setenv=
{[galaxy-base]setenv}
TAG=main
commands=
{[lint-base]commands}
bash -c 'ansible-lint --strict --profile production -v'
[testenv:lint]
allowlist_externals=bash
deps=
{[galaxy-base]deps}
{[lint-base]deps}
setenv=
{[galaxy-base]setenv}
TAG=main
commands=
{[lint-base]commands}
bash -c 'ansible-lint --write=all --strict --profile production -v'
[testenv:py311-ci-action]
deps=
{[galaxy-base]deps}
setenv=
{[galaxy-base]setenv}
TAG=main
commands=
{[ansible-base]commands}
{[galaxy-base]commands}
[testenv:build]
deps=
{[build-base]deps}
setenv=
{[build-base]setenv}
TAG=main
commands=
{[build-base]commands}
[testenv:make-tag]
allowlist_externals=git,bash
deps=
{[build-base]deps}
setenv=
{[build-base]setenv}
passenv=TAG
commands=
{[build-base]commands}
git add --force src/galaxy.yml src/roles/*/README.md 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=
{[galaxy-base]deps}
passenv=ANSIBLE_GALAXY_TOKEN,TAG
commands=
ansible-playbook -i localhost, workflow-support/publish.yml