Skip to content

Commit

Permalink
Update the actions' version (#6)
Browse files Browse the repository at this point in the history
* Update GitHub Actions to use checkout@v4 for consistency and improved functionality across workflows

* Downgrade actions/checkout from v4 to v3 for consistent versioning across Cypress and FTR workflows

* Update actions/checkout to v4 in workflows

* Downgrade actions/checkout from v4 to v3 in Cypress and FTR workflows for consistent versioning and setup

* Update actions/upload-artifact to v4 and enable overwrite for GitHub artifact uploads

* Update actions/setup-node to v4 across all workflows to ensure consistency and benefit from latest features

* Update tibdex/github-app-token to v2.1.0 and adjust installation retrieval settings for improved flexibility in workflows

* Update actions/setup-java to v4 in cypress and ftr workflows for consistency and access to latest improvements

* Update suisei-cn/actions-download-file to v1.6.0 in cypress and ftr workflows for consistent artifact management

* Add 'temurin' distribution to JDK setup in cypress and ftr workflows for improved consistency

* Upgrade download-file action to v3 in cypress and ftr workflows for enhanced performance and consistency

* Replace download-file action with wget command in cypress and ftr workflows for improved reliability in OpenSearch download

* Replace download-file action with wget command in cypress workflow for improved reliability in OpenSearch artifact downloads

* Check for existing files before downloading OpenSearch artifacts in cypress and ftr workflows to avoid redundant downloads

* Adjust existence check to directories instead of files for downloading OpenSearch artifacts in cypress and ftr workflows

* Refactor artifact download logic to ensure consistent execution in cypress and ftr workflows by removing existence checks

* Update retry action version to v2.9.0 for OpenSearch Dashboards plugin bootstrap and test in workflows

* Fix retry action reference in workflows to use single '@' for v2.9.0 in dashboards reports test and build workflow

* Update codecov action version to v4.6.0 for improved coverage reporting in dashboards reports test and build workflow

* Streamline mkdir usage in workflows by removing redundant checks for plugin-artifacts directory creation

* Downgrade codecov action to v3 to address compatibility issues in dashboards reports test and build workflow

* Upgrade release-drafter action to v6 for better draft release notes handling in workflows

* Upgrade start-opensearch action to v6 for enhanced functionality in binary installation verification workflow

* Upgrade setup-opensearch-dashboards action to v3 for improved dashboard setup in binary installation verification workflow

* Upgrade actions/checkout to v4 for enhanced functionality in Cypress and FTR E2E reporting test workflows
  • Loading branch information
guidomodarelli authored Nov 8, 2024
1 parent f09ab39 commit 1164c4b
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 67 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ 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: Backport
uses: VachaShah/backport@v2.2.0
Expand Down
36 changes: 16 additions & 20 deletions .github/workflows/cypress-e2e-reporting-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,27 @@ jobs:

steps:
- name: Set up JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.jdk }}

- name: Download Job Scheduler artifact
uses: suisei-cn/actions-download-file@v1.4.0
with:
url: https://aws.oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.opensearch.plugin&a=opensearch-job-scheduler&v=${{ env.OPENSEARCH_PLUGIN_VERSION }}-SNAPSHOT&p=zip
target: plugin-artifacts/
filename: job-scheduler.zip
run: |
mkdir -p plugin-artifacts
wget -O plugin-artifacts/job-scheduler.zip "https://aws.oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.opensearch.plugin&a=opensearch-job-scheduler&v=${{ env.OPENSEARCH_PLUGIN_VERSION }}-SNAPSHOT&p=zip"
shell: bash

- name: Download Reports Scheduler artifact
uses: suisei-cn/actions-download-file@v1.4.0
with:
url: https://aws.oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.opensearch.plugin&a=opensearch-reports-scheduler&v=${{ env.OPENSEARCH_PLUGIN_VERSION }}-SNAPSHOT&p=zip
target: plugin-artifacts/
filename: reports-scheduler.zip
run: |
mkdir -p plugin-artifacts
wget -O plugin-artifacts/reports-scheduler.zip "https://aws.oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.opensearch.plugin&a=opensearch-reports-scheduler&v=${{ env.OPENSEARCH_PLUGIN_VERSION }}-SNAPSHOT&p=zip"
shell: bash

- name: Download OpenSearch
uses: peternied/download-file@v2
with:
url: https://artifacts.opensearch.org/snapshots/core/opensearch/${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/opensearch-min-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT-linux-x64-latest.tar.gz
run: |
wget 'https://artifacts.opensearch.org/snapshots/core/opensearch/${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/opensearch-min-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT-linux-x64-latest.tar.gz' --retry-connrefused --tries=3 --no-dns-cache --progress=bar:force:noscroll --verbose
shell: bash

