mirror of
https://github.com/d9pouces/id_configurator.git
synced 2026-11-09 01:47:21 +01:00
feat: refactor Dockerfiles to use 'target' stage and add Certificate module configuration
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,module-apt,module-yum,module-apk,module-java
|
||||
env_list = py313,py314,coverage,packaging,publish,module-python,module-apt,module-yum,module-apk,module-java,module-certificates
|
||||
isolated_build = true
|
||||
requires =
|
||||
tox>=4
|
||||
@@ -176,3 +176,30 @@ allowlist_externals =
|
||||
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 .
|
||||
|
||||
[docker:certificate-repo]
|
||||
dockerfile = {tox_root}/tests/dockerfiles/repos/certificate-repo.Dockerfile
|
||||
expose =
|
||||
CERTIFICATE_REPO_PORT=8443/tcp
|
||||
healthcheck_cmd = wget --no-check-certificate -qO- https://127.0.0.1:8443/marker.txt || exit 1
|
||||
healthcheck_interval = 1
|
||||
healthcheck_retries = 30
|
||||
healthcheck_timeout = 2
|
||||
healthcheck_start_period = 1
|
||||
|
||||
[testenv:module-certificates]
|
||||
package = skip
|
||||
change_dir = {tox_root}
|
||||
dependency_groups = dev
|
||||
docker =
|
||||
certificate-repo
|
||||
allowlist_externals =
|
||||
docker
|
||||
description =
|
||||
Verifies that both wget and curl - two independently TLS-linked HTTP
|
||||
clients (GnuTLS and OpenSSL, respectively, on Debian) - trust an HTTPS
|
||||
server whose certificate chains to a root certificate installed by the
|
||||
`certificates` module alone, with no package-manager-specific config.
|
||||
commands =
|
||||
python3 -m id_tools test render-config {tox_root}/tests/configs/Certificate.yaml.j2 {env_dir}/configs/Certificate.yaml
|
||||
docker buildx build --platform linux/amd64 --add-host=host.docker.internal:host-gateway --build-arg CERTIFICATE_REPO_PORT={env:CERTIFICATE_REPO_PORT} --build-context generated-config={env_dir}/configs -f {tox_root}/tests/dockerfiles/Certificate.Dockerfile -t id-configurator-certificates .
|
||||
|
||||
Reference in New Issue
Block a user