diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 3a9ef663c..f5018c9c7 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -5,64 +5,81 @@ on: [push, pull_request] env: TEST_BROWSER_HEADLESS: 1 CI: 1 + OPENSEARCH_VERSION: 3.0.0 + PLUGIN_NAME: opensearch-security jobs: tests: name: Run integration tests runs-on: ubuntu-latest steps: + - name: Checkout Branch + uses: actions/checkout@v2 + - uses: browser-actions/setup-geckodriver@latest - run: geckodriver --version - uses: browser-actions/setup-firefox@latest - run: firefox --version - - name: Checkout Branch - uses: actions/checkout@v2 - - - name: Download OpenSearch Core - run: | - wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/3.0.0/latest/linux/x64/tar/builds/opensearch/dist/opensearch-min-3.0.0-linux-x64.tar.gz - tar -xzf opensearch-*.tar.gz - rm -f opensearch-*.tar.gz + #- name: Download OpenSearch Core + # run: | + # wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/3.0.0/latest/linux/x64/tar/builds/opensearch/dist/opensearch-min-3.0.0-linux-x64.tar.gz + # tar -xzf opensearch-*.tar.gz + # rm -f opensearch-*.tar.gz - name: Download OpenSearch Security Plugin - run: wget -O opensearch-security.zip https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/3.0.0/latest/linux/x64/tar/builds/opensearch/plugins/opensearch-security-3.0.0.0.zip - - - name: Run OpenSearch with plugin + run: wget --progress=bar:force:noscroll -O opensearch-security.zip https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/3.0.0/latest/linux/x64/tar/builds/opensearch/plugins/opensearch-security-3.0.0.0.zip + + # + #- name: Run OpenSearch with plugin + # run: | + # cat > os-ep.sh <> /opensearch/config/opensearch.yml + # chown 1001:1001 -R /opensearch + # su -c "/opensearch/bin/opensearch" -s /bin/bash opensearch + # EOF + # docker build -t opensearch-test:latest -f- . < os-ep.sh <> /opensearch/config/opensearch.yml - chown 1001:1001 -R /opensearch - su -c "/opensearch/bin/opensearch" -s /bin/bash opensearch - EOF - docker build -t opensearch-test:latest -f- . < 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" + echo "plugins.security.unsupported.restapi.allow_securityconfig_modification: true" >> ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/config/opensearch.yml EOF - docker run -d --network=host -i opensearch-test:latest - - # - name: Checkout Branch - # uses: actions/checkout@v2 - # - # - name: Run OpenSearch with Security Plugin - # uses: ./.github/actions/install-opensearch - # with: - # opensearch_version: 3.0.0 - # security_plugin_version: 3.0.0.0 - # plugin-name: opensearch-security - # plugin-start-script: install_demo_configuration - # plugin-zip: security-plugin.zip + + - name: Run Opensearch with A Single Plugin + #uses: opensearch-project/security/.github/actions/start-opensearch-with-one-plugin@main + uses: RyanL1997/security/.github/actions/start-opensearch-with-one-plugin@security-reusable-action + with: + opensearch-version: ${{ env.OPENSEARCH_VERSION }} + plugin-name: ${{ env.PLUGIN_NAME }} + setup-script-name: setup + + #- name: Run OpenSearch with Security Plugin + # uses: opensearch-project/security/.github/actions/install-opensearch + # with: + # opensearch_version: 3.0.0 + # security_plugin_version: 3.0.0.0 + # plugin-name: opensearch-security + # plugin-start-script: install_demo_configuration + # plugin-zip: security-plugin.zip - id: install-dashboards uses: ./.github/actions/install-dashboards