mirror of
https://github.com/d9pouces/id_configurator.git
synced 2026-11-09 01:47:21 +01:00
feat: add new configuration files for Apt, Apk, Java, and Yum
Signed-off-by: d9pouces <github@19pouces.net>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
[tox]
|
||||
env_list = py313,py314,coverage,packaging,publish,module-python
|
||||
env_list = py313,py314,coverage,packaging,publish,module-python,module-apt,module-yum,module-apk,module-java
|
||||
isolated_build = true
|
||||
requires =
|
||||
tox>=4
|
||||
@@ -10,7 +10,7 @@ package = wheel
|
||||
dependency_groups = test
|
||||
change_dir = {env_tmp_dir}
|
||||
set_env =
|
||||
COVERAGE_FILE = {toxworkdir}/coverage/coverage.db
|
||||
COVERAGE_FILE = {env_dir}/coverage.db
|
||||
commands =
|
||||
pytest {tox_root}/tests --cov-config={tox_root}/pyproject.toml --cov-fail-under=0 {posargs}
|
||||
|
||||
@@ -20,7 +20,7 @@ depends = py313,py314
|
||||
change_dir = {tox_root}
|
||||
dependency_groups = test
|
||||
set_env =
|
||||
COVERAGE_FILE = {toxworkdir}/coverage/coverage.db
|
||||
COVERAGE_FILE = {env_dir}/coverage.db
|
||||
commands =
|
||||
python3 -m coverage combine
|
||||
python3 -m coverage xml -o .tox/coverage.xml --ignore
|
||||
@@ -77,5 +77,102 @@ docker =
|
||||
allowlist_externals =
|
||||
docker
|
||||
commands =
|
||||
python3 -m id_tools test render-config {tox_root}/tests/configs/Python.yaml.tmpl {env_dir}/configs/Python.yaml
|
||||
python3 -m id_tools test render-config {tox_root}/tests/configs/Python.yaml.j2 {env_dir}/configs/Python.yaml
|
||||
docker buildx build --platform linux/amd64 --add-host=host.docker.internal:host-gateway --build-context generated-config={env_dir}/configs -f {tox_root}/tests/dockerfiles/Python.Dockerfile -t id-configurator-python .
|
||||
|
||||
[docker:apt-repo]
|
||||
dockerfile = {tox_root}/tests/dockerfiles/repos/apt-repo.Dockerfile
|
||||
expose =
|
||||
APT_REPO_PORT=8443/tcp
|
||||
healthcheck_cmd = wget --no-check-certificate -qO- https://127.0.0.1:8443/Packages || exit 1
|
||||
healthcheck_interval = 1
|
||||
healthcheck_retries = 30
|
||||
healthcheck_timeout = 2
|
||||
healthcheck_start_period = 1
|
||||
|
||||
[testenv:module-apt]
|
||||
package = skip
|
||||
change_dir = {tox_root}
|
||||
dependency_groups = dev
|
||||
docker =
|
||||
apt-repo
|
||||
allowlist_externals =
|
||||
docker
|
||||
commands =
|
||||
python3 -m id_tools test render-config {tox_root}/tests/configs/Apt.yaml.j2 {env_dir}/configs/Apt.yaml
|
||||
docker buildx build --platform linux/amd64 --add-host=host.docker.internal:host-gateway --build-context generated-config={env_dir}/configs -f {tox_root}/tests/dockerfiles/Apt.Dockerfile -t id-configurator-apt .
|
||||
|
||||
[docker:yum-repo]
|
||||
dockerfile = {tox_root}/tests/dockerfiles/repos/yum-repo.Dockerfile
|
||||
expose =
|
||||
YUM_REPO_PORT=8443/tcp
|
||||
healthcheck_cmd = wget -qO- http://127.0.0.1:8443/repodata/repomd.xml || exit 1
|
||||
healthcheck_interval = 1
|
||||
healthcheck_retries = 30
|
||||
healthcheck_timeout = 2
|
||||
healthcheck_start_period = 1
|
||||
|
||||
[testenv:module-yum]
|
||||
package = skip
|
||||
change_dir = {tox_root}
|
||||
dependency_groups = dev
|
||||
docker =
|
||||
yum-repo
|
||||
allowlist_externals =
|
||||
docker
|
||||
commands =
|
||||
python3 -m id_tools test render-config {tox_root}/tests/configs/Yum.yaml.j2 {env_dir}/configs/Yum.yaml
|
||||
docker buildx build --platform linux/amd64 --add-host=host.docker.internal:host-gateway --build-context generated-config={env_dir}/configs -f {tox_root}/tests/dockerfiles/Yum.Dockerfile -t id-configurator-yum .
|
||||
|
||||
[docker:apk-repo]
|
||||
dockerfile = {tox_root}/tests/dockerfiles/repos/apk-repo.Dockerfile
|
||||
expose =
|
||||
APK_REPO_PORT=8443/tcp
|
||||
healthcheck_cmd = wget -qO- http://127.0.0.1:8443/APKINDEX.tar.gz || exit 1
|
||||
healthcheck_interval = 1
|
||||
healthcheck_retries = 30
|
||||
healthcheck_timeout = 2
|
||||
healthcheck_start_period = 1
|
||||
|
||||
[testenv:module-apk]
|
||||
package = skip
|
||||
change_dir = {tox_root}
|
||||
dependency_groups = dev
|
||||
docker =
|
||||
apk-repo
|
||||
allowlist_externals =
|
||||
docker
|
||||
description =
|
||||
Unlike the other module-* envs, this one is not pinned to --platform
|
||||
linux/amd64: apk embeds the client's own architecture in the repository
|
||||
URL it fetches, and the apk-repo fixture (built by tox-docker, which
|
||||
cannot be pinned to a platform) always publishes its index under the
|
||||
Docker host's native architecture. Leaving both builds on the host's
|
||||
native platform keeps them in agreement everywhere (including under
|
||||
QEMU emulation on non-amd64 hosts); CI runners are amd64, so this still
|
||||
matches the other envs there.
|
||||
commands =
|
||||
python3 -m id_tools test render-config {tox_root}/tests/configs/Apk.yaml.j2 {env_dir}/configs/Apk.yaml
|
||||
docker buildx build --add-host=host.docker.internal:host-gateway --build-context generated-config={env_dir}/configs -f {tox_root}/tests/dockerfiles/Apk.Dockerfile -t id-configurator-apk .
|
||||
|
||||
[docker:java-repo]
|
||||
dockerfile = {tox_root}/tests/dockerfiles/repos/java-repo.Dockerfile
|
||||
expose =
|
||||
JAVA_REPO_PORT=8443/tcp
|
||||
healthcheck_cmd = wget -qO- http://127.0.0.1:8443/org/interdiode/idconfiguratortestpkg/0.0.1/idconfiguratortestpkg-0.0.1.pom || exit 1
|
||||
healthcheck_interval = 1
|
||||
healthcheck_retries = 30
|
||||
healthcheck_timeout = 2
|
||||
healthcheck_start_period = 1
|
||||
|
||||
[testenv:module-java]
|
||||
package = skip
|
||||
change_dir = {tox_root}
|
||||
dependency_groups = dev
|
||||
docker =
|
||||
java-repo
|
||||
allowlist_externals =
|
||||
docker
|
||||
commands =
|
||||
python3 -m id_tools test render-config {tox_root}/tests/configs/Java.yaml.j2 {env_dir}/configs/Java.yaml
|
||||
docker buildx build --platform linux/amd64 --add-host=host.docker.internal:host-gateway --build-context generated-config={env_dir}/configs -f {tox_root}/tests/dockerfiles/Java.Dockerfile -t id-configurator-java .
|
||||
|
||||
Reference in New Issue
Block a user