Use nox in AZP CI. (#1267)

This commit is contained in:
Felix Fontein
2026-06-01 07:03:13 +02:00
committed by GitHub
parent 4e4f65abdc
commit c5831a79f7
4 changed files with 212 additions and 89 deletions
+19
View File
@@ -12,6 +12,7 @@ import nox
try:
import antsibull_nox
from antsibull_nox.cli import run as run_antsibull_nox
except ImportError:
print("You need to install antsibull-nox in the same Python environment as nox.")
sys.exit(1)
@@ -20,6 +21,24 @@ except ImportError:
antsibull_nox.load_antsibull_nox_toml()
@nox.session(name="update-azp-config", python=False)
def update_azp_config(session: nox.Session) -> None:
command = [
"antsibull-nox",
"update-azp-config",
"--exclude-tags",
"docker",
"--min-ansible-core",
"2.18",
]
if antsibull_nox.IN_CI:
command.append("--fail-on-change")
session.debug(" ".join(command))
result = run_antsibull_nox(command)
if result != 0:
session.fail(f"Execution failed with status code {result}")
# Allow to run the noxfile with `python noxfile.py`, `pipx run noxfile.py`, or similar.
# Requires nox >= 2025.02.09
if __name__ == "__main__":