Skip to content

Commit

Permalink
Refactor artifact download logic to ensure consistent execution in cy…
Browse files Browse the repository at this point in the history
…press and ftr workflows by removing existence checks
  • Loading branch information
guidomodarelli committed Nov 7, 2024
1 parent a51b415 commit 61c281c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/cypress-e2e-reporting-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,16 @@ jobs:
run: |
if [ ! -d "plugin-artifacts" ]; then
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"
else
echo "Folder already exists. Skipping download."
fi
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
run: |
if [ ! -d "plugin-artifacts" ]; then
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"
else
echo "Folder already exists. Skipping download."
fi
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
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/ftr-e2e-reporting-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,16 @@ jobs:
run: |
if [ ! -d "plugin-artifacts" ]; then
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"
else
echo "Folder already exists. Skipping download."
fi
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
run: |
if [ ! -d "plugin-artifacts" ]; then
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"
else
echo "Folder already exists. Skipping download."
fi
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
Expand Down

0 comments on commit 61c281c

Please sign in to comment.