From 19c1431fb3e47653708f299aebb1287dea70f238 Mon Sep 17 00:00:00 2001 From: Digikwal <79085106+digikwal@users.noreply.github.com> Date: Thu, 26 Jun 2025 18:18:25 +0200 Subject: [PATCH] ci: relax failure threshold --- .github/workflows/check.yml | 2 +- .github/workflows/wait-for-check.yml | 3 +++ .yamllint | 1 + compose.yaml | 1 + overrides/compose.postgres.yaml | 1 + pwd.yml | 21 ++++++++++++++++----- 6 files changed, 23 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 617ad8d0..1c4f7b26 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -58,4 +58,4 @@ jobs: - name: Run hadolint run: | - find . -type f -name "Dockerfile*" -exec hadolint {} + + find . -type f -name "Dockerfile*" -exec hadolint --failure-threshold error {} + diff --git a/.github/workflows/wait-for-check.yml b/.github/workflows/wait-for-check.yml index 4d6b5e7a..e4d54c87 100644 --- a/.github/workflows/wait-for-check.yml +++ b/.github/workflows/wait-for-check.yml @@ -15,6 +15,9 @@ jobs: runs-on: ubuntu-latest steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Wait for Check workflow to succeed env: GH_TOKEN: ${{ secrets.GH_TOKEN }} diff --git a/.yamllint b/.yamllint index ae484356..6f9b33c7 100644 --- a/.yamllint +++ b/.yamllint @@ -1,3 +1,4 @@ +--- extends: default rules: diff --git a/compose.yaml b/compose.yaml index 7c8e64f2..3ff83e9a 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,3 +1,4 @@ +--- x-customizable-image: &customizable_image # By default the image used only contains the `frappe` and `erpnext` apps. # See https://github.com/frappe/frappe_docker/blob/main/docs/custom-apps.md diff --git a/overrides/compose.postgres.yaml b/overrides/compose.postgres.yaml index 433ca71a..53031e2f 100644 --- a/overrides/compose.postgres.yaml +++ b/overrides/compose.postgres.yaml @@ -1,3 +1,4 @@ +--- services: configurator: environment: diff --git a/pwd.yml b/pwd.yml index 05375ba8..3b01d0ad 100644 --- a/pwd.yml +++ b/pwd.yml @@ -1,3 +1,4 @@ +--- version: "3" services: @@ -65,19 +66,29 @@ services: wait-for-it -t 120 redis-cache:6379; wait-for-it -t 120 redis-queue:6379; export start=`date +%s`; - until [[ -n `grep -hs ^ sites/common_site_config.json | jq -r ".db_host // empty"` ]] && \ - [[ -n `grep -hs ^ sites/common_site_config.json | jq -r ".redis_cache // empty"` ]] && \ - [[ -n `grep -hs ^ sites/common_site_config.json | jq -r ".redis_queue // empty"` ]]; + until [[ -n `grep -hs ^ sites/common_site_config.json | \ + jq -r ".db_host // empty"` ]] && \ + [[ -n `grep -hs ^ sites/common_site_config.json | \ + jq -r ".redis_cache // empty"` ]] && \ + [[ -n `grep -hs ^ sites/common_site_config.json | \ + jq -r ".redis_queue // empty"` ]]; do echo "Waiting for sites/common_site_config.json to be created"; sleep 5; if (( `date +%s`-start > 120 )); then - echo "could not find sites/common_site_config.json with required keys"; + echo "could not find sites/common_site_config.json with required keys" \ + "and the process will exit."; exit 1 fi done; echo "sites/common_site_config.json found"; - bench new-site --mariadb-user-host-login-scope='%' --admin-password=admin --db-root-username=root --db-root-password=admin --install-app erpnext --set-default frontend; + bench new-site \ + --mariadb-user-host-login-scope='%' \ + --admin-password=admin \ + --db-root-username=root \ + --db-root-password=admin \ + --install-app erpnext \ + --set-default frontend; db: image: mariadb:10.6