From 4b4e0f8b3bbe3f85a39c2bc649f775b9ca6dddce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Diot?= Date: Mon, 26 Jun 2023 13:01:02 -0400 Subject: [PATCH] Update checkout part of workflow to include submodules --- .github/workflows/beta.yml | 8 ++++---- .github/workflows/container-build.yml | 2 ++ .github/workflows/create-arm.yml | 3 ++- .github/workflows/dev-update-mmdb.yml | 1 + .github/workflows/dev.yml | 4 ++++ .github/workflows/doc-to-pdf.yml | 5 +++-- .github/workflows/linux-build.yml | 8 +++++--- .github/workflows/push-doc.yml | 3 ++- .github/workflows/push-docker.yml | 2 ++ .github/workflows/push-github.yml | 3 ++- .github/workflows/push-packagecloud.yml | 2 ++ .github/workflows/release.yml | 8 +++++--- .github/workflows/rm-arm.yml | 4 +++- .github/workflows/staging-create-infra.yml | 2 ++ .github/workflows/staging-delete-infra.yml | 2 ++ .github/workflows/staging-tests.yml | 2 ++ .github/workflows/staging.yml | 7 +++++-- .github/workflows/test-core.yml | 4 +++- .github/workflows/tests-ui.yml | 2 ++ 19 files changed, 53 insertions(+), 19 deletions(-) diff --git a/.github/workflows/beta.yml b/.github/workflows/beta.yml index e1839b017..0caa4b759 100644 --- a/.github/workflows/beta.yml +++ b/.github/workflows/beta.yml @@ -7,7 +7,6 @@ on: branches: [beta] jobs: - # Build amd64 + 386 containers images build-containers: strategy: @@ -133,6 +132,8 @@ jobs: steps: - name: Checkout source code uses: actions/checkout@v3 + with: + submodules: recursive - name: Get VERSION id: getversion run: echo "version=$(cat src/VERSION | tr -d '\n')" >> "$GITHUB_OUTPUT" @@ -145,7 +146,8 @@ jobs: needs: [create-arm, wait-builds] strategy: matrix: - image: [bunkerweb, bunkerweb-scheduler, bunkerweb-autoconf, bunkerweb-ui] + image: + [bunkerweb, bunkerweb-scheduler, bunkerweb-autoconf, bunkerweb-ui] include: - release: beta - image: bunkerweb @@ -281,5 +283,3 @@ jobs: SCW_SECRET_KEY: ${{ secrets.SCW_SECRET_KEY }} SCW_DEFAULT_PROJECT_ID: ${{ secrets.SCW_DEFAULT_PROJECT_ID }} SCW_DEFAULT_ORGANIZATION_ID: ${{ secrets.SCW_DEFAULT_ORGANIZATION_ID }} - - diff --git a/.github/workflows/container-build.yml b/.github/workflows/container-build.yml index 975eb9da7..c6e0f7540 100644 --- a/.github/workflows/container-build.yml +++ b/.github/workflows/container-build.yml @@ -50,6 +50,8 @@ jobs: # Prepare - name: Checkout source code uses: actions/checkout@v3 + with: + submodules: recursive - name: Setup SSH for ARM node if: inputs.CACHE_SUFFIX == 'arm' run: | diff --git a/.github/workflows/create-arm.yml b/.github/workflows/create-arm.yml index b574d7679..adea7c1d9 100644 --- a/.github/workflows/create-arm.yml +++ b/.github/workflows/create-arm.yml @@ -35,6 +35,8 @@ jobs: # Prepare - name: Checkout source code uses: actions/checkout@v3 + with: + submodules: recursive - name: Create ARM VM id: scw uses: scaleway/action-scw@bbcfd65cd2af73456ce439088e0d42c1657c4c38 @@ -72,4 +74,3 @@ jobs: run: ssh root@$SSH_IP "curl -fsSL https://test.docker.com -o test-docker.sh ; sh test-docker.sh" env: SSH_IP: ${{ fromJson(steps.scw.outputs.json).public_ip.address }} - diff --git a/.github/workflows/dev-update-mmdb.yml b/.github/workflows/dev-update-mmdb.yml index 98d32b288..85698bf73 100644 --- a/.github/workflows/dev-update-mmdb.yml +++ b/.github/workflows/dev-update-mmdb.yml @@ -17,6 +17,7 @@ jobs: fetch-depth: 0 token: ${{ secrets.BUNKERBOT_TOKEN }} ref: dev + submodules: recursive - name: Download mmdb files run: | mkdir -p src/bw/misc/ diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index d468e6ba3..d898a75ef 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -47,6 +47,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 + with: + submodules: recursive - name: Initialize CodeQL uses: github/codeql-action/init@v2 with: @@ -74,6 +76,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 + with: + submodules: recursive - id: set-matrix run: | tests=$(find ./tests/core/ -maxdepth 1 -mindepth 1 -type d -printf "%f\n" | jq -c --raw-input --slurp 'split("\n")| .[0:-1]') diff --git a/.github/workflows/doc-to-pdf.yml b/.github/workflows/doc-to-pdf.yml index aeaff9e04..f345c0324 100644 --- a/.github/workflows/doc-to-pdf.yml +++ b/.github/workflows/doc-to-pdf.yml @@ -14,10 +14,12 @@ jobs: # Prepare - name: Checkout source code uses: actions/checkout@v3 + with: + submodules: recursive - name: Install Python uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: "3.10" - name: Install doc requirements run: pip install -r docs/requirements.txt - name: Install chromium @@ -36,4 +38,3 @@ jobs: with: name: BunkerWeb_documentation_v${{ inputs.VERSION }}.pdf path: BunkerWeb_documentation_v${{ inputs.VERSION }}.pdf - diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index 5eaea0c4a..ad6983603 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -42,20 +42,22 @@ jobs: # Prepare - name: Checkout source code uses: actions/checkout@v3 + with: + submodules: recursive - name: Extract arch - run : | + run: | echo "ARCH=${{ env.PLATFORMS }}" | sed 's/linux//g' | sed 's@/@@g' >> "$GITHUB_ENV" env: PLATFORMS: ${{ inputs.PLATFORMS }} - name: Extract linux arch if: inputs.PACKAGE == 'rpm' - run : | + run: | echo "LARCH=${{ env.ARCH }}" | sed 's/amd64/x86_64/g' | sed 's/arm64/aarch64/g' >> "$GITHUB_ENV" env: ARCH: ${{ env.ARCH }} - name: Extract linux arch if: inputs.PACKAGE == 'deb' - run : | + run: | echo "LARCH=${{ env.ARCH }}" >> "$GITHUB_ENV" env: ARCH: ${{ env.ARCH }} diff --git a/.github/workflows/push-doc.yml b/.github/workflows/push-doc.yml index c5802149c..0a46cd6a7 100644 --- a/.github/workflows/push-doc.yml +++ b/.github/workflows/push-doc.yml @@ -22,13 +22,14 @@ jobs: with: fetch-depth: 0 token: ${{ secrets.BUNKERBOT_TOKEN }} + submodules: recursive - name: Setup git user run: | git config --global user.name "BunkerBot" git config --global user.email "bunkerbot@bunkerity.com" - uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: "3.10" - name: Install doc requirements run: pip install -r docs/requirements.txt - name: Push doc diff --git a/.github/workflows/push-docker.yml b/.github/workflows/push-docker.yml index 64838a77b..6f9dc941b 100644 --- a/.github/workflows/push-docker.yml +++ b/.github/workflows/push-docker.yml @@ -31,6 +31,8 @@ jobs: # Prepare - name: Check out repository code uses: actions/checkout@v3 + with: + submodules: recursive - name: Login to Docker Hub uses: docker/login-action@v2 with: diff --git a/.github/workflows/push-github.yml b/.github/workflows/push-github.yml index 3490143ef..d535e8802 100644 --- a/.github/workflows/push-github.yml +++ b/.github/workflows/push-github.yml @@ -16,6 +16,8 @@ jobs: steps: # Checkout - uses: actions/checkout@v3 + with: + submodules: recursive # Get PDF doc - name: Get documentation uses: actions/download-artifact@v3 @@ -60,4 +62,3 @@ jobs: tag_name: v${{ inputs.VERSION }} discussion_category_name: Announcements files: BunkerWeb_documentation_v${{ inputs.VERSION }}.pdf - diff --git a/.github/workflows/push-packagecloud.yml b/.github/workflows/push-packagecloud.yml index 135203a59..2efddafec 100644 --- a/.github/workflows/push-packagecloud.yml +++ b/.github/workflows/push-packagecloud.yml @@ -41,6 +41,8 @@ jobs: # Prepare - name: Check out repository code uses: actions/checkout@v3 + with: + submodules: recursive - name: Install ruby uses: ruby/setup-ruby@v1 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 830166ddf..ab7a9cd2a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,6 @@ on: branches: [master] jobs: - # Build amd64 + 386 containers images build-containers: strategy: @@ -133,6 +132,8 @@ jobs: steps: - name: Checkout source code uses: actions/checkout@v3 + with: + submodules: recursive - name: Get VERSION id: getversion run: echo "version=$(cat src/VERSION | tr -d '\n')" >> "$GITHUB_OUTPUT" @@ -145,7 +146,8 @@ jobs: needs: [create-arm, wait-builds] strategy: matrix: - image: [bunkerweb, bunkerweb-scheduler, bunkerweb-autoconf, bunkerweb-ui] + image: + [bunkerweb, bunkerweb-scheduler, bunkerweb-autoconf, bunkerweb-ui] include: - release: latest - image: bunkerweb @@ -280,4 +282,4 @@ jobs: SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY }} SCW_SECRET_KEY: ${{ secrets.SCW_SECRET_KEY }} SCW_DEFAULT_PROJECT_ID: ${{ secrets.SCW_DEFAULT_PROJECT_ID }} - SCW_DEFAULT_ORGANIZATION_ID: ${{ secrets.SCW_DEFAULT_ORGANIZATION_ID }} \ No newline at end of file + SCW_DEFAULT_ORGANIZATION_ID: ${{ secrets.SCW_DEFAULT_ORGANIZATION_ID }} diff --git a/.github/workflows/rm-arm.yml b/.github/workflows/rm-arm.yml index feac21de5..5f6a388c0 100644 --- a/.github/workflows/rm-arm.yml +++ b/.github/workflows/rm-arm.yml @@ -22,6 +22,8 @@ jobs: # Prepare - name: Checkout source code uses: actions/checkout@v3 + with: + submodules: recursive - name: Delete ARM VM uses: scaleway/action-scw@bbcfd65cd2af73456ce439088e0d42c1657c4c38 with: @@ -30,4 +32,4 @@ jobs: access-key: ${{ secrets.SCW_ACCESS_KEY }} secret-key: ${{ secrets.SCW_SECRET_KEY }} default-project-id: ${{ secrets.SCW_DEFAULT_PROJECT_ID }} - default-organization-id: ${{ secrets.SCW_DEFAULT_ORGANIZATION_ID }} \ No newline at end of file + default-organization-id: ${{ secrets.SCW_DEFAULT_ORGANIZATION_ID }} diff --git a/.github/workflows/staging-create-infra.yml b/.github/workflows/staging-create-infra.yml index bb4e06008..18f254129 100644 --- a/.github/workflows/staging-create-infra.yml +++ b/.github/workflows/staging-create-infra.yml @@ -20,6 +20,8 @@ jobs: if: inputs.TYPE != 'k8s' - name: Checkout source code uses: actions/checkout@v3 + with: + submodules: recursive - name: Install terraform uses: hashicorp/setup-terraform@v2 - name: Install kubectl diff --git a/.github/workflows/staging-delete-infra.yml b/.github/workflows/staging-delete-infra.yml index 960af0f5f..bed1df42f 100644 --- a/.github/workflows/staging-delete-infra.yml +++ b/.github/workflows/staging-delete-infra.yml @@ -18,6 +18,8 @@ jobs: # Prepare - name: Checkout source code uses: actions/checkout@v3 + with: + submodules: recursive - name: Install terraform uses: hashicorp/setup-terraform@v2 - uses: actions/download-artifact@v3 diff --git a/.github/workflows/staging-tests.yml b/.github/workflows/staging-tests.yml index 5248e340e..3071e7ffb 100644 --- a/.github/workflows/staging-tests.yml +++ b/.github/workflows/staging-tests.yml @@ -26,6 +26,8 @@ jobs: # Prepare - name: Checkout source code uses: actions/checkout@v3 + with: + submodules: recursive - name: Login to private repository uses: docker/login-action@v2 with: diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 072b009cf..58d50227e 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -7,7 +7,6 @@ on: branches: [staging] jobs: - # Build Docker images build-containers: strategy: @@ -77,6 +76,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 + with: + submodules: recursive - name: Initialize CodeQL uses: github/codeql-action/init@v2 with: @@ -135,6 +136,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 + with: + submodules: recursive - id: set-matrix run: | tests=$(find ./tests/core/ -maxdepth 1 -mindepth 1 -type d -printf "%f\n" | jq -c --raw-input --slurp 'split("\n")| .[0:-1]') @@ -166,4 +169,4 @@ jobs: with: TYPE: ${{ matrix.type }} secrets: - CICD_SECRETS: ${{ secrets.CICD_SECRETS }} \ No newline at end of file + CICD_SECRETS: ${{ secrets.CICD_SECRETS }} diff --git a/.github/workflows/test-core.yml b/.github/workflows/test-core.yml index 0433b44f1..03276d53e 100644 --- a/.github/workflows/test-core.yml +++ b/.github/workflows/test-core.yml @@ -21,6 +21,8 @@ jobs: # Prepare - name: Checkout source code uses: actions/checkout@v3 + with: + submodules: recursive - name: Login to private repository uses: docker/login-action@v2 with: @@ -37,4 +39,4 @@ jobs: cd ./tests/core/${{ inputs.TEST }} find . -type f -name 'docker-compose.*' -exec sed -i "s@bunkerity/bunkerweb:.*@bunkerweb-tests@" {} \; find . -type f -name 'docker-compose.*' -exec sed -i "s@bunkerity/bunkerweb-scheduler:.*@scheduler-tests@" {} \; - ./test.sh \ No newline at end of file + ./test.sh diff --git a/.github/workflows/tests-ui.yml b/.github/workflows/tests-ui.yml index 93125bd4b..a2577fbb8 100644 --- a/.github/workflows/tests-ui.yml +++ b/.github/workflows/tests-ui.yml @@ -18,6 +18,8 @@ jobs: # Prepare - name: Checkout source code uses: actions/checkout@v3 + with: + submodules: recursive - name: Login to private repository uses: docker/login-action@v2 with: