Skip to content

Commit ae4e4ee

Browse files
guidomodarelliTostti
authored andcommitted
Update the actions' version (#6)
* 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
1 parent 901eda5 commit ae4e4ee

9 files changed

+64
-67
lines changed

.github/workflows/backport.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@ jobs:
1616
steps:
1717
- name: GitHub App token
1818
id: github_app_token
19-
uses: tibdex/github-app-token@v1.5.0
19+
uses: tibdex/github-app-token@v2.1.0
2020
with:
2121
app_id: ${{ secrets.APP_ID }}
2222
private_key: ${{ secrets.APP_PRIVATE_KEY }}
23-
installation_id: 22958780
23+
# https://github.com/tibdex/github-app-token/releases/tag/v2.0.0
24+
# https://github.com/tibdex/github-app-token/compare/v1.5.0...v2.1.0#diff-1243c5424efaaa19bd8e813c5e6f6da46316e63761421b3e5f5c8ced9a36e6b6R11-R30
25+
installation_retrieval_mode: id
26+
installation_retrieval_payload: 22958780
2427

2528
- name: Backport
2629
uses: VachaShah/[email protected]

.github/workflows/cypress-e2e-reporting-test.yml

+16-20
Original file line numberDiff line numberDiff line change
@@ -23,28 +23,27 @@ jobs:
2323

2424
steps:
2525
- name: Set up JDK
26-
uses: actions/setup-java@v1
26+
uses: actions/setup-java@v4
2727
with:
28+
distribution: 'temurin'
2829
java-version: ${{ matrix.jdk }}
2930

3031
- name: Download Job Scheduler artifact
31-
uses: suisei-cn/[email protected]
32-
with:
33-
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
34-
target: plugin-artifacts/
35-
filename: job-scheduler.zip
32+
run: |
33+
mkdir -p plugin-artifacts
34+
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"
35+
shell: bash
3636

3737
- name: Download Reports Scheduler artifact
38-
uses: suisei-cn/[email protected]
39-
with:
40-
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
41-
target: plugin-artifacts/
42-
filename: reports-scheduler.zip
38+
run: |
39+
mkdir -p plugin-artifacts
40+
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"
41+
shell: bash
4342

4443
- name: Download OpenSearch
45-
uses: peternied/download-file@v2
46-
with:
47-
url: https://artifacts.opensearch.org/snapshots/core/opensearch/${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/opensearch-min-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT-linux-x64-latest.tar.gz
44+
run: |
45+
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
46+
shell: bash
4847

4948
- name: Extract OpenSearch
5049
run: |
@@ -79,18 +78,15 @@ jobs:
7978
shell: bash
8079

8180
- name: Checkout OpenSearch Dashboards
82-
uses: actions/checkout@v2
81+
uses: actions/checkout@v4
8382
with:
8483
path: OpenSearch-Dashboards
8584
repository: opensearch-project/OpenSearch-Dashboards
8685
ref: ${{ env.OPENSEARCH_DASHBOARDS_VERSION }}
8786
fetch-depth: 0
88-
filter: |
89-
cypress
90-
test
9187

9288
- name: Checkout Dashboards Reporting Plugin in OpenSearch Dashboards Plugins Dir
93-
uses: actions/checkout@v2
89+
uses: actions/checkout@v4
9490
with:
9591
path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
9692

@@ -101,7 +97,7 @@ jobs:
10197
working-directory: OpenSearch-Dashboards
10298
shell: bash
10399

104-
- uses: actions/setup-node@v1
100+
- uses: actions/setup-node@v4
105101
with:
106102
node-version: ${{ steps.tool-versions.outputs.node_version }}
107103
registry-url: 'https://registry.npmjs.org'

.github/workflows/dashboards-reports-test-and-build-workflow.yml

+14-14
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,19 @@ jobs:
2727

2828
steps:
2929
- name: Checkout OpenSearch Dashboards
30-
uses: actions/checkout@v2
30+
uses: actions/checkout@v4
3131
with:
3232
repository: opensearch-project/Opensearch-Dashboards
3333
ref: ${{ env.OPENSEARCH_VERSION }}
3434
path: OpenSearch-Dashboards
3535

3636
- name: Checkout Plugin
37-
uses: actions/checkout@v2
37+
uses: actions/checkout@v4
3838
with:
3939
path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
4040

4141
- name: OpenSearch Dashboards Plugin Bootstrap and test
42-
uses: nick-fields/retry@v1
42+
uses: nick-fields/retry@v2.9.0
4343
with:
4444
timeout_minutes: 30
4545
max_attempts: 3
@@ -51,7 +51,7 @@ jobs:
5151
whoami && yarn osd bootstrap --single-version=loose && yarn test --coverage"
5252
5353
- name: Upload coverage
54-
uses: codecov/codecov-action@v1
54+
uses: codecov/codecov-action@v3
5555
with:
5656
flags: dashboards-report
5757
directory: ./OpenSearch-Dashboards/plugins/
@@ -81,14 +81,14 @@ jobs:
8181
# run: git config --system core.longpaths true
8282

