From e8fd2571adc32098049ffd615253666c62f651df Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Thu, 16 Feb 2023 19:03:48 +0000 Subject: [PATCH] Switch to maven to download plugin Signed-off-by: Peter Nied --- .github/actions/download-plugin/action.yml | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/.github/actions/download-plugin/action.yml b/.github/actions/download-plugin/action.yml index 0b5473a1e..bbec33c8a 100644 --- a/.github/actions/download-plugin/action.yml +++ b/.github/actions/download-plugin/action.yml @@ -17,20 +17,12 @@ inputs: runs: using: "composite" steps: - - name: Download OpenSearch for Linux - uses: peternied/download-file@v2 - if: ${{ runner.os == 'Linux' }} - with: - url: https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${{ inputs.opensearch-version }}/latest/linux/x64/tar/builds/opensearch/plugins/${{ inputs.plugin-name }}-${{ inputs.plugin-version }}.zip - - - name: Download OpenSearch for Windows - uses: peternied/download-file@v2 - if: ${{ runner.os == 'Windows' }} - with: - url: https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${{ inputs.opensearch-version }}/latest/windows/x64/zip/builds/opensearch/plugins/${{ inputs.plugin-name }}-${{ inputs.plugin-version }}.zip - - - name: Rename the Plugin Files - run: mv opensearch-security-${{ inputs.plugin-version }}.zip opensearch-security.zip + - run: | + mvn dependency:get \ + -DremoteRepositories=https://aws.oss.sonatype.org/content/repositories/snapshots/ \ + -Dartifact=org.opensearch.plugin:${{ inputs.plugin-name }}:${{ inputs.plugin-version }}-SNAPSHOT:zip \ + -Dtransitive=false \ + -Ddest=${{ inputs.plugin-name }}.zip shell: bash - name: Create Setup Script for Linux