- name: Extract OpenSearch
run: |
Expand Down Expand Up @@ -79,18 +78,15 @@ jobs:
shell: bash

- name: Checkout OpenSearch Dashboards
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: OpenSearch-Dashboards
repository: opensearch-project/OpenSearch-Dashboards
ref: ${{ env.OPENSEARCH_DASHBOARDS_VERSION }}
fetch-depth: 0
filter: |
cypress
test

- name: Checkout Dashboards Reporting Plugin in OpenSearch Dashboards Plugins Dir
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}

Expand All @@ -101,7 +97,7 @@ jobs:
working-directory: OpenSearch-Dashboards
shell: bash

- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: ${{ steps.tool-versions.outputs.node_version }}
registry-url: 'https://registry.npmjs.org'
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/dashboards-reports-test-and-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ jobs:

steps:
- name: Checkout OpenSearch Dashboards
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: opensearch-project/Opensearch-Dashboards
ref: ${{ env.OPENSEARCH_VERSION }}
path: OpenSearch-Dashboards

- name: Checkout Plugin
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}

- name: OpenSearch Dashboards Plugin Bootstrap and test
uses: nick-fields/retry@v1
uses: nick-fields/retry@v2.9.0
with:
timeout_minutes: 30
max_attempts: 3
Expand All @@ -51,7 +51,7 @@ jobs:
whoami && yarn osd bootstrap --single-version=loose && yarn test --coverage"
- name: Upload coverage
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
flags: dashboards-report
directory: ./OpenSearch-Dashboards/plugins/
Expand Down Expand Up @@ -81,14 +81,14 @@ jobs:
# run: git config --system core.longpaths true

# - name: Checkout OpenSearch Dashboards
# uses: actions/checkout@v1
# uses: actions/checkout@v4
# with:
# repository: opensearch-project/Opensearch-Dashboards
# ref: ${{ env.OPENSEARCH_VERSION }}
# path: OpenSearch-Dashboards

# - name: Setup Node
# uses: actions/setup-node@v3
# uses: actions/setup-node@v4
# with:
# node-version-file: '../OpenSearch-Dashboards/.nvmrc'
# registry-url: 'https://registry.npmjs.org'
Expand All @@ -105,19 +105,19 @@ jobs:
# - run: yarn -v

# - name: Checkout Plugin
# uses: actions/checkout@v1
# uses: actions/checkout@v4
# with:
# path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}

# - name: OpenSearch Dashboards Plugin Bootstrap
# uses: nick-fields/retry@v1
# uses: nick-fields/retry@v2.9.0
# with:
# timeout_minutes: 30
# max_attempts: 3
# command: yarn osd bootstrap --single-version=loose

# - name: Test
# uses: nick-fields/retry@v1
# uses: nick-fields/retry@v2.9.0
# with:
# timeout_minutes: 30
# max_attempts: 3
Expand All @@ -138,14 +138,14 @@ jobs:
# runs-on: macos-latest
# steps:
# - name: Checkout OpenSearch Dashboards
# uses: actions/checkout@v1
# uses: actions/checkout@v4
# with:
# repository: opensearch-project/Opensearch-Dashboards
# ref: ${{ env.OPENSEARCH_VERSION }}
# path: OpenSearch-Dashboards

# - name: Setup Node
# uses: actions/setup-node@v3
# uses: actions/setup-node@v4
# with:
# node-version-file: '../OpenSearch-Dashboards/.nvmrc'
# registry-url: 'https://registry.npmjs.org'
Expand All @@ -162,19 +162,19 @@ jobs:
# - run: yarn -v

# - name: Checkout Plugin
# uses: actions/checkout@v1
# uses: actions/checkout@v4
# with:
# path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}

# - name: OpenSearch Dashboards Plugin Bootstrap
# uses: nick-fields/retry@v1
# uses: nick-fields/retry@v2.9.0
# with:
# timeout_minutes: 30
# max_attempts: 3
# command: yarn osd bootstrap --single-version=loose

# - name: Test
# uses: nick-fields/retry@v1
# uses: nick-fields/retry@v2.9.0
# with:
# timeout_minutes: 30
# max_attempts: 3
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/dev-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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-dashboards-reporting
ref: ${{ inputs.reference }}
Expand Down Expand Up @@ -82,10 +82,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 }}_${{ inputs.reference }}.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' }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/draft-release-notes-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ jobs:
steps:
# Drafts your next Release notes as Pull Requests are merged into "main"
- name: Update draft release notes
uses: release-drafter/release-drafter@v5
# https://github.com/release-drafter/release-drafter/compare/v5.25.0...v6.0.0
uses: release-drafter/release-drafter@v6
with:
config-name: draft-release-notes-config.yml
tag: (None)
Expand Down
38 changes: 17 additions & 21 deletions .github/workflows/ftr-e2e-reporting-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,27 @@ jobs:

