Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions .github/actions/start-opensearch-with-one-plugin/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ runs:

# Download OpenSearch
- name: Download OpenSearch for Windows
uses: peternied/download-file@v1
uses: peternied/download-file@v2
if: ${{ runner.os == 'Windows' }}
with:
url: https://artifacts.opensearch.org/snapshots/core/opensearch/${{ inputs.opensearch-version }}-SNAPSHOT/opensearch-min-${{ inputs.opensearch-version }}-SNAPSHOT-windows-x64-latest.zip


- name: Download OpenSearch for Linux
uses: peternied/download-file@v1
uses: peternied/download-file@v2
if: ${{ runner.os == 'Linux' }}
with:
url: https://artifacts.opensearch.org/snapshots/core/opensearch/${{ inputs.opensearch-version }}-SNAPSHOT/opensearch-min-${{ inputs.opensearch-version }}-SNAPSHOT-linux-x64-latest.tar.gz
Expand Down Expand Up @@ -119,7 +119,6 @@ runs:
Invoke-WebRequest -SkipCertificateCheck -Uri 'https://localhost:9200/_cat/plugins' -Headers $Headers;
shell: pwsh

- name: Run sanity tests
uses: gradle/gradle-build-action@v2
with:
arguments: integTestRemote -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="opensearch" -Dhttps=true -Duser=admin -Dpassword=admin
- if: always()
run: cat ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/logs/opensearch.log
shell: bash
5 changes: 2 additions & 3 deletions .github/workflows/plugin_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,14 @@ jobs:
run: |
cat > setup.sh <<'EOF'
chmod +x ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/plugins/${{ env.PLUGIN_NAME }}/tools/install_demo_configuration.sh
/bin/bash -c "yes | ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/plugins/${{ env.PLUGIN_NAME }}/tools/install_demo_configuration.sh"
/bin/bash -c "./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/plugins/${{ env.PLUGIN_NAME }}/tools/install_demo_configuration.sh -y"
EOF

- name: Create Setup Script
if: ${{ runner.os == 'Windows' }}
run: |
New-Item .\setup.bat -type file
Set-Content .\setup.bat -Value "powershell.exe -noexit -command `"echo 'y' | .\opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT\plugins\${{ env.PLUGIN_NAME }}\tools\install_demo_configuration.bat`""
Get-Content .\setup.bat
Set-Content .\setup.bat -Value "powershell.exe .\opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT\plugins\${{ env.PLUGIN_NAME }}\tools\install_demo_configuration.bat -y"

- name: Run Opensearch with A Single Plugin
uses: ./.github/actions/start-opensearch-with-one-plugin
Expand Down
5 changes: 5 additions & 0 deletions tools/install_demo_configuration.bat
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ if %cluster_mode% == 0 (
)
)

if %assumeyes% == 1 (
set "initsecurity=1"
set "cluster_mode=1"
)

set BASE_DIR=%SCRIPT_DIR%\..\..\..\
if not exist %BASE_DIR% (
echo "basedir does not exist"
Expand Down
4 changes: 4 additions & 0 deletions tools/install_demo_configuration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ if [ "$cluster_mode" == 0 ] && [ "$assumeyes" == 0 ]; then
esac
fi

if [ "$assumeyes" == 1 ]; then
cluster_mode=1
initsecurity=1
fi

set -e
BASE_DIR="$DIR/../../.."
Expand Down