From 6b4d875d72493f4c9f46bdfdec1f3a27ba8216ed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Jul 2024 07:40:42 +0000 Subject: [PATCH 1/6] deps/tests/linux: Bump redhat/ubi8-init in /tests/linux Bumps redhat/ubi8-init from 8.10-2.1717585302 to 8.10-4. --- updated-dependencies: - dependency-name: redhat/ubi8-init dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- tests/linux/Dockerfile-rhel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/linux/Dockerfile-rhel b/tests/linux/Dockerfile-rhel index 6f2db32cb..3d52619a2 100644 --- a/tests/linux/Dockerfile-rhel +++ b/tests/linux/Dockerfile-rhel @@ -1,4 +1,4 @@ -FROM redhat/ubi8-init:8.10-2.1717585302@sha256:0a87a84de9b4fe211a0623cf7b1431895c9c6590d345e20bb5483f09629d53d3 +FROM redhat/ubi8-init:8.10-4@sha256:df22b959e8966c7ef9000cbf89f0bda0440b59902e88e344ea3678912f49286d ENV NGINX_VERSION 1.26.1 From dded9ea719fcdb76e778fd6cf0f70bf3c1f35862 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Jul 2024 07:43:28 +0000 Subject: [PATCH 2/6] deps/linux: Bump redhat/ubi8 from `143123d` to `44d7500` in /src/linux Bumps redhat/ubi8 from `143123d` to `44d7500`. --- updated-dependencies: - dependency-name: redhat/ubi8 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- src/linux/Dockerfile-rhel | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/linux/Dockerfile-rhel b/src/linux/Dockerfile-rhel index 68cf98e48..12d89d814 100644 --- a/src/linux/Dockerfile-rhel +++ b/src/linux/Dockerfile-rhel @@ -1,4 +1,4 @@ -FROM redhat/ubi8:8.10@sha256:143123d85045df426c5bbafc6863659880ebe276eb02c77ee868b88d08dbd05d AS builder +FROM redhat/ubi8:8.10@sha256:44d75007b39e0e1bbf1bcfd0721245add54c54c3f83903f8926fb4bef6827aa2 AS builder ENV OS=rhel ENV NGINX_VERSION=1.26.1 @@ -65,7 +65,7 @@ COPY src/scheduler scheduler COPY src/ui ui COPY src/VERSION VERSION -FROM redhat/ubi8:8.10@sha256:143123d85045df426c5bbafc6863659880ebe276eb02c77ee868b88d08dbd05d +FROM redhat/ubi8:8.10@sha256:44d75007b39e0e1bbf1bcfd0721245add54c54c3f83903f8926fb4bef6827aa2 # Set default umask to prevent huge recursive chmod increasing the final image size RUN umask 027 From 67b6e00a412e1aa2a0d2d020d0661d585ba88152 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Jul 2024 07:58:50 +0000 Subject: [PATCH 3/6] deps/gha: Bump ruby/setup-ruby from 1.183.0 to 1.184.0 Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.183.0 to 1.184.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](https://github.com/ruby/setup-ruby/compare/1d0e911f615a112e322369596f10ee0b95b010ae...97e35c5302afcf3f5ac1df3fca9343d32536b286) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/push-packagecloud.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-packagecloud.yml b/.github/workflows/push-packagecloud.yml index dcb9fe049..98410ac95 100644 --- a/.github/workflows/push-packagecloud.yml +++ b/.github/workflows/push-packagecloud.yml @@ -42,7 +42,7 @@ jobs: - name: Check out repository code uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Install ruby - uses: ruby/setup-ruby@1d0e911f615a112e322369596f10ee0b95b010ae # v1.183.0 + uses: ruby/setup-ruby@97e35c5302afcf3f5ac1df3fca9343d32536b286 # v1.184.0 with: ruby-version: "3.0" - name: Install packagecloud From 15979596afa77d8ed127338a626d08e9379d79a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Jul 2024 07:58:57 +0000 Subject: [PATCH 4/6] deps/gha: Bump docker/setup-buildx-action from 3.3.0 to 3.4.0 Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.3.0 to 3.4.0. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/d70bba72b1f3fd22344832f00baa16ece964efeb...4fd812986e6c8c2a69e18311145f9371337f27d4) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/container-build.yml | 4 ++-- .github/workflows/linux-build.yml | 4 ++-- .github/workflows/push-docker.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/container-build.yml b/.github/workflows/container-build.yml index d38d96bc2..74e290c1c 100644 --- a/.github/workflows/container-build.yml +++ b/.github/workflows/container-build.yml @@ -63,10 +63,10 @@ jobs: SSH_IP: ${{ secrets.ARM_SSH_IP }} SSH_CONFIG: ${{ secrets.ARM_SSH_CONFIG }} - name: Setup Buildx - uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0 + uses: docker/setup-buildx-action@4fd812986e6c8c2a69e18311145f9371337f27d4 # v3.4.0 if: inputs.CACHE_SUFFIX != 'arm' - name: Setup Buildx (ARM) - uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0 + uses: docker/setup-buildx-action@4fd812986e6c8c2a69e18311145f9371337f27d4 # v3.4.0 if: inputs.CACHE_SUFFIX == 'arm' with: endpoint: ssh://root@arm diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index f5f5dfdfe..adcf31d10 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -72,10 +72,10 @@ jobs: SSH_IP: ${{ secrets.ARM_SSH_IP }} SSH_CONFIG: ${{ secrets.ARM_SSH_CONFIG }} - name: Setup Buildx - uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0 + uses: docker/setup-buildx-action@4fd812986e6c8c2a69e18311145f9371337f27d4 # v3.4.0 if: startsWith(env.ARCH, 'arm') == false - name: Setup Buildx (ARM) - uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0 + uses: docker/setup-buildx-action@4fd812986e6c8c2a69e18311145f9371337f27d4 # v3.4.0 if: startsWith(env.ARCH, 'arm') == true with: endpoint: ssh://root@arm diff --git a/.github/workflows/push-docker.yml b/.github/workflows/push-docker.yml index fca9206e6..515a8e7ea 100644 --- a/.github/workflows/push-docker.yml +++ b/.github/workflows/push-docker.yml @@ -58,7 +58,7 @@ jobs: SSH_IP: ${{ secrets.ARM_SSH_IP }} SSH_CONFIG: ${{ secrets.ARM_SSH_CONFIG }} - name: Setup Buildx (ARM) - uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0 + uses: docker/setup-buildx-action@4fd812986e6c8c2a69e18311145f9371337f27d4 # v3.4.0 with: endpoint: ssh://root@arm platforms: linux/arm64,linux/arm/v7,linux/arm/v6 From 997d600fba44c2333abe0e753825099539828a9e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Jul 2024 07:59:04 +0000 Subject: [PATCH 5/6] deps/gha: Bump docker/build-push-action from 6.2.0 to 6.3.0 Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.2.0 to 6.3.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/15560696de535e4014efeff63c48f16952e52dd1...1a162644f9a7e87d8f4b053101d1d9a712edc18c) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/container-build.yml | 4 ++-- .github/workflows/linux-build.yml | 6 +++--- .github/workflows/push-docker.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/container-build.yml b/.github/workflows/container-build.yml index d38d96bc2..e96eebd27 100644 --- a/.github/workflows/container-build.yml +++ b/.github/workflows/container-build.yml @@ -92,7 +92,7 @@ jobs: # Build cached image - name: Build image if: inputs.CACHE == true - uses: docker/build-push-action@15560696de535e4014efeff63c48f16952e52dd1 # v6.2.0 + uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c # v6.3.0 with: context: . file: ${{ inputs.DOCKERFILE }} @@ -105,7 +105,7 @@ jobs: # Build non-cached image - name: Build image if: inputs.CACHE != true - uses: docker/build-push-action@15560696de535e4014efeff63c48f16952e52dd1 # v6.2.0 + uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c # v6.3.0 with: context: . file: ${{ inputs.DOCKERFILE }} diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index f5f5dfdfe..7009e717c 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -94,7 +94,7 @@ jobs: # Build testing package image - name: Build package image if: inputs.RELEASE == 'testing' || inputs.RELEASE == 'dev' || inputs.RELEASE == 'ui' - uses: docker/build-push-action@15560696de535e4014efeff63c48f16952e52dd1 # v6.2.0 + uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c # v6.3.0 with: context: . load: true @@ -106,7 +106,7 @@ jobs: # Build non-testing package image - name: Build package image if: inputs.RELEASE != 'testing' && inputs.RELEASE != 'dev' - uses: docker/build-push-action@15560696de535e4014efeff63c48f16952e52dd1 # v6.2.0 + uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c # v6.3.0 with: context: . load: true @@ -142,7 +142,7 @@ jobs: images: ghcr.io/bunkerity/${{ inputs.LINUX }}-tests:${{ inputs.RELEASE }} - name: Build test image if: inputs.TEST == true - uses: docker/build-push-action@15560696de535e4014efeff63c48f16952e52dd1 # v6.2.0 + uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c # v6.3.0 with: context: . file: tests/linux/Dockerfile-${{ inputs.LINUX }} diff --git a/.github/workflows/push-docker.yml b/.github/workflows/push-docker.yml index fca9206e6..9e9387f78 100644 --- a/.github/workflows/push-docker.yml +++ b/.github/workflows/push-docker.yml @@ -70,7 +70,7 @@ jobs: images: bunkerity/${{ inputs.IMAGE }} # Build and push - name: Build and push - uses: docker/build-push-action@15560696de535e4014efeff63c48f16952e52dd1 # v6.2.0 + uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c # v6.3.0 with: context: . file: ${{ inputs.DOCKERFILE }} From 950520eac65fddbe1c10363d28fd45e144e78efe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Diot?= Date: Thu, 4 Jul 2024 13:08:15 +0100 Subject: [PATCH 6/6] chore: Update Config.py to include environment instances multisite settings as well in __get_full_env() method --- src/autoconf/Config.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/autoconf/Config.py b/src/autoconf/Config.py index c1970e1c0..c617e231d 100644 --- a/src/autoconf/Config.py +++ b/src/autoconf/Config.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 from contextlib import suppress +from itertools import chain from os import getenv from time import sleep from copy import deepcopy @@ -40,16 +41,22 @@ class Config: self._settings.update(plugin["settings"]) def __get_full_env(self) -> dict: + env_instances = {"SERVER_NAME": ""} + for instance in self.__instances: + for variable, value in instance["env"].items(): + env_instances[variable] = value + config = {"SERVER_NAME": "", "MULTISITE": "yes"} for service in self.__services: server_name = service["SERVER_NAME"].split(" ")[0] if not server_name: continue - for variable, value in service.items(): + for variable, value in chain(env_instances.items(), service.items()): if variable.startswith("CUSTOM_CONF") or not variable.isupper(): continue if not self._db.is_setting(variable, multisite=True): - self.__logger.warning(f"Variable {variable}: {value} is not a valid multisite setting, ignoring it") + if variable in service: + self.__logger.warning(f"Variable {variable}: {value} is not a valid multisite setting, ignoring it") continue config[f"{server_name}_{variable}"] = value config["SERVER_NAME"] += f" {server_name}"