From 5a71721a6a5d2a4a4031eac2cabe40882eec4c98 Mon Sep 17 00:00:00 2001 From: sumukhswamy Date: Fri, 21 Feb 2025 10:44:46 -0800 Subject: [PATCH] reverted workflow Signed-off-by: sumukhswamy --- .../release-e2e-workflow-template.yml | 54 ++++--------------- 1 file changed, 9 insertions(+), 45 deletions(-) diff --git a/.github/workflows/release-e2e-workflow-template.yml b/.github/workflows/release-e2e-workflow-template.yml index dc03863db..76c30e751 100644 --- a/.github/workflows/release-e2e-workflow-template.yml +++ b/.github/workflows/release-e2e-workflow-template.yml @@ -8,12 +8,6 @@ on: test-command: required: true type: string - osd-serve-args: - required: false - type: string - security-enabled: - required: false - type: string jobs: tests: name: Run Cypress E2E tests for ${{ inputs.test-name }} @@ -37,31 +31,13 @@ jobs: working-directory: cypress-test run: | echo "VERSION=$(yarn --silent pkg-version)" >> $GITHUB_ENV - - name: Get security setups - run: | - SECURITY_ENABLED=${{ inputs.security-enabled }} - if [ "$SECURITY_ENABLED" != 'false' ]; then - echo "SECURITY_ENABLED=true" >> $GITHUB_ENV - else - echo "SECURITY_ENABLED=false" >> $GITHUB_ENV - fi - name: Get and run OpenSearch run: | wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${{ env.VERSION }}/latest/linux/x64/tar/dist/opensearch/opensearch-${{ env.VERSION }}-linux-x64.tar.gz tar -xzf opensearch-${{ env.VERSION }}-linux-x64.tar.gz cd opensearch-${{ env.VERSION }}/ - if [ "$SECURITY_ENABLED" = 'false' ]; then - echo "Remove OpenSearch Security" - [ -d "plugins/opensearch-security" ] && echo "plugins.security.disabled: true" >> config/opensearch.yml - ./opensearch-tar-install.sh & - timeout 900 bash -c 'while [[ "$(curl -o /dev/null -w ''%{http_code}'' http://localhost:9200)" != "200" ]]; do sleep 5; done' - curl http://localhost:9200 - else - echo "Keep OpenSearch Security" - ./opensearch-tar-install.sh & - timeout 900 bash -c 'while [[ "$(curl -o /dev/null -w ''%{http_code}'' -u admin:admin -k https://localhost:9200)" != "200" ]]; do sleep 5; done' - curl https://localhost:9200 -u admin:admin --insecure - fi + ./opensearch-tar-install.sh & + timeout 900 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' -u admin:admin -k https://localhost:9200)" != "200" ]]; do sleep 5; done' - name: Get OpenSearch-Dashboards run: | wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/${{ env.VERSION }}/latest/linux/x64/tar/dist/opensearch-dashboards/opensearch-dashboards-${{ env.VERSION }}-linux-x64.tar.gz @@ -69,7 +45,7 @@ jobs: - name: Get node and yarn versions id: versions run: | - echo "::set-output name=node_version::$(node -p "(require('./opensearch-dashboards-${{ env.VERSION }}/package.json').engines.node).match(/[.0-9]+/)[0]")" + echo "::set-output name=node_version::$(node -p "(require('./opensearch-dashboards-${{ env.VERSION }}-linux-x64/package.json').engines.node).match(/[.0-9]+/)[0]")" - name: Setup node uses: actions/setup-node@v1 with: @@ -78,20 +54,8 @@ jobs: - name: Run OpenSearch-Dashboards server run: | cd opensearch-dashboards-${{ env.VERSION }} - if [ "$SECURITY_ENABLED" = 'false' ]; then - echo "Remove Dashboards Security" - ./bin/opensearch-dashboards-plugin remove securityDashboards - sed -i /^opensearch_security/d config/opensearch_dashboards.yml - sed -i 's/https/http/' config/opensearch_dashboards.yml - bin/opensearch-dashboards serve ${{ inputs.osd-serve-args }} & - timeout 300 bash -c 'while [[ "$(curl http://localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done' - curl http://localhost:5601/api/status - else - echo "Keep Dashboards Security" - bin/opensearch-dashboards serve ${{ inputs.osd-serve-args }} & - timeout 300 bash -c 'while [[ "$(curl -u admin:admin -k http://localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done' - curl http://localhost:5601/api/status -u admin:admin --insecure - fi + bin/opensearch-dashboards serve & + timeout 300 bash -c 'while [[ "$(curl -s -u admin:admin -k localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done' - name: Get Cypress version id: cypress_version run: | @@ -113,20 +77,20 @@ jobs: command: ${{ inputs.test-command }} wait-on: 'http://localhost:5601' # Screenshots are only captured on failure, will change this once we do visual regression tests - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v1 if: failure() with: name: cypress-screenshots path: cypress-test/cypress/screenshots # Test run video was always captured, so this action uses "always()" condition - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v1 if: always() with: name: cypress-videos path: cypress-test/cypress/videos # Test reports was always captured, so this action uses "always()" condition - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v1 if: always() with: name: cypress-results - path: cypress-test/cypress/results + path: cypress-test/cypress/results \ No newline at end of file