8383
# - name: Checkout OpenSearch Dashboards
84-
# uses: actions/checkout@v1
84+
# uses: actions/checkout@v4
8585
# with:
8686
# repository: opensearch-project/Opensearch-Dashboards
8787
# ref: ${{ env.OPENSEARCH_VERSION }}
8888
# path: OpenSearch-Dashboards
8989

9090
# - name: Setup Node
91-
# uses: actions/setup-node@v3
91+
# uses: actions/setup-node@v4
9292
# with:
9393
# node-version-file: '../OpenSearch-Dashboards/.nvmrc'
9494
# registry-url: 'https://registry.npmjs.org'
@@ -105,19 +105,19 @@ jobs:
105105
# - run: yarn -v
106106

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

112112
# - name: OpenSearch Dashboards Plugin Bootstrap
113-
# uses: nick-fields/retry@v1
113+
# uses: nick-fields/retry@v2.9.0
114114
# with:
115115
# timeout_minutes: 30
116116
# max_attempts: 3
117117
# command: yarn osd bootstrap --single-version=loose
118118

119119
# - name: Test
120-
# uses: nick-fields/retry@v1
120+
# uses: nick-fields/retry@v2.9.0
121121
# with:
122122
# timeout_minutes: 30
123123
# max_attempts: 3
@@ -138,14 +138,14 @@ jobs:
138138
# runs-on: macos-latest
139139
# steps:
140140
# - name: Checkout OpenSearch Dashboards
141-
# uses: actions/checkout@v1
141+
# uses: actions/checkout@v4
142142
# with:
143143
# repository: opensearch-project/Opensearch-Dashboards
144144
# ref: ${{ env.OPENSEARCH_VERSION }}
145145
# path: OpenSearch-Dashboards
146146

147147
# - name: Setup Node
148-
# uses: actions/setup-node@v3
148+
# uses: actions/setup-node@v4
149149
# with:
150150
# node-version-file: '../OpenSearch-Dashboards/.nvmrc'
151151
# registry-url: 'https://registry.npmjs.org'
@@ -162,19 +162,19 @@ jobs:
162162
# - run: yarn -v
163163

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

169169
# - name: OpenSearch Dashboards Plugin Bootstrap
170-
# uses: nick-fields/retry@v1
170+
# uses: nick-fields/retry@v2.9.0
171171
# with:
172172
# timeout_minutes: 30
173173
# max_attempts: 3
174174
# command: yarn osd bootstrap --single-version=loose
175175

176176
# - name: Test
177-
# uses: nick-fields/retry@v1
177+
# uses: nick-fields/retry@v2.9.0
178178
# with:
179179
# timeout_minutes: 30
180180
# max_attempts: 3

.github/workflows/dev-environment.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
runs-on: ubuntu-latest
4848
steps:
4949
- name: Step 01 - Download the plugin's source code
50-
uses: actions/checkout@v3
50+
uses: actions/checkout@v4
5151
with:
5252
repository: wazuh/wazuh-dashboards-reporting
5353
ref: ${{ inputs.reference }}
@@ -83,10 +83,11 @@ jobs:
8383
8484
- name: Step 04 - Upload artifact to GitHub
8585
if: ${{ inputs.artifact_name && inputs.artifact_path }}
86-
uses: actions/upload-artifact@v3
86+
uses: actions/upload-artifact@v4
8787
with:
8888
name: ${{ inputs.artifact_name }}_${{ env.version }}-${{ env.revision }}_${{ env.githubReference }}.zip
8989
path: ${{ inputs.artifact_path }}
90+
overwrite: true
9091

9192
- name: Step 05 - Upload coverage results to GitHub
9293
if: ${{ inputs.notify_jest_coverage_summary && github.event_name == 'pull_request' }}

.github/workflows/draft-release-notes-workflow.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ jobs:
1212
steps:
1313
# Drafts your next Release notes as Pull Requests are merged into "main"
1414
- name: Update draft release notes
15-
uses: release-drafter/release-drafter@v5
15+
# https://github.com/release-drafter/release-drafter/compare/v5.25.0...v6.0.0
16+
uses: release-drafter/release-drafter@v6
1617
with:
1718
config-name: draft-release-notes-config.yml
1819
tag: (None)

.github/workflows/ftr-e2e-reporting-test.yml

+17-21
Original file line numberDiff line numberDiff line change
@@ -23,28 +23,27 @@ jobs:
2323

