From 4019aa1686e7e014a9fa72abb9695e188e66e129 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Tue, 26 Dec 2023 15:32:37 -0500 Subject: [PATCH] [2.x] Pass in env variable and -t flag to set "admin" as the initial admin password (#1708) * Pass in env variable and -t flag to fix CI Signed-off-by: Derek Ho * Add it to the oidc and saml workflows Signed-off-by: Derek Ho * Pass in -t flag to windows setup Signed-off-by: Derek Ho --------- Signed-off-by: Derek Ho --- .github/actions/download-plugin/action.yml | 4 ++-- .github/workflows/cypress-test-oidc-e2e.yml | 2 ++ .github/workflows/cypress-test-saml-e2e.yml | 2 ++ .github/workflows/integration-test.yml | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/actions/download-plugin/action.yml b/.github/actions/download-plugin/action.yml index 7234f725e..dae0f5dbb 100644 --- a/.github/actions/download-plugin/action.yml +++ b/.github/actions/download-plugin/action.yml @@ -30,7 +30,7 @@ runs: run: | cat > setup.sh <<'EOF' chmod +x ./opensearch-${{ inputs.opensearch-version}}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/install_demo_configuration.sh - /bin/bash -c "yes | ./opensearch-${{ inputs.opensearch-version}}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/install_demo_configuration.sh" + /bin/bash -c "yes | ./opensearch-${{ inputs.opensearch-version}}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/install_demo_configuration.sh -t" echo "plugins.security.unsupported.restapi.allow_securityconfig_modification: true" >> ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/config/opensearch.yml echo "cluster.routing.allocation.disk.threshold_enabled: false" >> ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/config/opensearch.yml EOF @@ -40,7 +40,7 @@ runs: if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - Set-Content .\setup.bat -Value "powershell.exe -noexit -command `".\opensearch-${{ inputs.opensearch-version}}-SNAPSHOT\plugins\${{ inputs.plugin-name }}\tools\install_demo_configuration.bat -y -i -c`"" + Set-Content .\setup.bat -Value "powershell.exe -noexit -command `".\opensearch-${{ inputs.opensearch-version}}-SNAPSHOT\plugins\${{ inputs.plugin-name }}\tools\install_demo_configuration.bat -y -i -c -t`"" Add-Content -Path .\setup.bat -Value "echo plugins.security.unsupported.restapi.allow_securityconfig_modification: true >> .\opensearch-${{ inputs.opensearch-version}}-SNAPSHOT\config\opensearch.yml" Add-Content -Path .\setup.bat -Value "echo cluster.routing.allocation.disk.threshold_enabled: false >> .\opensearch-${{ inputs.opensearch-version}}-SNAPSHOT\config\opensearch.yml" Get-Content .\setup.bat diff --git a/.github/workflows/cypress-test-oidc-e2e.yml b/.github/workflows/cypress-test-oidc-e2e.yml index 649fa5599..02c7970aa 100644 --- a/.github/workflows/cypress-test-oidc-e2e.yml +++ b/.github/workflows/cypress-test-oidc-e2e.yml @@ -21,6 +21,8 @@ jobs: matrix: os: [ ubuntu-latest ] runs-on: ${{ matrix.os }} + env: + OPENSEARCH_INITIAL_ADMIN_PASSWORD: admin steps: - name: Set up JDK diff --git a/.github/workflows/cypress-test-saml-e2e.yml b/.github/workflows/cypress-test-saml-e2e.yml index 1ce11455c..8da609f0c 100644 --- a/.github/workflows/cypress-test-saml-e2e.yml +++ b/.github/workflows/cypress-test-saml-e2e.yml @@ -17,6 +17,8 @@ jobs: matrix: os: [ ubuntu-latest ] runs-on: ${{ matrix.os }} + env: + OPENSEARCH_INITIAL_ADMIN_PASSWORD: admin steps: - name: Set up JDK diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 22d0d616b..ce187826d 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -15,6 +15,8 @@ jobs: matrix: os: [ ubuntu-latest , windows-latest ] runs-on: ${{ matrix.os }} + env: + OPENSEARCH_INITIAL_ADMIN_PASSWORD: admin steps: - name: Checkout Branch