Skip to content

Commit

Permalink
Merge pull request #1918 from bunkerity/dev
Browse files Browse the repository at this point in the history
Merge branch "dev" into branch "staging"
  • Loading branch information
TheophileDiot authored Jan 20, 2025
2 parents 55e31b2 + a8acd14 commit d00de0c
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 10 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
needs: [create-arm]
strategy:
matrix:
linux: [ubuntu, debian, fedora, rhel, rhel9]
linux: [ubuntu, debian, fedora, rhel, rhel9, ubuntu-jammy]
platforms: [linux/amd64, linux/arm64]
include:
- release: beta
Expand All @@ -108,6 +108,8 @@ jobs:
package: rpm
- linux: rhel9
package: rpm
- linux: ubuntu-jammy
package: deb
uses: ./.github/workflows/linux-build.yml
with:
RELEASE: ${{ matrix.release }}
Expand Down Expand Up @@ -181,7 +183,7 @@ jobs:
needs: [wait-builds]
strategy:
matrix:
linux: [ubuntu, debian, fedora, el, el9]
linux: [ubuntu, debian, fedora, el, el9, ubuntu-jammy]
arch: [amd64, arm64]
include:
- release: beta
Expand Down Expand Up @@ -211,6 +213,11 @@ jobs:
suffix: "1."
version: 9
package: rpm
- linux: ubuntu-jammy
separator: _
suffix: ""
version: jammy
package: deb
- linux: ubuntu
arch: amd64
package_arch: amd64
Expand All @@ -226,6 +233,9 @@ jobs:
- linux: el9
arch: amd64
package_arch: x86_64
- linux: ubuntu-jammy
arch: amd64
package_arch: amd64
- linux: ubuntu
arch: arm64
package_arch: arm64
Expand All @@ -241,6 +251,9 @@ jobs:
- linux: el9
arch: arm64
package_arch: aarch64
- linux: ubuntu-jammy
arch: arm64
package_arch: arm64
uses: ./.github/workflows/push-packagecloud.yml
with:
SEPARATOR: ${{ matrix.separator }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/push-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ jobs:
if: inputs.HIDDEN == true
run: |
mike deploy --update-aliases --alias-type=copy ${{ inputs.VERSION }} ${{ inputs.ALIAS }}
mike props ${{ inputs.VERSION }} --set hidden=true
mike props ${{ inputs.VERSION }} --set hidden=true --push
- name: Deploy documentation
if: inputs.HIDDEN == false
run: mike deploy --update-aliases --push --alias-type=copy ${{ inputs.VERSION }} ${{ inputs.ALIAS }}
- name: Set default doc
if: inputs.ALIAS == 'latest'
Expand Down
19 changes: 16 additions & 3 deletions .github/workflows/rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
needs: [create-arm]
strategy:
matrix:
linux: [ubuntu, debian, fedora, rhel, rhel9]
linux: [ubuntu, debian, fedora, rhel, rhel9, ubuntu-jammy]
platforms: [linux/amd64, linux/arm64]
include:
- release: rc
Expand All @@ -108,6 +108,8 @@ jobs:
package: rpm
- linux: rhel9
package: rpm
- linux: ubuntu-jammy
package: deb
uses: ./.github/workflows/linux-build.yml
with:
RELEASE: ${{ matrix.release }}
Expand Down Expand Up @@ -181,10 +183,10 @@ jobs:
needs: [wait-builds]
strategy:
matrix:
linux: [ubuntu, debian, fedora, el, el9]
linux: [ubuntu, debian, fedora, el, el9, ubuntu-jammy]
arch: [amd64, arm64]
include:
- release: rc
- release: latest
repo: bunkerweb
- linux: ubuntu
separator: _
Expand All @@ -211,6 +213,11 @@ jobs:
suffix: "1."
version: 9
package: rpm
- linux: ubuntu-jammy
separator: _
suffix: ""
version: jammy
package: deb
- linux: ubuntu
arch: amd64
package_arch: amd64
Expand All @@ -226,6 +233,9 @@ jobs:
- linux: el9
arch: amd64
package_arch: x86_64
- linux: ubuntu-jammy
arch: amd64
package_arch: amd64
- linux: ubuntu
arch: arm64
package_arch: arm64
Expand All @@ -241,6 +251,9 @@ jobs:
- linux: el9
arch: arm64
package_arch: aarch64
- linux: ubuntu-jammy
arch: arm64
package_arch: arm64
uses: ./.github/workflows/push-packagecloud.yml
with:
SEPARATOR: ${{ matrix.separator }}
Expand Down
2 changes: 1 addition & 1 deletion src/common/cli/CLI.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def __init__(self):
self.__db = None
if variables_path.is_file():
with variables_path.open() as f:
self.__variables = dict(line.strip().split("=", 1) for line in f if line.strip() and not line.startswith("#"))
self.__variables = dict(line.strip().split("=", 1) for line in f if line.strip() and not line.startswith("#") and "=" in line)

if Path(sep, "usr", "share", "bunkerweb", "db").exists():
from Database import Database # type: ignore
Expand Down
2 changes: 1 addition & 1 deletion src/common/gen/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
variables_path = Path(args.variables)
LOGGER.info(f"Variables : {variables_path}")
with variables_path.open() as f:
dotenv_env = dict(line.strip().split("=", 1) for line in f if line.strip() and not line.startswith("#"))
dotenv_env = dict(line.strip().split("=", 1) for line in f if line.strip() and not line.startswith("#") and "=" in line)

db = None
if DB_PATH.is_dir():
Expand Down
2 changes: 1 addition & 1 deletion src/common/gen/save_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
variables_path = Path(args.variables)
LOGGER.info(f"Variables : {variables_path}")
with variables_path.open() as f:
dotenv_env = dict(line.strip().split("=", 1) for line in f if line.strip() and not line.startswith("#"))
dotenv_env = dict(line.strip().split("=", 1) for line in f if line.strip() and not line.startswith("#") and "=" in line)

# Check existences and permissions
LOGGER.info("Checking arguments ...")
Expand Down
2 changes: 1 addition & 1 deletion src/scheduler/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ def healthcheck_job():
dotenv_env = {}
if tmp_variables_path.is_file():
with tmp_variables_path.open() as f:
dotenv_env = dict(line.strip().split("=", 1) for line in f if line.strip() and not line.startswith("#"))
dotenv_env = dict(line.strip().split("=", 1) for line in f if line.strip() and not line.startswith("#") and "=" in line)

SCHEDULER = JobScheduler(environ, LOGGER, db=Database(LOGGER, sqlalchemy_string=dotenv_env.get("DATABASE_URI", getenv("DATABASE_URI", None)))) # type: ignore

Expand Down

0 comments on commit d00de0c

Please sign in to comment.