Skip to content

Commit 4ec14c3

Browse files
Fix windows integ test workflow
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
1 parent 36fe977 commit 4ec14c3

File tree

1 file changed

+39
-12
lines changed

1 file changed

+39
-12
lines changed

.github/workflows/integration-test.yml

Lines changed: 39 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,31 +44,58 @@ jobs:
4444
plugin-name: ${{ env.PLUGIN_NAME }}
4545
download-location: ${{env.PLUGIN_NAME}}
4646
plugin-version: ${{ env.PLUGIN_VERSION }}
47+
48+
- name: Compute plugin URIs (Linux)
49+
if: ${{ runner.os == 'Linux' }}
50+
shell: bash
51+
run: |
52+
echo "PLUGIN_URI=file:${GITHUB_WORKSPACE}/${{ env.PLUGIN_NAME }}.zip" >> "$GITHUB_ENV"
53+
echo "REMOTE_PLUGIN_URI=file:${GITHUB_WORKSPACE}/opensearch-security-${{ env.OPENSEARCH_VERSION }}.zip" >> "$GITHUB_ENV"
4754
48-
- name: Run Opensearch with A Single Plugin Remote Cluster
49-
uses: derek-ho/start-opensearch@v7
55+
- name: Compute plugin URIs (Windows)
56+
if: ${{ runner.os == 'Windows' }}
57+
shell: pwsh
58+
run: |
59+
$zip1 = Join-Path $env:GITHUB_WORKSPACE "$env:PLUGIN_NAME.zip"
60+
$zip2 = Join-Path $env:GITHUB_WORKSPACE ("opensearch-security-{0}.zip" -f $env:OPENSEARCH_VERSION)
61+
62+
if (!(Test-Path $zip1)) { throw "Plugin zip not found: $zip1" }
63+
if (!(Test-Path $zip2)) { throw "Plugin zip not found: $zip2" }
64+
65+
$uri1 = [System.Uri]::new($zip1).AbsoluteUri # file:///D:/...
66+
$uri2 = [System.Uri]::new($zip2).AbsoluteUri
67+
68+
"PLUGIN_URI=$uri1" >> $env:GITHUB_ENV
69+
"REMOTE_PLUGIN_URI=$uri2" >> $env:GITHUB_ENV
70+
71+
72+
73+
- name: Run OpenSearch with A Single Plugin Remote Cluster
74+
uses: derek-ho/start-opensearch@v8
5075
with:
5176
opensearch-version: ${{ env.OPENSEARCH_VERSION }}
52-
plugins: "file:$(pwd)/opensearch-security-${{ env.OPENSEARCH_VERSION }}.zip"
53-
security-enabled: true
77+
plugins: ${{ env.REMOTE_PLUGIN_URI }}
78+
security-enabled: 'true'
5479
admin-password: ${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }}
5580
security_config_file: ${{ inputs.security_config_file }}
56-
port: 9202
57-
jdk-version: 21
81+
port: '9202'
82+
jdk-version: '21'
83+
5884

5985
- name: Check OpenSearch remote is running
6086
run: |
6187
curl https://localhost:9202/_cat/plugins -v -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} -k
6288
shell: bash
63-
64-
- name: Run Opensearch with security
65-
uses: derek-ho/start-opensearch@v7
89+
90+
- name: Run OpenSearch with security
91+
uses: derek-ho/start-opensearch@v8
6692
with:
6793
opensearch-version: ${{ env.OPENSEARCH_VERSION }}
68-
plugins: "file:$(pwd)/${{ env.PLUGIN_NAME }}.zip"
69-
security-enabled: true
94+
plugins: ${{ env.PLUGIN_URI }}
95+
security-enabled: 'true'
7096
admin-password: ${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }}
71-
jdk-version: 21
97+
jdk-version: '21'
98+
7299

73100
# https://github.com/actions/runner-images/issues/2840#issuecomment-790492173
74101
- name: Remove unnecessary files Linux

0 commit comments

Comments
 (0)