mirror of
https://github.com/d9pouces/id_configurator.git
synced 2026-11-09 01:47:21 +01:00
feat: add config-url support with Dockerfile and NGINX configuration
Signed-off-by: d9pouces <github@19pouces.net>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
[tox]
|
||||
env_list = py313,py314,coverage,packaging,packaging-amd64,packaging-arm64,publish,module-python,module-apt,module-yum,module-apk,module-java,module-certificates,module-php,module-npm,module-rust,module-go,module-ruby,module-nuget
|
||||
env_list = py313,py314,coverage,packaging,packaging-amd64,packaging-arm64,publish,module-python,module-apt,module-yum,module-apk,module-java,module-certificates,module-php,module-npm,module-rust,module-go,module-ruby,module-nuget,config-url
|
||||
isolated_build = true
|
||||
requires =
|
||||
tox>=4
|
||||
@@ -387,3 +387,32 @@ commands =
|
||||
python3 -m id_tools test render-config {tox_root}/tests/configs/NuGet.yaml.j2 {env_dir}/configs/NuGet.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/NuGet.Dockerfile -t id-configurator-nuget .
|
||||
docker rmi id-configurator-nuget
|
||||
|
||||
[docker:config-url-repo]
|
||||
dockerfile = {tox_root}/tests/dockerfiles/repos/config-url-repo.Dockerfile
|
||||
expose =
|
||||
CONFIG_REPO_PORT=8443/tcp
|
||||
healthcheck_cmd = wget --no-check-certificate -qO- https://127.0.0.1:8443/config.yaml || exit 1
|
||||
healthcheck_interval = 1
|
||||
healthcheck_retries = 30
|
||||
healthcheck_timeout = 2
|
||||
healthcheck_start_period = 1
|
||||
|
||||
[testenv:config-url]
|
||||
package = skip
|
||||
labels = end-to-end
|
||||
change_dir = {tox_root}
|
||||
dependency_groups = dev
|
||||
docker =
|
||||
config-url-repo
|
||||
allowlist_externals =
|
||||
docker
|
||||
sh
|
||||
description =
|
||||
Verifies `id-configurator apply --config-url ... --config-url-cacert-content
|
||||
...`: the configuration itself is downloaded over HTTPS from the
|
||||
config-url-repo fixture (trusting only the given root CA content, not the
|
||||
system's trust store), rather than read from a local --config file.
|
||||
commands =
|
||||
sh -c 'docker buildx build --platform linux/amd64 --add-host=host.docker.internal:host-gateway --build-arg CONFIG_REPO_PORT={env:CONFIG_REPO_PORT} --build-arg CONFIG_URL_CACERT_CONTENT="$(cat {tox_root}/tests/certs/test-ca.crt.pem)" -f {tox_root}/tests/dockerfiles/ConfigUrl.Dockerfile -t id-configurator-config-url .'
|
||||
docker rmi id-configurator-config-url
|
||||
|
||||
Reference in New Issue
Block a user