2424
steps:
2525
- name: Set up JDK
26-
uses: actions/setup-java@v1
26+
uses: actions/setup-java@v4
2727
with:
28+
distribution: 'temurin'
2829
java-version: ${{ matrix.jdk }}
2930

3031
- name: Download Job Scheduler artifact
31-
uses: suisei-cn/[email protected]
32-
with:
33-
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
34-
target: plugin-artifacts/
35-
filename: job-scheduler.zip
32+
run: |
33+
mkdir -p plugin-artifacts
34+
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"
35+
shell: bash
3636

3737
- name: Download Reports Scheduler artifact
38-
uses: suisei-cn/[email protected]
39-
with:
40-
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
41-
target: plugin-artifacts/
42-
filename: reports-scheduler.zip
38+
run: |
39+
mkdir -p plugin-artifacts
40+
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"
41+
shell: bash
4342

4443
- name: Download OpenSearch
45-
uses: peternied/download-file@v2
46-
with:
47-
url: https://artifacts.opensearch.org/snapshots/core/opensearch/${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/opensearch-min-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT-linux-x64-latest.tar.gz
44+
run: |
45+
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
46+
shell: bash
4847

4948
- name: Extract OpenSearch
5049
run: |
@@ -79,18 +78,15 @@ jobs:
7978
shell: bash
8079

8180
- name: Checkout OpenSearch Dashboards
82-
uses: actions/checkout@v2
81+
uses: actions/checkout@v4
8382
with:
8483
path: OpenSearch-Dashboards
8584
repository: opensearch-project/OpenSearch-Dashboards
8685
ref: ${{ env.OPENSEARCH_DASHBOARDS_VERSION }}
8786
fetch-depth: 0
88-
filter: |
89-
cypress
90-
test
9187

9288
- name: Checkout Dashboards Reporting Plugin in OpenSearch Dashboards Plugins Dir
93-
uses: actions/checkout@v2
89+
uses: actions/checkout@v4
9490
with:
9591
path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
9692

@@ -101,7 +97,7 @@ jobs:
10197
working-directory: OpenSearch-Dashboards
10298
shell: bash
10399

104-
- uses: actions/setup-node@v1
100+
- uses: actions/setup-node@v4
105101
with:
106102
node-version: ${{ steps.tool-versions.outputs.node_version }}
107103
registry-url: 'https://registry.npmjs.org'
@@ -137,7 +133,7 @@ jobs:
137133
working-directory: OpenSearch-Dashboards
138134

139135
- name: Checkout Dashboards Functioanl Test Repo
140-
uses: actions/checkout@v2
136+
uses: actions/checkout@v4
141137
with:
142138
path: opensearch-dashboards-functional-test
143139
repository: opensearch-project/opensearch-dashboards-functional-test

.github/workflows/link-checker.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v4
1515
- name: lychee Link Checker
1616
id: lychee
1717
uses: lycheeverse/lychee-action@master

.github/workflows/lint.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ jobs:
1313

1414
steps:
1515
- name: Checkout OpenSearch Dashboards
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v4
1717
with:
1818
repository: opensearch-project/Opensearch-Dashboards
1919
ref: ${{ env.OPENSEARCH_DASHBOARDS_VERSION }}
2020
path: OpenSearch-Dashboards
2121

2222
- name: Checkout dashboards reporting
23-
uses: actions/checkout@v2
23+
uses: actions/checkout@v4
2424
with:
2525
path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
2626
fetch-depth: 0
@@ -33,7 +33,7 @@ jobs:
3333
echo "::set-output name=yarn_version::$(node -p "(require('./OpenSearch-Dashboards/package.json').engines.yarn).match(/[.0-9]+/)[0]")"
3434
3535
- name: Setup node
36-
uses: actions/setup-node@v1
36+
uses: actions/setup-node@v4
3737
with:
3838
node-version: ${{ steps.versions_step.outputs.node_version }}
3939
registry-url: "https://registry.npmjs.org"

.github/workflows/verify-binary-installation.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ${{ matrix.os }}
1919
steps:
2020
- name: Checkout Branch
21-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
2222

2323
- name: Set env
2424
run: |
@@ -29,14 +29,14 @@ jobs:
2929
shell: bash
3030

3131
- name: Run Opensearch
32-
uses: derek-ho/start-opensearch@v2
32+
uses: derek-ho/start-opensearch@v6
3333
with:
3434
opensearch-version: ${{ env.OPENSEARCH_VERSION }}
3535
security-enabled: false
3636

3737
- name: Run Dashboard
3838
id: setup-dashboards
39-
uses: derek-ho/setup-opensearch-dashboards@v2
39+
uses: derek-ho/setup-opensearch-dashboards@v3
4040
with:
4141
plugin_name: dashboards-reporting
4242
built_plugin_name: reportsDashboards

0 commit comments

Comments
 (0)