prints #1314
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Plugin Install | |
on: [push, pull_request, workflow_dispatch] | |
env: | |
OPENSEARCH_VERSION: 3.0.0 | |
PLUGIN_NAME: opensearch-security | |
jobs: | |
plugin-install: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
jdk: [11, 17] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin # Temurin is a distribution of adoptium | |
java-version: ${{ matrix.jdk }} | |
- name: Checkout Branch | |
uses: actions/checkout@v4 | |
- name: Assemble target plugin | |
uses: gradle/gradle-build-action@v2 | |
with: | |
cache-disabled: true | |
arguments: assemble | |
# Move and rename the plugin for installation | |
- name: Move and rename the plugin for installation | |
run: mv ./build/distributions/${{ env.PLUGIN_NAME }}-*.zip ${{ env.PLUGIN_NAME }}.zip | |
shell: bash | |
- name: Create Setup Script | |
if: ${{ runner.os == 'Linux' }} | |
run: | | |
cat > setup.sh <<'EOF' | |
echo installPassword >> ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/config/opensearch-security/initialAdminPassword.txt | |
./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/config/opensearch-security | |
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" | |
EOF | |
- name: Create Setup Script | |
if: ${{ runner.os == 'Windows' }} | |
run: | | |
New-Item .\setup.bat -type file | |
echo "current dir is " dir | |
echo "pwd is " %cd | |
cd .\opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/config | |
echo "current dir is " dir | |
echo "pwd is " %cd | |
echo installPassword >> .\opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/config/opensearch-security/initialAdminPassword.txt | |
Set-Content .\setup.bat -Value "powershell.exe .\opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT\plugins\${{ env.PLUGIN_NAME }}\tools\install_demo_configuration.bat -i -c -y" | |
Get-Content .\setup.bat | |
- name: Run Opensearch with A Single Plugin | |
uses: ./.github/actions/start-opensearch-with-one-plugin | |
with: | |
opensearch-version: ${{ env.OPENSEARCH_VERSION }} | |
plugin-name: ${{ env.PLUGIN_NAME }} | |
setup-script-name: setup | |
- name: Run sanity tests | |
uses: gradle/gradle-build-action@v2 | |
with: | |
cache-disabled: true | |
arguments: integTestRemote -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="opensearch" -Dhttps=true -Duser=admin -Dpassword=installPassword |