diff --git a/.github/actions/run-cypress-tests/action.yml b/.github/actions/run-cypress-tests/action.yml index d7b81f196..3ae9ee0f2 100644 --- a/.github/actions/run-cypress-tests/action.yml +++ b/.github/actions/run-cypress-tests/action.yml @@ -1,9 +1,6 @@ name: Run Cypress Tests description: 'Runs Cypress tests for the security-dashboards-plugin with opensearch_dashboards.yml and security configuration provided' -env: - OPENSEARCH_VERSION: '3.1.0' - inputs: security_config_file: description: 'Name of the security plugin config file' @@ -24,7 +21,9 @@ runs: steps: - name: Set env run: | + opensearch_version=$(node -p "require('./package.json').opensearchDashboards.version") plugin_version=$(node -p "require('./package.json').version") + echo "OPENSEARCH_VERSION=$opensearch_version" >> $GITHUB_ENV echo "PLUGIN_VERSION=$plugin_version" >> $GITHUB_ENV shell: bash diff --git a/.github/workflows/cypress-test-multiauth-e2e.yml b/.github/workflows/cypress-test-multiauth-e2e.yml index c3fb8e869..66b1f408c 100644 --- a/.github/workflows/cypress-test-multiauth-e2e.yml +++ b/.github/workflows/cypress-test-multiauth-e2e.yml @@ -3,7 +3,6 @@ name: Snapshot based E2E SAML multi-auth tests workflow on: [ push, pull_request ] env: - OPENSEARCH_VERSION: '3.1.0' CI: 1 # avoid warnings like "tput: No value for $TERM and no -T specified" TERM: xterm @@ -23,6 +22,14 @@ jobs: steps: - name: Checkout Branch uses: actions/checkout@v3 + + - name: Set env + run: | + opensearch_version=$(node -p "require('./package.json').opensearchDashboards.version") + plugin_version=$(node -p "require('./package.json').version") + echo "OPENSEARCH_VERSION=$opensearch_version" >> $GITHUB_ENV + echo "PLUGIN_VERSION=$plugin_version" >> $GITHUB_ENV + shell: bash # Add SAML Configuration - name: Injecting SAML Configuration for Linux diff --git a/.github/workflows/cypress-test-multidatasources-disabled-e2e.yml b/.github/workflows/cypress-test-multidatasources-disabled-e2e.yml index 75eaa7291..4fd3a8404 100644 --- a/.github/workflows/cypress-test-multidatasources-disabled-e2e.yml +++ b/.github/workflows/cypress-test-multidatasources-disabled-e2e.yml @@ -3,7 +3,6 @@ name: E2E multi datasources disabled workflow on: [ push, pull_request ] env: - OPENSEARCH_VERSION: '3.1.0' CI: 1 # avoid warnings like "tput: No value for $TERM and no -T specified" TERM: xterm @@ -23,6 +22,14 @@ jobs: - name: Checkout Branch uses: actions/checkout@v3 + - name: Set env + run: | + opensearch_version=$(node -p "require('./package.json').opensearchDashboards.version") + plugin_version=$(node -p "require('./package.json').version") + echo "OPENSEARCH_VERSION=$opensearch_version" >> $GITHUB_ENV + echo "PLUGIN_VERSION=$plugin_version" >> $GITHUB_ENV + shell: bash + # Configure the Dashboard for multi datasources disabled (default) - name: Create OpenSearch Dashboards Config if: ${{ runner.os == 'Linux' }} diff --git a/.github/workflows/cypress-test-multidatasources-enabled-e2e.yml b/.github/workflows/cypress-test-multidatasources-enabled-e2e.yml index 26d8153e1..6da27486f 100644 --- a/.github/workflows/cypress-test-multidatasources-enabled-e2e.yml +++ b/.github/workflows/cypress-test-multidatasources-enabled-e2e.yml @@ -3,7 +3,6 @@ name: E2E multi datasources enabled workflow on: [ push, pull_request ] env: - OPENSEARCH_VERSION: '3.1.0' CI: 1 # avoid warnings like "tput: No value for $TERM and no -T specified" TERM: xterm @@ -25,7 +24,9 @@ jobs: - name: Set env run: | + opensearch_version=$(node -p "require('./package.json').opensearchDashboards.version") plugin_version=$(node -p "require('./package.json').version") + echo "OPENSEARCH_VERSION=$opensearch_version" >> $GITHUB_ENV echo "PLUGIN_VERSION=$plugin_version" >> $GITHUB_ENV shell: bash diff --git a/.github/workflows/cypress-test-oidc-e2e.yml b/.github/workflows/cypress-test-oidc-e2e.yml index df543ef25..08a20dd33 100644 --- a/.github/workflows/cypress-test-oidc-e2e.yml +++ b/.github/workflows/cypress-test-oidc-e2e.yml @@ -3,7 +3,6 @@ name: Snapshot based E2E OIDC tests workflow on: [ push, pull_request ] env: - OPENSEARCH_VERSION: '3.1.0' KEYCLOAK_VERSION: '21.0.1' TEST_KEYCLOAK_CLIENT_SECRET: 'oacHfNaXyy81r2uHq1A9RY4ASryre4rZ' CI: 1 @@ -28,6 +27,14 @@ jobs: - name: Checkout Branch uses: actions/checkout@v3 + - name: Set env + run: | + opensearch_version=$(node -p "require('./package.json').opensearchDashboards.version") + plugin_version=$(node -p "require('./package.json').version") + echo "OPENSEARCH_VERSION=$opensearch_version" >> $GITHUB_ENV + echo "PLUGIN_VERSION=$plugin_version" >> $GITHUB_ENV + shell: bash + # Download and Check Keycloak Version - name: Download and Check Keyloak Version on Linux if: ${{ runner.os == 'Linux' }} diff --git a/.github/workflows/cypress-test-saml-e2e.yml b/.github/workflows/cypress-test-saml-e2e.yml index ca5cef879..ea1180055 100644 --- a/.github/workflows/cypress-test-saml-e2e.yml +++ b/.github/workflows/cypress-test-saml-e2e.yml @@ -3,7 +3,6 @@ name: Snapshot based E2E SAML tests workflow on: [ push, pull_request ] env: - OPENSEARCH_VERSION: '3.1.0' CI: 1 # avoid warnings like "tput: No value for $TERM and no -T specified" TERM: xterm @@ -23,6 +22,14 @@ jobs: steps: - name: Checkout Branch uses: actions/checkout@v3 + + - name: Set env + run: | + opensearch_version=$(node -p "require('./package.json').opensearchDashboards.version") + plugin_version=$(node -p "require('./package.json').version") + echo "OPENSEARCH_VERSION=$opensearch_version" >> $GITHUB_ENV + echo "PLUGIN_VERSION=$plugin_version" >> $GITHUB_ENV + shell: bash # Add SAML Configuration - name: Create SAML Configuration for Linux diff --git a/.github/workflows/cypress-test-tenancy-disabled.yml b/.github/workflows/cypress-test-tenancy-disabled.yml index ba6073673..07679e790 100644 --- a/.github/workflows/cypress-test-tenancy-disabled.yml +++ b/.github/workflows/cypress-test-tenancy-disabled.yml @@ -11,7 +11,6 @@ env: SPEC: 'cypress/integration/plugins/security-dashboards-plugin/aggregation_view.js,' PLUGIN_NAME: opensearch-security OPENSEARCH_INITIAL_ADMIN_PASSWORD: myStrongPassword123! - OPENSEARCH_VERSION: '3.1.0' jobs: cypress-tests-multitenancy-disabled: @@ -28,7 +27,9 @@ jobs: - name: Set env run: | + opensearch_version=$(node -p "require('./package.json').opensearchDashboards.version") plugin_version=$(node -p "require('./package.json').version") + echo "OPENSEARCH_VERSION=$opensearch_version" >> $GITHUB_ENV echo "PLUGIN_VERSION=$plugin_version" >> $GITHUB_ENV shell: bash diff --git a/.github/workflows/cypress-test.yml b/.github/workflows/cypress-test.yml index 6fc13c4d6..e63532f9c 100644 --- a/.github/workflows/cypress-test.yml +++ b/.github/workflows/cypress-test.yml @@ -12,7 +12,6 @@ env: PLUGIN_NAME: opensearch-security OPENSEARCH_INITIAL_ADMIN_PASSWORD: myStrongPassword123! CYPRESS_NO_COMMAND_LOG: 1 - OPENSEARCH_VERSION: '3.1.0' jobs: cypress-tests: @@ -29,7 +28,9 @@ jobs: - name: Set env run: | + opensearch_version=$(node -p "require('./package.json').opensearchDashboards.version") plugin_version=$(node -p "require('./package.json').version") + echo "OPENSEARCH_VERSION=$opensearch_version" >> $GITHUB_ENV echo "PLUGIN_VERSION=$plugin_version" >> $GITHUB_ENV shell: bash diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 7d108d785..75212a315 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -7,7 +7,6 @@ env: CI: 1 PLUGIN_NAME: opensearch-security OPENSEARCH_INITIAL_ADMIN_PASSWORD: myStrongPassword123! - OPENSEARCH_VERSION: '3.1.0' jobs: tests: @@ -24,7 +23,9 @@ jobs: - name: Set env run: | + opensearch_version=$(node -p "require('./package.json').opensearchDashboards.version") plugin_version=$(node -p "require('./package.json').version") + echo "OPENSEARCH_VERSION=$opensearch_version" >> $GITHUB_ENV echo "PLUGIN_VERSION=$plugin_version" >> $GITHUB_ENV shell: bash diff --git a/.github/workflows/verify-binary-installation.yml b/.github/workflows/verify-binary-installation.yml index 6b975d391..26d41e249 100644 --- a/.github/workflows/verify-binary-installation.yml +++ b/.github/workflows/verify-binary-installation.yml @@ -2,7 +2,6 @@ name: 'Install Dashboards with Plugin via Binary' on: [push, pull_request] env: - OPENSEARCH_VERSION: '3.1.0' CI: 1 # avoid warnings like "tput: No value for $TERM and no -T specified" TERM: xterm @@ -24,7 +23,9 @@ jobs: - name: Set env run: | + opensearch_version=$(node -p "require('./package.json').opensearchDashboards.version") plugin_version=$(node -p "require('./package.json').version") + echo "OPENSEARCH_VERSION=$opensearch_version" >> $GITHUB_ENV echo "PLUGIN_VERSION=$plugin_version" >> $GITHUB_ENV shell: bash