steps:
- name: Set up JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.jdk }}

- name: Download Job Scheduler artifact
uses: suisei-cn/actions-download-file@v1.4.0
with:
url: https://aws.oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.opensearch.plugin&a=opensearch-job-scheduler&v=${{ env.OPENSEARCH_PLUGIN_VERSION }}-SNAPSHOT&p=zip
target: plugin-artifacts/
filename: job-scheduler.zip
run: |
mkdir -p plugin-artifacts
wget -O plugin-artifacts/job-scheduler.zip "https://aws.oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.opensearch.plugin&a=opensearch-job-scheduler&v=${{ env.OPENSEARCH_PLUGIN_VERSION }}-SNAPSHOT&p=zip"
shell: bash

- name: Download Reports Scheduler artifact
uses: suisei-cn/actions-download-file@v1.4.0
with:
url: https://aws.oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.opensearch.plugin&a=opensearch-reports-scheduler&v=${{ env.OPENSEARCH_PLUGIN_VERSION }}-SNAPSHOT&p=zip
target: plugin-artifacts/
filename: reports-scheduler.zip
run: |
mkdir -p plugin-artifacts
wget -O plugin-artifacts/reports-scheduler.zip "https://aws.oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.opensearch.plugin&a=opensearch-reports-scheduler&v=${{ env.OPENSEARCH_PLUGIN_VERSION }}-SNAPSHOT&p=zip"
shell: bash

- name: Download OpenSearch
uses: peternied/download-file@v2
with:
url: https://artifacts.opensearch.org/snapshots/core/opensearch/${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/opensearch-min-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT-linux-x64-latest.tar.gz
run: |
wget 'https://artifacts.opensearch.org/snapshots/core/opensearch/${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/opensearch-min-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT-linux-x64-latest.tar.gz' --retry-connrefused --tries=3 --no-dns-cache --progress=bar:force:noscroll --verbose
shell: bash

- name: Extract OpenSearch
run: |
Expand Down Expand Up @@ -79,18 +78,15 @@ jobs:
shell: bash

- name: Checkout OpenSearch Dashboards
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: OpenSearch-Dashboards
repository: opensearch-project/OpenSearch-Dashboards
ref: ${{ env.OPENSEARCH_DASHBOARDS_VERSION }}
fetch-depth: 0
filter: |
cypress
test

- name: Checkout Dashboards Reporting Plugin in OpenSearch Dashboards Plugins Dir
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}

Expand All @@ -101,7 +97,7 @@ jobs:
working-directory: OpenSearch-Dashboards
shell: bash

- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: ${{ steps.tool-versions.outputs.node_version }}
registry-url: 'https://registry.npmjs.org'
Expand Down Expand Up @@ -137,7 +133,7 @@ jobs:
working-directory: OpenSearch-Dashboards

- name: Checkout Dashboards Functioanl Test Repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: opensearch-dashboards-functional-test
repository: opensearch-project/opensearch-dashboards-functional-test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/link-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: lychee Link Checker
id: lychee
uses: lycheeverse/lychee-action@master
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ jobs:

steps:
- name: Checkout OpenSearch Dashboards
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: opensearch-project/Opensearch-Dashboards
ref: ${{ env.OPENSEARCH_DASHBOARDS_VERSION }}
path: OpenSearch-Dashboards

- name: Checkout dashboards reporting
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
fetch-depth: 0
Expand All @@ -33,7 +33,7 @@ jobs:
echo "::set-output name=yarn_version::$(node -p "(require('./OpenSearch-Dashboards/package.json').engines.yarn).match(/[.0-9]+/)[0]")"
- name: Setup node
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ steps.versions_step.outputs.node_version }}
registry-url: "https://registry.npmjs.org"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/verify-binary-installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Branch
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set env
run: |
Expand All @@ -29,14 +29,14 @@ jobs:
shell: bash

- name: Run Opensearch
uses: derek-ho/start-opensearch@v2
uses: derek-ho/start-opensearch@v6
with:
opensearch-version: ${{ env.OPENSEARCH_VERSION }}
security-enabled: false

- name: Run Dashboard
id: setup-dashboards
uses: derek-ho/setup-opensearch-dashboards@v2
uses: derek-ho/setup-opensearch-dashboards@v3
with:
plugin_name: dashboards-reporting
built_plugin_name: reportsDashboards
Expand Down

0 comments on commit 1164c4b

Please sign in to comment.