From 67588f610e57f59c5e7b38886046092f754bb6bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20David=20Guti=C3=A9rrez?= Date: Fri, 13 Dec 2024 16:37:31 +0100 Subject: [PATCH] fix: upgrade the version of GHA cherry-pick: e14778fbc74d02fab0bc5118339d6dc44cd2f171 --- .github/actions/run-cypress-tests/action.yml | 9 +++++---- .github/workflows/auto-release.yml | 9 ++++++--- .github/workflows/backport.yml | 7 +++++-- .github/workflows/codeql.yml | 2 +- .github/workflows/cypress-test-multiauth-e2e.yml | 2 +- .../cypress-test-multidatasources-disabled-e2e.yml | 2 +- .../cypress-test-multidatasources-enabled-e2e.yml | 4 ++-- .github/workflows/cypress-test-oidc-e2e.yml | 2 +- .github/workflows/cypress-test-saml-e2e.yml | 2 +- .github/workflows/cypress-test-tenancy-disabled.yml | 9 +++++---- .github/workflows/cypress-test.yml | 9 +++++---- .github/workflows/dev-environment.yml | 7 ++++--- .github/workflows/integration-test.yml | 9 +++++---- .github/workflows/unit-test.yml | 2 +- .github/workflows/verify-binary-installation.yml | 6 +++--- 15 files changed, 46 insertions(+), 35 deletions(-) diff --git a/.github/actions/run-cypress-tests/action.yml b/.github/actions/run-cypress-tests/action.yml index 11caaf9c2..d3173c098 100644 --- a/.github/actions/run-cypress-tests/action.yml +++ b/.github/actions/run-cypress-tests/action.yml @@ -20,8 +20,9 @@ runs: using: "composite" steps: - name: Set up JDK - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: + distribution: 'temurin' java-version: 11 - name: Set env @@ -41,7 +42,7 @@ runs: download-location: ${{ env.PLUGIN_NAME }} - name: Run Opensearch with A Single Plugin - uses: derek-ho/start-opensearch@v2 + uses: derek-ho/start-opensearch@v6 with: opensearch-version: ${{ env.OPENSEARCH_VERSION }} plugins: "file:$(pwd)/opensearch-security.zip" @@ -51,7 +52,7 @@ runs: # OSD bootstrap - name: Run Dashboard with Security Dashboards Plugin - uses: derek-ho/setup-opensearch-dashboards@v1 + uses: derek-ho/setup-opensearch-dashboards@v3 with: plugin_name: security-dashboards-plugin opensearch_dashboards_yml: ${{ inputs.dashboards_config_file }} @@ -104,7 +105,7 @@ runs: shell: bash - name: Run Cypress Tests with retry - uses: Wandalen/wretry.action@v3.3.0 + uses: Wandalen/wretry.action@v3 with: attempt_limit: 5 attempt_delay: 2000 diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index 61518c10f..82a0f4d9d 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -14,15 +14,18 @@ jobs: steps: - name: GitHub App token id: github_app_token - uses: tibdex/github-app-token@v1.5.0 + uses: tibdex/github-app-token@v2.1.0 with: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.APP_PRIVATE_KEY }} - installation_id: 22958780 + # https://github.com/tibdex/github-app-token/releases/tag/v2.0.0 + # https://github.com/tibdex/github-app-token/compare/v1.5.0...v2.1.0#diff-1243c5424efaaa19bd8e813c5e6f6da46316e63761421b3e5f5c8ced9a36e6b6R11-R30 + installation_retrieval_mode: id + installation_retrieval_payload: 22958780 - name: Get tag id: tag uses: dawidd6/action-get-tag@v1 - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: ncipollo/release-action@v1 with: github_token: ${{ steps.github_app_token.outputs.token }} diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 374d4d986..d057d27ea 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -20,10 +20,13 @@ jobs: with: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.APP_PRIVATE_KEY }} - installation_id: 22958780 + # https://github.com/tibdex/github-app-token/releases/tag/v2.0.0 + # https://github.com/tibdex/github-app-token/compare/v1.5.0...v2.1.0#diff-1243c5424efaaa19bd8e813c5e6f6da46316e63761421b3e5f5c8ced9a36e6b6R11-R30 + installation_retrieval_mode: id + installation_retrieval_payload: 22958780 - name: Backport - uses: VachaShah/backport@v2.2.0 + uses: VachaShah/backport@v2 with: github_token: ${{ steps.github_app_token.outputs.token }} head_template: backport/backport-<%= number %>-to-<%= base %> diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 092c298a3..8c7e91460 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -41,7 +41,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/cypress-test-multiauth-e2e.yml b/.github/workflows/cypress-test-multiauth-e2e.yml index bb7985f9b..fb6d72074 100644 --- a/.github/workflows/cypress-test-multiauth-e2e.yml +++ b/.github/workflows/cypress-test-multiauth-e2e.yml @@ -22,7 +22,7 @@ jobs: steps: - name: Checkout Branch - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Add SAML Configuration - name: Injecting SAML Configuration for Linux diff --git a/.github/workflows/cypress-test-multidatasources-disabled-e2e.yml b/.github/workflows/cypress-test-multidatasources-disabled-e2e.yml index e41de5fab..17381a999 100644 --- a/.github/workflows/cypress-test-multidatasources-disabled-e2e.yml +++ b/.github/workflows/cypress-test-multidatasources-disabled-e2e.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Checkout Branch - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Configure the Dashboard for multi datasources disabled (default) - name: Create OpenSearch Dashboards Config diff --git a/.github/workflows/cypress-test-multidatasources-enabled-e2e.yml b/.github/workflows/cypress-test-multidatasources-enabled-e2e.yml index 162941cf1..8ec05496e 100644 --- a/.github/workflows/cypress-test-multidatasources-enabled-e2e.yml +++ b/.github/workflows/cypress-test-multidatasources-enabled-e2e.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Checkout Branch - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set env run: | @@ -67,7 +67,7 @@ jobs: download-location: ${{env.PLUGIN_NAME}} - name: Run Opensearch with A Single Plugin - uses: derek-ho/start-opensearch@v4 + uses: derek-ho/start-opensearch@v6 with: opensearch-version: ${{ env.OPENSEARCH_VERSION }} plugins: "file:$(pwd)/opensearch-security.zip" diff --git a/.github/workflows/cypress-test-oidc-e2e.yml b/.github/workflows/cypress-test-oidc-e2e.yml index d02b3f8a9..6d6f622ed 100644 --- a/.github/workflows/cypress-test-oidc-e2e.yml +++ b/.github/workflows/cypress-test-oidc-e2e.yml @@ -26,7 +26,7 @@ jobs: steps: - name: Checkout Branch - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Download and Check Keycloak Version - name: Download and Check Keyloak Version on Linux diff --git a/.github/workflows/cypress-test-saml-e2e.yml b/.github/workflows/cypress-test-saml-e2e.yml index 292cb2fe3..0f09d0c42 100644 --- a/.github/workflows/cypress-test-saml-e2e.yml +++ b/.github/workflows/cypress-test-saml-e2e.yml @@ -22,7 +22,7 @@ jobs: steps: - name: Checkout Branch - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Add SAML Configuration - name: Create SAML Configuration for Linux diff --git a/.github/workflows/cypress-test-tenancy-disabled.yml b/.github/workflows/cypress-test-tenancy-disabled.yml index 972a138ff..b65ee693c 100644 --- a/.github/workflows/cypress-test-tenancy-disabled.yml +++ b/.github/workflows/cypress-test-tenancy-disabled.yml @@ -23,12 +23,13 @@ jobs: steps: - name: Set up JDK - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: + distribution: 'temurin' java-version: 11 - name: Checkout Branch - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set env run: | @@ -47,7 +48,7 @@ jobs: download-location: ${{ env.PLUGIN_NAME }} - name: Run Opensearch with security - uses: derek-ho/start-opensearch@v2 + uses: derek-ho/start-opensearch@v6 with: opensearch-version: ${{ env.OPENSEARCH_VERSION }} plugins: 'file:$(pwd)/${{ env.PLUGIN_NAME }}.zip' @@ -70,7 +71,7 @@ jobs: EOT - name: Run Dashboard with Security Dashboards Plugin - uses: derek-ho/setup-opensearch-dashboards@v1 + uses: derek-ho/setup-opensearch-dashboards@v3 with: plugin_name: security-dashboards-plugin app_reference: ${{ vars.WZD_REF }} diff --git a/.github/workflows/cypress-test.yml b/.github/workflows/cypress-test.yml index 408cb9962..218e716d0 100644 --- a/.github/workflows/cypress-test.yml +++ b/.github/workflows/cypress-test.yml @@ -23,12 +23,13 @@ jobs: steps: - name: Set up JDK - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: + distribution: 'temurin' java-version: 11 - name: Checkout Branch - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set env run: | @@ -47,7 +48,7 @@ jobs: download-location: ${{ env.PLUGIN_NAME }} - name: Run Opensearch with security - uses: derek-ho/start-opensearch@v2 + uses: derek-ho/start-opensearch@v6 with: opensearch-version: ${{ env.OPENSEARCH_VERSION }} plugins: 'file:$(pwd)/${{ env.PLUGIN_NAME }}.zip' @@ -72,7 +73,7 @@ jobs: EOT - name: Run Dashboard with Security Dashboards Plugin - uses: derek-ho/setup-opensearch-dashboards@v1 + uses: derek-ho/setup-opensearch-dashboards@v3 with: plugin_name: security-dashboards-plugin app_reference: ${{ vars.WZD_REF }} diff --git a/.github/workflows/dev-environment.yml b/.github/workflows/dev-environment.yml index b378cab22..411bf800d 100644 --- a/.github/workflows/dev-environment.yml +++ b/.github/workflows/dev-environment.yml @@ -47,7 +47,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Step 01 - Download the plugin's source code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: wazuh/wazuh-security-dashboards-plugin ref: ${{ inputs.reference }} @@ -75,7 +75,7 @@ jobs: yarn config set registry https://registry.yarnpkg.com; cd /home/node/kbn/plugins/wazuh-security-plugin && yarn && ${{ inputs.command }}; ' - - name: Get the plugin version and and format reference name + - name: Get the plugin version and format reference name run: | echo "githubReference=$(echo ${{ inputs.reference }} | sed 's/\//-/g')" >> $GITHUB_ENV echo "version=$(jq -r '.wazuh.version' $(pwd)/wazuh-security-plugin/package.json)" >> $GITHUB_ENV @@ -83,10 +83,11 @@ jobs: - name: Step 04 - Upload artifact to GitHub if: ${{ inputs.artifact_name && inputs.artifact_path }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ inputs.artifact_name }}_${{ env.version }}-${{ env.revision }}_${{ env.githubReference }}.zip path: ${{ inputs.artifact_path }} + overwrite: true - name: Step 05 - Upload coverage results to GitHub if: ${{ inputs.notify_jest_coverage_summary && github.event_name == 'pull_request' }} diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 7b5a646b8..bf03c72d2 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -19,11 +19,12 @@ jobs: steps: - name: Checkout Branch - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up JDK - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: + distribution: 'temurin' java-version: 11 - name: Set env @@ -69,7 +70,7 @@ jobs: plugin-version: ${{ env.PLUGIN_VERSION }} - name: Run Opensearch with A Single Plugin Remote Cluster - uses: derek-ho/start-opensearch@v4 + uses: derek-ho/start-opensearch@v6 with: opensearch-version: ${{ env.OPENSEARCH_VERSION }} plugins: "file:$(pwd)/opensearch-security-${{ env.OPENSEARCH_VERSION }}.zip" @@ -84,7 +85,7 @@ jobs: shell: bash - name: Run Opensearch with security - uses: derek-ho/start-opensearch@v2 + uses: derek-ho/start-opensearch@v6 with: opensearch-version: ${{ env.OPENSEARCH_VERSION }} plugins: 'file:$(pwd)/${{ env.PLUGIN_NAME }}.zip' diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index bd104510c..ec0eaf1d3 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -17,7 +17,7 @@ jobs: # run: git config --system core.longpaths true - name: Checkout Branch - uses: actions/checkout@v2 + uses: actions/checkout@v4 - id: install-dashboards uses: derek-ho/setup-opensearch-dashboards@v3 diff --git a/.github/workflows/verify-binary-installation.yml b/.github/workflows/verify-binary-installation.yml index 7718b690e..5827e4605 100644 --- a/.github/workflows/verify-binary-installation.yml +++ b/.github/workflows/verify-binary-installation.yml @@ -20,7 +20,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout Branch - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set env run: | @@ -39,7 +39,7 @@ jobs: download-location: ${{ env.PLUGIN_NAME }} - name: Run Opensearch with security - uses: derek-ho/start-opensearch@v2 + uses: derek-ho/start-opensearch@v6 with: opensearch-version: ${{ env.OPENSEARCH_VERSION }} plugins: "file:$(pwd)/${{ env.PLUGIN_NAME }}.zip" @@ -67,7 +67,7 @@ jobs: - name: Run Dashboard with Security Dashboards Plugin id: setup-dashboards - uses: derek-ho/setup-opensearch-dashboards@v2 + uses: derek-ho/setup-opensearch-dashboards@v3 with: plugin_name: security-dashboards-plugin built_plugin_name: security-dashboards