From 949a6357e075aa9929373a1b96abd57ec5d665f4 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 10 Nov 2022 15:02:00 -0500 Subject: [PATCH 001/142] Rebase Signed-off-by: Stephen Crawford --- .../action.yml | 126 +++++++++++++++++ .github/workflows/ci.yml | 42 ------ .github/workflows/plugin_install.yml | 127 +++--------------- checkstyle/sun_checks.xml | 2 +- config/roles.yml | 44 ------ 5 files changed, 147 insertions(+), 194 deletions(-) create mode 100644 .github/actions/start-opensearch-with-one-plugin/action.yml diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml new file mode 100644 index 0000000000..761c807bf7 --- /dev/null +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -0,0 +1,126 @@ +name: 'Start OpenSearch with One Plugin' +description: 'Downloads latest build of OpenSearch, installs a plugin, executes and script and then starts OpenSearch on localhost:9200' + +inputs: + opensearch-version: + description: 'The version of OpenSearch that should be used, e.g "3.0.0"' + required: true + + plugin-name: + description: 'The the name of the plugin to use, such as security-dashboards-plugin' + required: true + + plugin-start-script: + description: 'The file name for the configuration script for the plugin such as install_demo_configurations -- may not be needed for every plugin' + required: false + + plugin-zip: + description: 'The name of the zip file for the plugin hosted on docker-host i.e. security-plugin.zip ' + required: true + +runs: + using: "composite" + steps: + + # Configure longpath names if on Windows + - name: Enable Longpaths if on Windows + if: ${{ runner.os == 'Windows' }} + run: git config --system core.longpaths true + shell: pwsh + + # Download OpenSearch + - uses: peternied/download-file@v1 + if: ${{ runner.os == 'Windows' }} + with: + url: https://artifacts.opensearch.org/snapshots/core/opensearch/${{ inputs.opensearch-version }}-SNAPSHOT/opensearch-min-${{ inputs.opensearch-version }}-SNAPSHOT-windows-x64-latest.zip + + - uses: peternied/download-file@v1 + if: ${{ runner.os == 'Linux' }} + with: + url: https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${{ inputs.opensearch-version }}/latest/linux/x64/tar/builds/opensearch/dist/opensearch-min-${{ inputs.opensearch-version }}-linux-x64.tar.gz + + # Extract downloaded zip + - name: Extract downloaded zip for Linux + if: ${{ runner.os == 'Linux' }} + run: | + tar -xzf opensearch-*.tar.gz + rm -f opensearch-*.tar.gz + shell: bash + + - name: Extract downloaded zip for Windows + if: ${{ runner.os == 'Windows' }} + run: | + tar -xzf opensearch-min-${{ inputs.opensearch-version }}-SNAPSHOT-windows-x64-latest.zip + del opensearch-min-${{ inputs.opensearch-version }}-SNAPSHOT-windows-x64-latest.zip + shell: pwsh + + # Move and rename the plugin for installation + - name: Move and rename the plugin for installation + run: mv ./build/distributions/${{ inputs.plugin-name }}-*.zip ${{ inputs.plugin-name }}.zip + shell: bash + + # Install the plugin, runs its start-script, and start the OpenSearch server + - name: Install Plugin into OpenSearch for Linux + if: ${{ runner.os == 'Linux'}} + run: | + cat > os-ep.sh < os-ep.sh < - + diff --git a/config/roles.yml b/config/roles.yml index 1d081a5fd0..721349c086 100644 --- a/config/roles.yml +++ b/config/roles.yml @@ -246,47 +246,3 @@ snapshot_management_read_access: - 'cluster:admin/opensearch/snapshot_management/policy/explain' - 'cluster:admin/repository/get' - 'cluster:admin/snapshot/get' - -# Allows user to use point in time functionality -point_in_time_full_access: - reserved: true - index_permissions: - - index_patterns: - - '*' - allowed_actions: - - 'manage_point_in_time' - -# Allows users to see security analytics detectors and others -security_analytics_read_access: - reserved: true - cluster_permissions: - - 'cluster:admin/opensearch/securityanalytics/alerts/get' - - 'cluster:admin/opensearch/securityanalytics/detector/get' - - 'cluster:admin/opensearch/securityanalytics/detector/search' - - 'cluster:admin/opensearch/securityanalytics/findings/get' - - 'cluster:admin/opensearch/securityanalytics/mapping/get' - - 'cluster:admin/opensearch/securityanalytics/mapping/view/get' - - 'cluster:admin/opensearch/securityanalytics/rule/get' - - 'cluster:admin/opensearch/securityanalytics/rule/search' - -# Allows users to use all security analytics functionality -security_analytics_full_access: - reserved: true - cluster_permissions: - - 'cluster:admin/opensearch/securityanalytics/alerts/*' - - 'cluster:admin/opensearch/securityanalytics/detector/*' - - 'cluster:admin/opensearch/securityanalytics/findings/*' - - 'cluster:admin/opensearch/securityanalytics/mapping/*' - - 'cluster:admin/opensearch/securityanalytics/rule/*' - index_permissions: - - index_patterns: - - '*' - allowed_actions: - - 'indices:admin/mapping/put' - - 'indices:admin/mappings/get' - -# Allows users to view and acknowledge alerts -security_analytics_ack_alerts: - reserved: true - cluster_permissions: - - 'cluster:admin/opensearch/securityanalytics/alerts/*' From e92d0cd4bc16900e45a2623c43498358ecfb85be Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 10 Nov 2022 15:08:56 -0500 Subject: [PATCH 002/142] Undo bad file changes Signed-off-by: Stephen Crawford --- checkstyle/sun_checks.xml | 2 +- config/roles.yml | 45 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/checkstyle/sun_checks.xml b/checkstyle/sun_checks.xml index f8833fc531..5ffbedaf5a 100644 --- a/checkstyle/sun_checks.xml +++ b/checkstyle/sun_checks.xml @@ -201,7 +201,7 @@ - + diff --git a/config/roles.yml b/config/roles.yml index 721349c086..2d63c5bed4 100644 --- a/config/roles.yml +++ b/config/roles.yml @@ -246,3 +246,48 @@ snapshot_management_read_access: - 'cluster:admin/opensearch/snapshot_management/policy/explain' - 'cluster:admin/repository/get' - 'cluster:admin/snapshot/get' + + +# Allows user to use point in time functionality +point_in_time_full_access: + reserved: true + index_permissions: + - index_patterns: + - '*' + allowed_actions: + - 'manage_point_in_time' + +# Allows users to see security analytics detectors and others +security_analytics_read_access: + reserved: true + cluster_permissions: + - 'cluster:admin/opensearch/securityanalytics/alerts/get' + - 'cluster:admin/opensearch/securityanalytics/detector/get' + - 'cluster:admin/opensearch/securityanalytics/detector/search' + - 'cluster:admin/opensearch/securityanalytics/findings/get' + - 'cluster:admin/opensearch/securityanalytics/mapping/get' + - 'cluster:admin/opensearch/securityanalytics/mapping/view/get' + - 'cluster:admin/opensearch/securityanalytics/rule/get' + - 'cluster:admin/opensearch/securityanalytics/rule/search' + +# Allows users to use all security analytics functionality +security_analytics_full_access: + reserved: true + cluster_permissions: + - 'cluster:admin/opensearch/securityanalytics/alerts/*' + - 'cluster:admin/opensearch/securityanalytics/detector/*' + - 'cluster:admin/opensearch/securityanalytics/findings/*' + - 'cluster:admin/opensearch/securityanalytics/mapping/*' + - 'cluster:admin/opensearch/securityanalytics/rule/*' + index_permissions: + - index_patterns: + - '*' + allowed_actions: + - 'indices:admin/mapping/put' + - 'indices:admin/mappings/get' + +# Allows users to view and acknowledge alerts +security_analytics_ack_alerts: + reserved: true + cluster_permissions: + - 'cluster:admin/opensearch/securityanalytics/alerts/*' From 30c8adb1c2a53474ee21cd8b550a31b86f9bcfc3 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 10 Nov 2022 15:11:46 -0500 Subject: [PATCH 003/142] reset accidental changes Signed-off-by: Stephen Crawford --- .github/workflows/ci.yml | 42 ++++++++++++++++++++++++++++++++++++++++ config/roles.yml | 1 - 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf10f6522e..3e7fc78987 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,6 +30,7 @@ jobs: with: arguments: | build test -Dbuild.snapshot=false + -x integrationTest -x spotlessCheck -x checkstyleMain -x checkstyleTest @@ -52,6 +53,36 @@ jobs: if: always() run: echo "Check the artifact ${{ matrix.platform }}-JDK${{ matrix.jdk }}-reports for detailed test results" + integration-tests: + name: integration-tests + strategy: + fail-fast: false + matrix: + jdk: [17] + platform: ["ubuntu-latest", "windows-latest", "macos-latest"] + runs-on: ${{ matrix.platform }} + + steps: + - name: Set up JDK for build and test + uses: actions/setup-java@v2 + with: + distribution: temurin # Temurin is a distribution of adoptium + java-version: ${{ matrix.jdk }} + + - name: Checkout security + uses: actions/checkout@v2 + + - name: Build and Test + uses: gradle/gradle-build-action@v2 + continue-on-error: true # Until retries are enable do not fail the workflow https://github.com/opensearch-project/security/issues/2184 + with: + arguments: | + integrationTest -Dbuild.snapshot=false + -x spotlessCheck + -x checkstyleMain + -x checkstyleTest + -x spotbugsMain + backward-compatibility: runs-on: ubuntu-latest steps: @@ -119,6 +150,17 @@ jobs: - run: ./gradlew clean assemble -Dbuild.version_qualifier=${{ env.TEST_QUALIFIER }} && test -s ./build/distributions/opensearch-security-${{ env.SECURITY_PLUGIN_VERSION_ONLY_NUMBER }}-${{ env.TEST_QUALIFIER }}-SNAPSHOT.zip + - name: Verify updateVersion gradle tasks works + env: + ExpectedVersionString: "opensearch_version: 2.1.0-SNAPSHOT" + run: | + ## Make sure the current doesn't match the test version + test "$(./gradlew properties | grep opensearch.version)" != "$ExpectedVersionString" + ## Update the new version to 2.1.0 + ./gradlew clean updateVersion -DnewVersion=2.1.0-SNAPSHOT + ## Make sure the version matches expectation + test "$(./gradlew properties | grep opensearch.version)" = "$ExpectedVersionString" + - name: List files in the build directory if there was an error run: ls -al ./build/distributions/ if: failure() diff --git a/config/roles.yml b/config/roles.yml index 2d63c5bed4..1d081a5fd0 100644 --- a/config/roles.yml +++ b/config/roles.yml @@ -247,7 +247,6 @@ snapshot_management_read_access: - 'cluster:admin/repository/get' - 'cluster:admin/snapshot/get' - # Allows user to use point in time functionality point_in_time_full_access: reserved: true From 705f9d9d35bfcfe39c549b19e5f4e14537a5ec4d Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 10 Nov 2022 15:34:13 -0500 Subject: [PATCH 004/142] Swap the version number Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index ea619f7bab..31806f5fa6 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -24,7 +24,7 @@ jobs: - name: Run Opensearch with A Single Plugin uses: ./.github/actions/start-opensearch-with-one-plugin with: - opensearch-version: 2.4.0 + opensearch-version: 3.0.0 plugin-name: opensearch-security plugin-start-script: install_demo_configuration plugin-zip: security-plugin.zip From 282a500c0e0b563de53174eadd633b31d0e118ad Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 11 Nov 2022 13:32:46 -0500 Subject: [PATCH 005/142] final changes Signed-off-by: Stephen Crawford --- .../start-opensearch-with-one-plugin/action.yml | 13 +++++++------ .github/workflows/plugin_install.yml | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 761c807bf7..bbd147702b 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -1,5 +1,5 @@ name: 'Start OpenSearch with One Plugin' -description: 'Downloads latest build of OpenSearch, installs a plugin, executes and script and then starts OpenSearch on localhost:9200' +description: 'Downloads latest build of OpenSearch, installs a plugin, executes a script and then starts OpenSearch on localhost:9200' inputs: opensearch-version: @@ -7,14 +7,14 @@ inputs: required: true plugin-name: - description: 'The the name of the plugin to use, such as security-dashboards-plugin' + description: 'The name of the plugin to use, such as opensearch-security' required: true plugin-start-script: description: 'The file name for the configuration script for the plugin such as install_demo_configurations -- may not be needed for every plugin' required: false - plugin-zip: + docker-host-plugin-zip: description: 'The name of the zip file for the plugin hosted on docker-host i.e. security-plugin.zip ' required: true @@ -64,16 +64,17 @@ runs: if: ${{ runner.os == 'Linux'}} run: | cat > os-ep.sh < Date: Fri, 11 Nov 2022 15:11:07 -0500 Subject: [PATCH 006/142] Fix typos Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index c2d8cd4e8f..39f4261a45 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -32,4 +32,4 @@ jobs: - name: Run sanity tests on Linux uses: gradle/gradle-build-action@v2 with: - arguements: integTestRemote -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="opensearch" -Dhttps=true -Duser=admin -Dpassword=admin + arguments: integTestRemote -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="opensearch" -Dhttps=true -Duser=admin -Dpassword=admin From 858068c5c8f4fc5f1bc200d30808ef0ef8089efd Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 11 Nov 2022 15:11:29 -0500 Subject: [PATCH 007/142] Remove linux name Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 39f4261a45..233b89dfb5 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -29,7 +29,7 @@ jobs: plugin-start-script: install_demo_configuration docker-host-plugin-zip: security-plugin.zip - - name: Run sanity tests on Linux + - name: Run sanity tests uses: gradle/gradle-build-action@v2 with: arguments: integTestRemote -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="opensearch" -Dhttps=true -Duser=admin -Dpassword=admin From c477372921bbe4b7156befd855a3fd45f8d73a39 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 11 Nov 2022 15:13:44 -0500 Subject: [PATCH 008/142] fix rename Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index bbd147702b..d75dc6fd13 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -73,8 +73,7 @@ runs: docker build -t opensearch-test -f- . < Date: Mon, 14 Nov 2022 16:23:08 -0500 Subject: [PATCH 009/142] Make sure passes without jdk 11 Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 2 +- tools/install_demo_configuration.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 233b89dfb5..92e5c9de19 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -7,7 +7,7 @@ jobs: strategy: matrix: os: [windows-latest, ubuntu-latest] - jdk: [11, 17] + jdk: [17] runs-on: ${{ matrix.os }} steps: - name: Set up JDK diff --git a/tools/install_demo_configuration.sh b/tools/install_demo_configuration.sh index 287ded080c..c77507029f 100755 --- a/tools/install_demo_configuration.sh +++ b/tools/install_demo_configuration.sh @@ -425,6 +425,7 @@ else echo "### or run ./securityadmin_demo.sh" echo "### To use the Security Plugin ConfigurationGUI" fi +eifjcbdkithivclitcurdbgnrcuhjfhffjdrbghfjelu echo "### To access your secured cluster open https://: and log in with admin/admin." echo "### (Ignore the SSL certificate warning because we installed self-signed demo certificates)" From aa59db2cdd5d92cc07b2f1ac799acae385c7d024 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Mon, 14 Nov 2022 17:01:44 -0500 Subject: [PATCH 010/142] Fully working once JDK 11 is fixed Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 92e5c9de19..233b89dfb5 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -7,7 +7,7 @@ jobs: strategy: matrix: os: [windows-latest, ubuntu-latest] - jdk: [17] + jdk: [11, 17] runs-on: ${{ matrix.os }} steps: - name: Set up JDK From 15c40053a6b8cdf122cceebc980e13e7d29635fe Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Tue, 15 Nov 2022 09:37:58 -0500 Subject: [PATCH 011/142] Reset to working version and add fail fast Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 233b89dfb5..e924acbf10 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -5,6 +5,7 @@ on: [push, pull_request, workflow_dispatch] jobs: plugin-install: strategy: + fail-fast: false matrix: os: [windows-latest, ubuntu-latest] jdk: [11, 17] From 3258eb9bc5522d3d8b159fc639746c59f1277fe2 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Wed, 16 Nov 2022 14:32:34 -0500 Subject: [PATCH 012/142] Remove docker Signed-off-by: Stephen Crawford --- .../action.yml | 43 +++---------------- 1 file changed, 7 insertions(+), 36 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index d75dc6fd13..012067e0c8 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -29,31 +29,18 @@ runs: shell: pwsh # Download OpenSearch - - uses: peternied/download-file@v1 - if: ${{ runner.os == 'Windows' }} - with: - url: https://artifacts.opensearch.org/snapshots/core/opensearch/${{ inputs.opensearch-version }}-SNAPSHOT/opensearch-min-${{ inputs.opensearch-version }}-SNAPSHOT-windows-x64-latest.zip - - uses: peternied/download-file@v1 if: ${{ runner.os == 'Linux' }} with: - url: https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${{ inputs.opensearch-version }}/latest/linux/x64/tar/builds/opensearch/dist/opensearch-min-${{ inputs.opensearch-version }}-linux-x64.tar.gz + url: https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${{ inputs.opensearch-version }}/latest/${{ runner.os }}/x64/tar/dist/opensearch/opensearch-${{ inputs.opensearch-version }}-${{ runner.os }}-x64.zip # Extract downloaded zip - - name: Extract downloaded zip for Linux - if: ${{ runner.os == 'Linux' }} + - name: Extract downloaded zip run: | - tar -xzf opensearch-*.tar.gz - rm -f opensearch-*.tar.gz + tar -xzf opensearch-*.zip + rm -f opensearch-*.zip shell: bash - - name: Extract downloaded zip for Windows - if: ${{ runner.os == 'Windows' }} - run: | - tar -xzf opensearch-min-${{ inputs.opensearch-version }}-SNAPSHOT-windows-x64-latest.zip - del opensearch-min-${{ inputs.opensearch-version }}-SNAPSHOT-windows-x64-latest.zip - shell: pwsh - # Move and rename the plugin for installation - name: Move and rename the plugin for installation run: mv ./build/distributions/${{ inputs.plugin-name }}-*.zip ${{ inputs.plugin-name }}.zip @@ -63,24 +50,8 @@ runs: - name: Install Plugin into OpenSearch for Linux if: ${{ runner.os == 'Linux'}} run: | - cat > os-ep.sh < Date: Wed, 16 Nov 2022 14:42:24 -0500 Subject: [PATCH 013/142] Test Without Docker Signed-off-by: Stephen Crawford --- .../actions/start-opensearch-with-one-plugin/action.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 012067e0c8..5f1d4af40b 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -30,10 +30,17 @@ runs: # Download OpenSearch - uses: peternied/download-file@v1 - if: ${{ runner.os == 'Linux' }} + if: ${{ runner.os == 'Windows' }} with: url: https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${{ inputs.opensearch-version }}/latest/${{ runner.os }}/x64/tar/dist/opensearch/opensearch-${{ inputs.opensearch-version }}-${{ runner.os }}-x64.zip + # Download OpenSearch + - uses: peternied/download-file@v1 + if: ${{ runner.os == 'Linux' }} + with: + url: https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${{ inputs.opensearch-version }}/latest/${{ runner.os }}/x64/tar/dist/opensearch/opensearch-${{ inputs.opensearch-version }}-${{ runner.os }}-x64.tar.gz + + # Extract downloaded zip - name: Extract downloaded zip run: | From a6b8113c6161de56f5a7b74db334b93f92918839 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Wed, 16 Nov 2022 14:44:00 -0500 Subject: [PATCH 014/142] Test Without Docker Signed-off-by: Stephen Crawford --- .github/workflows/ci.yml | 2 +- .github/workflows/code-hygiene.yml | 2 +- .github/workflows/integration-tests.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e7fc78987..125328a9b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ name: CI -on: [push, pull_request] +on: [] #push, pull_request env: GRADLE_OPTS: -Dhttp.keepAlive=false diff --git a/.github/workflows/code-hygiene.yml b/.github/workflows/code-hygiene.yml index f078cb2b56..53934662eb 100644 --- a/.github/workflows/code-hygiene.yml +++ b/.github/workflows/code-hygiene.yml @@ -1,6 +1,6 @@ name: Code Hygiene -on: [push, pull_request] +on: [] #push, pull_request jobs: linelint: diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index b609ad7293..370d96a789 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1,6 +1,6 @@ name: Bulk Integration Test -on: [ workflow_dispatch ] +on: [ ] #workflow_dispatch env: GRADLE_OPTS: -Dhttp.keepAlive=false From 3f8e05a0ef8775734dd50a920a7388b0299b6609 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Wed, 16 Nov 2022 14:48:01 -0500 Subject: [PATCH 015/142] Hard coded OSs since casing breaks download Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 5f1d4af40b..346eacfc17 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -32,13 +32,13 @@ runs: - uses: peternied/download-file@v1 if: ${{ runner.os == 'Windows' }} with: - url: https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${{ inputs.opensearch-version }}/latest/${{ runner.os }}/x64/tar/dist/opensearch/opensearch-${{ inputs.opensearch-version }}-${{ runner.os }}-x64.zip + url: https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${{ inputs.opensearch-version }}/latest/windows/x64/tar/dist/opensearch/opensearch-${{ inputs.opensearch-version }}-windows-x64.zip # Download OpenSearch - uses: peternied/download-file@v1 if: ${{ runner.os == 'Linux' }} with: - url: https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${{ inputs.opensearch-version }}/latest/${{ runner.os }}/x64/tar/dist/opensearch/opensearch-${{ inputs.opensearch-version }}-${{ runner.os }}-x64.tar.gz + url: https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${{ inputs.opensearch-version }}/latest/linux/x64/tar/dist/opensearch/opensearch-${{ inputs.opensearch-version }}-linux-x64.tar.gz # Extract downloaded zip From 24e967dcf7bb401df95d6488644319ec7c961db6 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Wed, 16 Nov 2022 14:48:38 -0500 Subject: [PATCH 016/142] Hard coded OSs since casing breaks download Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 346eacfc17..b1967e9b69 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -32,7 +32,7 @@ runs: - uses: peternied/download-file@v1 if: ${{ runner.os == 'Windows' }} with: - url: https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${{ inputs.opensearch-version }}/latest/windows/x64/tar/dist/opensearch/opensearch-${{ inputs.opensearch-version }}-windows-x64.zip + url: https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${{ inputs.opensearch-version }}/latest/windows/x64/zip/dist/opensearch/opensearch-${{ inputs.opensearch-version }}-windows-x64.zip # Download OpenSearch - uses: peternied/download-file@v1 From 85d7d35c1ff70b904d22f501b094c0c319a16752 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Wed, 16 Nov 2022 14:54:13 -0500 Subject: [PATCH 017/142] Swap file paths in download to their actual path Signed-off-by: Stephen Crawford --- .../start-opensearch-with-one-plugin/action.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index b1967e9b69..7eef313603 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -43,11 +43,20 @@ runs: # Extract downloaded zip - name: Extract downloaded zip + if: ${{ runner.os }} == 'Linux' run: | - tar -xzf opensearch-*.zip - rm -f opensearch-*.zip + tar -xzf opensearch-*.tar.gz + rm -f opensearch-*.tar.gz shell: bash + # Extract downloaded zip + - name: Extract downloaded zip + if: ${{ runner.os }} == 'Windows' + run: | + tar -xzf opensearch-*.zip + del -f opensearch-*.zip + shell: pwsh + # Move and rename the plugin for installation - name: Move and rename the plugin for installation run: mv ./build/distributions/${{ inputs.plugin-name }}-*.zip ${{ inputs.plugin-name }}.zip From a8b9fbd8791695573a48d8912218bb63e3dafaf8 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Wed, 16 Nov 2022 15:05:18 -0500 Subject: [PATCH 018/142] Fix bracket position Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 7eef313603..36a4829145 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -43,7 +43,7 @@ runs: # Extract downloaded zip - name: Extract downloaded zip - if: ${{ runner.os }} == 'Linux' + if: ${{ runner.os == 'Linux' }} run: | tar -xzf opensearch-*.tar.gz rm -f opensearch-*.tar.gz @@ -51,7 +51,7 @@ runs: # Extract downloaded zip - name: Extract downloaded zip - if: ${{ runner.os }} == 'Windows' + if: ${{ runner.os == 'Windows' }} run: | tar -xzf opensearch-*.zip del -f opensearch-*.zip From 0faf6e9d5a3d58a6b224e624627ed391449b4eb7 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Wed, 16 Nov 2022 15:09:05 -0500 Subject: [PATCH 019/142] try to fix the file suffixes Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 36a4829145..dd0f5bc194 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -66,8 +66,8 @@ runs: - name: Install Plugin into OpenSearch for Linux if: ${{ runner.os == 'Linux'}} run: | - 'y' | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin.sh install file:$pwd/${{ inputs.plugin-name }}.zip - 'y', 'y', 'N' | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }}.h + 'y' | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$pwd/${{ inputs.plugin-name }}.zip + 'y', 'y', 'N' | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} shell: bash - name: Install Plugin into OpenSearch for Windows From 3d0a1fa7195bfc706b59f4e8d027d800611953bb Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Wed, 16 Nov 2022 15:10:44 -0500 Subject: [PATCH 020/142] Remove -f from del Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index dd0f5bc194..2caf2877b2 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -54,7 +54,7 @@ runs: if: ${{ runner.os == 'Windows' }} run: | tar -xzf opensearch-*.zip - del -f opensearch-*.zip + del opensearch-*.zip shell: pwsh # Move and rename the plugin for installation From 0f140715a4b53062de2e14c06d1eeefa7ceb82cd Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Wed, 16 Nov 2022 15:20:45 -0500 Subject: [PATCH 021/142] LS directories Signed-off-by: Stephen Crawford --- .../action.yml | 20 +++++++++++++++++++ tools/install_demo_configuration.sh | 1 - 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 2caf2877b2..045652fe47 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -45,6 +45,8 @@ runs: - name: Extract downloaded zip if: ${{ runner.os == 'Linux' }} run: | + echo in base dir linux + ls tar -xzf opensearch-*.tar.gz rm -f opensearch-*.tar.gz shell: bash @@ -53,6 +55,8 @@ runs: - name: Extract downloaded zip if: ${{ runner.os == 'Windows' }} run: | + echo in base dir Windows + ls tar -xzf opensearch-*.zip del opensearch-*.zip shell: pwsh @@ -66,6 +70,14 @@ runs: - name: Install Plugin into OpenSearch for Linux if: ${{ runner.os == 'Linux'}} run: | + echo in base dir linux installing plugin + ls + cd opensearch-${{ inputs.opensearch-version }}-SNAPSHOT + echo in os + ls + cd bin + echo in bin + ls 'y' | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$pwd/${{ inputs.plugin-name }}.zip 'y', 'y', 'N' | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} shell: bash @@ -73,6 +85,14 @@ runs: - name: Install Plugin into OpenSearch for Windows if: ${{ runner.os == 'Windows'}} run: | + echo in base dir windows installing plugin + ls + cd opensearch-${{ inputs.opensearch-version }}-SNAPSHOT + echo in os + ls + cd bin + echo in bin + ls 'y' | .\opensearch-${{ inputs.opensearch-version }}-SNAPSHOT\bin\opensearch-plugin.bat install file:$pwd\${{ inputs.plugin-name }}.zip 'y', 'y', 'N' | .\opensearch-${{ inputs.opensearch-version }}-SNAPSHOT\plugins\${{ inputs.plugin-name }}\tools\${{ inputs.plugin-start-script }}.bat shell: pwsh diff --git a/tools/install_demo_configuration.sh b/tools/install_demo_configuration.sh index c77507029f..287ded080c 100755 --- a/tools/install_demo_configuration.sh +++ b/tools/install_demo_configuration.sh @@ -425,7 +425,6 @@ else echo "### or run ./securityadmin_demo.sh" echo "### To use the Security Plugin ConfigurationGUI" fi -eifjcbdkithivclitcurdbgnrcuhjfhffjdrbghfjelu echo "### To access your secured cluster open https://: and log in with admin/admin." echo "### (Ignore the SSL certificate warning because we installed self-signed demo certificates)" From cb6bf849ae7ab9ff16683e7cf4fa3e13240c7c10 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Wed, 16 Nov 2022 15:29:53 -0500 Subject: [PATCH 022/142] Fix name paths Signed-off-by: Stephen Crawford --- .../actions/start-opensearch-with-one-plugin/action.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 045652fe47..bc7f1046ba 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -57,8 +57,8 @@ runs: run: | echo in base dir Windows ls - tar -xzf opensearch-*.zip - del opensearch-*.zip + tar -xzf opensearch-${{ inputs.opensearch-version }}-windows-x64-latest.zip + del opensearch-${{ inputs.opensearch-version }}-windows-x64-latest.zip shell: pwsh # Move and rename the plugin for installation @@ -78,8 +78,8 @@ runs: cd bin echo in bin ls - 'y' | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$pwd/${{ inputs.plugin-name }}.zip - 'y', 'y', 'N' | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} + 'y' | ./opensearch-${{ inputs.opensearch-version }}/bin/opensearch-plugin install file:$pwd/${{ inputs.plugin-name }}.zip + 'y', 'y', 'N' | ./opensearch-${{ inputs.opensearch-version }}/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} shell: bash - name: Install Plugin into OpenSearch for Windows From 9bf4fb27453f3b6440c2d35da180c2eef2390466 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Wed, 16 Nov 2022 15:34:30 -0500 Subject: [PATCH 023/142] Remove SNAPSHOT mention from Linux Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index bc7f1046ba..2279018fe6 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -72,7 +72,7 @@ runs: run: | echo in base dir linux installing plugin ls - cd opensearch-${{ inputs.opensearch-version }}-SNAPSHOT + cd opensearch-${{ inputs.opensearch-version } echo in os ls cd bin @@ -100,7 +100,7 @@ runs: # Run OpenSearch - name: Run OpenSearch with plugin on Linux if: ${{ runner.os == 'Linux'}} - run: .\opensearch-${{ inputs.opensearch-version }}-SNAPSHOT\bin\opensearch.sh + run: .\opensearch-${{ inputs.opensearch-version }}\bin\opensearch.sh shell: bash - name: Run OpenSearch with plugin on Windows From 2ec2a273981aa68b295d769ad0a49701b31d1089 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Wed, 16 Nov 2022 15:46:47 -0500 Subject: [PATCH 024/142] Fix missing bracket Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 2279018fe6..fc2356c7b1 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -72,7 +72,7 @@ runs: run: | echo in base dir linux installing plugin ls - cd opensearch-${{ inputs.opensearch-version } + cd opensearch-${{ inputs.opensearch-version }} echo in os ls cd bin From 8044b7f798edcb6fb9b0dc6cb50b8be9f2e0dad7 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Wed, 16 Nov 2022 16:41:28 -0500 Subject: [PATCH 025/142] Path changes Signed-off-by: Stephen Crawford --- .../start-opensearch-with-one-plugin/action.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index fc2356c7b1..b98a33650c 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -78,7 +78,10 @@ runs: cd bin echo in bin ls - 'y' | ./opensearch-${{ inputs.opensearch-version }}/bin/opensearch-plugin install file:$pwd/${{ inputs.plugin-name }}.zip + echo in plugin + cd opensearch-plugin + ls + 'y' | ./opensearch-${{ inputs.opensearch-version }}/bin/opensearch-plugin/opensearch-plugin.sh install file:$pwd/${{ inputs.plugin-name }}.zip 'y', 'y', 'N' | ./opensearch-${{ inputs.opensearch-version }}/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} shell: bash @@ -93,7 +96,10 @@ runs: cd bin echo in bin ls - 'y' | .\opensearch-${{ inputs.opensearch-version }}-SNAPSHOT\bin\opensearch-plugin.bat install file:$pwd\${{ inputs.plugin-name }}.zip + echo in plugin + cd opensearch-plugin + ls + 'y' | .\opensearch-${{ inputs.opensearch-version }}-SNAPSHOT\bin\opensearch-plugin\opensearch-plugin.bat install file:$pwd\${{ inputs.plugin-name }}.zip 'y', 'y', 'N' | .\opensearch-${{ inputs.opensearch-version }}-SNAPSHOT\plugins\${{ inputs.plugin-name }}\tools\${{ inputs.plugin-start-script }}.bat shell: pwsh From 9d62afe4bc973f5efee61342f6b318a20139b265 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Wed, 16 Nov 2022 16:44:28 -0500 Subject: [PATCH 026/142] Remove doubled directory name Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index b98a33650c..7ec5dd0902 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -81,7 +81,7 @@ runs: echo in plugin cd opensearch-plugin ls - 'y' | ./opensearch-${{ inputs.opensearch-version }}/bin/opensearch-plugin/opensearch-plugin.sh install file:$pwd/${{ inputs.plugin-name }}.zip + 'y' | ./opensearch-${{ inputs.opensearch-version }}/bin/opensearch-plugin.sh install file:$pwd/${{ inputs.plugin-name }}.zip 'y', 'y', 'N' | ./opensearch-${{ inputs.opensearch-version }}/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} shell: bash @@ -99,7 +99,7 @@ runs: echo in plugin cd opensearch-plugin ls - 'y' | .\opensearch-${{ inputs.opensearch-version }}-SNAPSHOT\bin\opensearch-plugin\opensearch-plugin.bat install file:$pwd\${{ inputs.plugin-name }}.zip + 'y' | .\opensearch-${{ inputs.opensearch-version }}-SNAPSHOT\bin\opensearch-plugin.bat install file:$pwd\${{ inputs.plugin-name }}.zip 'y', 'y', 'N' | .\opensearch-${{ inputs.opensearch-version }}-SNAPSHOT\plugins\${{ inputs.plugin-name }}\tools\${{ inputs.plugin-start-script }}.bat shell: pwsh From e8ef72932120b7d0bfc608fad2694267afbeda7b Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Wed, 16 Nov 2022 16:46:44 -0500 Subject: [PATCH 027/142] Remove doubled directory name Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 7ec5dd0902..6abc077e9a 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -78,9 +78,6 @@ runs: cd bin echo in bin ls - echo in plugin - cd opensearch-plugin - ls 'y' | ./opensearch-${{ inputs.opensearch-version }}/bin/opensearch-plugin.sh install file:$pwd/${{ inputs.plugin-name }}.zip 'y', 'y', 'N' | ./opensearch-${{ inputs.opensearch-version }}/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} shell: bash @@ -96,9 +93,6 @@ runs: cd bin echo in bin ls - echo in plugin - cd opensearch-plugin - ls 'y' | .\opensearch-${{ inputs.opensearch-version }}-SNAPSHOT\bin\opensearch-plugin.bat install file:$pwd\${{ inputs.plugin-name }}.zip 'y', 'y', 'N' | .\opensearch-${{ inputs.opensearch-version }}-SNAPSHOT\plugins\${{ inputs.plugin-name }}\tools\${{ inputs.plugin-start-script }}.bat shell: pwsh From cf8a512eff2f853ebd2f131e764364e219932efe Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Wed, 16 Nov 2022 17:01:12 -0500 Subject: [PATCH 028/142] Check plugin install path names Signed-off-by: Stephen Crawford --- .../action.yml | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 6abc077e9a..5bb533d012 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -70,29 +70,14 @@ runs: - name: Install Plugin into OpenSearch for Linux if: ${{ runner.os == 'Linux'}} run: | - echo in base dir linux installing plugin - ls - cd opensearch-${{ inputs.opensearch-version }} - echo in os - ls - cd bin - echo in bin - ls - 'y' | ./opensearch-${{ inputs.opensearch-version }}/bin/opensearch-plugin.sh install file:$pwd/${{ inputs.plugin-name }}.zip + chmod +x ./opensearch-${{ inputs.opensearch-version }}/bin/opensearch-plugin + 'y' | ./opensearch-${{ inputs.opensearch-version }}/bin/opensearch-plugin install file:$pwd/${{ inputs.plugin-name }}.zip 'y', 'y', 'N' | ./opensearch-${{ inputs.opensearch-version }}/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} shell: bash - name: Install Plugin into OpenSearch for Windows if: ${{ runner.os == 'Windows'}} run: | - echo in base dir windows installing plugin - ls - cd opensearch-${{ inputs.opensearch-version }}-SNAPSHOT - echo in os - ls - cd bin - echo in bin - ls 'y' | .\opensearch-${{ inputs.opensearch-version }}-SNAPSHOT\bin\opensearch-plugin.bat install file:$pwd\${{ inputs.plugin-name }}.zip 'y', 'y', 'N' | .\opensearch-${{ inputs.opensearch-version }}-SNAPSHOT\plugins\${{ inputs.plugin-name }}\tools\${{ inputs.plugin-start-script }}.bat shell: pwsh From 1b23eb7baec404da9aa756520beb07dec0ad8f50 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Wed, 16 Nov 2022 17:04:46 -0500 Subject: [PATCH 029/142] Change plugin file name Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 5bb533d012..68540308bd 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -63,7 +63,7 @@ runs: # Move and rename the plugin for installation - name: Move and rename the plugin for installation - run: mv ./build/distributions/${{ inputs.plugin-name }}-*.zip ${{ inputs.plugin-name }}.zip + run: mv ./build/distributions/${{ inputs.plugin-name }}-*.zip $pwd/${{ inputs.plugin-name }}.zip shell: bash # Install the plugin, runs its start-script, and start the OpenSearch server From 562d45b97141fe19507bc1adfa7282f260997e65 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Wed, 16 Nov 2022 17:07:31 -0500 Subject: [PATCH 030/142] Change plugin file name Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 68540308bd..44c4082dc7 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -63,7 +63,7 @@ runs: # Move and rename the plugin for installation - name: Move and rename the plugin for installation - run: mv ./build/distributions/${{ inputs.plugin-name }}-*.zip $pwd/${{ inputs.plugin-name }}.zip + run: mv ./build/distributions/${{ inputs.plugin-name }}-*.zip ./${{ inputs.plugin-name }}.zip shell: bash # Install the plugin, runs its start-script, and start the OpenSearch server From 5c3416050ffb6cc8fb906b154e5bd1366921f6db Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 10:43:53 -0500 Subject: [PATCH 031/142] Add echos Signed-off-by: Stephen Crawford --- .../start-opensearch-with-one-plugin/action.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 44c4082dc7..d68923aae2 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -63,7 +63,16 @@ runs: # Move and rename the plugin for installation - name: Move and rename the plugin for installation - run: mv ./build/distributions/${{ inputs.plugin-name }}-*.zip ./${{ inputs.plugin-name }}.zip + run: | + echo in base dir + ls + cd build + echo in build + ls + cd distributions + echo in dist + ls + mv ./build/distributions/${{ inputs.plugin-name }}-*.zip ./${{ inputs.plugin-name }}.zip shell: bash # Install the plugin, runs its start-script, and start the OpenSearch server From e9971bd720b759e657b86e5513a4c5ce737142f8 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 10:48:35 -0500 Subject: [PATCH 032/142] Edit file names for mv and del Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index d68923aae2..679026e83c 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -57,8 +57,8 @@ runs: run: | echo in base dir Windows ls - tar -xzf opensearch-${{ inputs.opensearch-version }}-windows-x64-latest.zip - del opensearch-${{ inputs.opensearch-version }}-windows-x64-latest.zip + tar -xzf opensearch-${{ inputs.opensearch-version }}-windows-x64.zip + del opensearch-${{ inputs.opensearch-version }}-windows-x64.zip shell: pwsh # Move and rename the plugin for installation @@ -72,7 +72,7 @@ runs: cd distributions echo in dist ls - mv ./build/distributions/${{ inputs.plugin-name }}-*.zip ./${{ inputs.plugin-name }}.zip + mv ./build/distributions/${{ inputs.plugin-name }}-${{ inputs.opensearch-version }}-SNAPSHOT.zip ./${{ inputs.plugin-name }}.zip shell: bash # Install the plugin, runs its start-script, and start the OpenSearch server From f0d8cbd49979ae76ea4e8ca2b50b9f693365473c Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 10:51:02 -0500 Subject: [PATCH 033/142] Add extra 0 to OS sec version Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 679026e83c..768c97fa9b 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -72,7 +72,7 @@ runs: cd distributions echo in dist ls - mv ./build/distributions/${{ inputs.plugin-name }}-${{ inputs.opensearch-version }}-SNAPSHOT.zip ./${{ inputs.plugin-name }}.zip + mv ./build/distributions/${{ inputs.plugin-name }}-${{ inputs.opensearch-version }}.0-SNAPSHOT.zip ./${{ inputs.plugin-name }}.zip shell: bash # Install the plugin, runs its start-script, and start the OpenSearch server From fa6cc2274430c16606708dc110d3bfd6e433272a Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 10:53:34 -0500 Subject: [PATCH 034/142] removed echos Signed-off-by: Stephen Crawford --- .../start-opensearch-with-one-plugin/action.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 768c97fa9b..eafc9f189a 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -63,16 +63,7 @@ runs: # Move and rename the plugin for installation - name: Move and rename the plugin for installation - run: | - echo in base dir - ls - cd build - echo in build - ls - cd distributions - echo in dist - ls - mv ./build/distributions/${{ inputs.plugin-name }}-${{ inputs.opensearch-version }}.0-SNAPSHOT.zip ./${{ inputs.plugin-name }}.zip + run: mv ./build/distributions/${{ inputs.plugin-name }}-${{ inputs.opensearch-version }}.0-SNAPSHOT.zip ./${{ inputs.plugin-name }}.zip shell: bash # Install the plugin, runs its start-script, and start the OpenSearch server From 7e29565f5c9137476dfec4991e0dbf75567514d5 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 11:01:09 -0500 Subject: [PATCH 035/142] Fix wildcard in windows extraction and change pipe in linux run Signed-off-by: Stephen Crawford --- .../start-opensearch-with-one-plugin/action.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index eafc9f189a..da0a0997c8 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -57,9 +57,9 @@ runs: run: | echo in base dir Windows ls - tar -xzf opensearch-${{ inputs.opensearch-version }}-windows-x64.zip - del opensearch-${{ inputs.opensearch-version }}-windows-x64.zip - shell: pwsh + tar -xzf opensearch-${{ inputs.opensearch-version }}*.zip + rm -f opensearch-${{ inputs.opensearch-version }}*.zip + shell: bash # Move and rename the plugin for installation - name: Move and rename the plugin for installation @@ -71,8 +71,8 @@ runs: if: ${{ runner.os == 'Linux'}} run: | chmod +x ./opensearch-${{ inputs.opensearch-version }}/bin/opensearch-plugin - 'y' | ./opensearch-${{ inputs.opensearch-version }}/bin/opensearch-plugin install file:$pwd/${{ inputs.plugin-name }}.zip - 'y', 'y', 'N' | ./opensearch-${{ inputs.opensearch-version }}/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} + Y | ./opensearch-${{ inputs.opensearch-version }}/bin/opensearch-plugin install file:$pwd/${{ inputs.plugin-name }}.zip + Y, Y, N | ./opensearch-${{ inputs.opensearch-version }}/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} shell: bash - name: Install Plugin into OpenSearch for Windows From 6b45e1543604a35b47c6021c28a977894fc47f2c Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 11:07:44 -0500 Subject: [PATCH 036/142] Add echoes every step Signed-off-by: Stephen Crawford --- .../action.yml | 33 +++++++++++++++++-- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index da0a0997c8..dcdbc1face 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -49,6 +49,8 @@ runs: ls tar -xzf opensearch-*.tar.gz rm -f opensearch-*.tar.gz + echo after extraction + ls shell: bash # Extract downloaded zip @@ -59,25 +61,50 @@ runs: ls tar -xzf opensearch-${{ inputs.opensearch-version }}*.zip rm -f opensearch-${{ inputs.opensearch-version }}*.zip + echo after extraction + ls shell: bash # Move and rename the plugin for installation - name: Move and rename the plugin for installation - run: mv ./build/distributions/${{ inputs.plugin-name }}-${{ inputs.opensearch-version }}.0-SNAPSHOT.zip ./${{ inputs.plugin-name }}.zip + run: | + echo in build + cd build + ls + echo in distributions + cd distributions + ls + mv ./build/distributions/${{ inputs.plugin-name }}-${{ inputs.opensearch-version }}.0-SNAPSHOT.zip ./${{ inputs.plugin-name }}.zip shell: bash # Install the plugin, runs its start-script, and start the OpenSearch server - name: Install Plugin into OpenSearch for Linux if: ${{ runner.os == 'Linux'}} run: | + echo in OS + cd opensearch-${{ inputs.opensearch-version }} + ls + echo in bin + cd bin + ls + cd .. + cd .. chmod +x ./opensearch-${{ inputs.opensearch-version }}/bin/opensearch-plugin - Y | ./opensearch-${{ inputs.opensearch-version }}/bin/opensearch-plugin install file:$pwd/${{ inputs.plugin-name }}.zip - Y, Y, N | ./opensearch-${{ inputs.opensearch-version }}/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} + yes | ./opensearch-${{ inputs.opensearch-version }}/bin/opensearch-plugin install file:$pwd/${{ inputs.plugin-name }}.zip + yes, yes, no | ./opensearch-${{ inputs.opensearch-version }}/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} shell: bash - name: Install Plugin into OpenSearch for Windows if: ${{ runner.os == 'Windows'}} run: | + echo in OS + cd opensearch-${{ inputs.opensearch-version }}* + ls + echo in bin + cd bin + ls + cd .. + cd .. 'y' | .\opensearch-${{ inputs.opensearch-version }}-SNAPSHOT\bin\opensearch-plugin.bat install file:$pwd\${{ inputs.plugin-name }}.zip 'y', 'y', 'N' | .\opensearch-${{ inputs.opensearch-version }}-SNAPSHOT\plugins\${{ inputs.plugin-name }}\tools\${{ inputs.plugin-start-script }}.bat shell: pwsh From bc6960c0381b2c46862ef6393d3abca5c380f0be Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 11:11:20 -0500 Subject: [PATCH 037/142] Add echoes every step Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index dcdbc1face..d798c52926 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -74,6 +74,9 @@ runs: echo in distributions cd distributions ls + echo $pwd + cd .. + cd .. mv ./build/distributions/${{ inputs.plugin-name }}-${{ inputs.opensearch-version }}.0-SNAPSHOT.zip ./${{ inputs.plugin-name }}.zip shell: bash From 0c380490168f3a46bdebf18199ecc01c078ecbf4 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 11:16:41 -0500 Subject: [PATCH 038/142] Cd back and then installl Signed-off-by: Stephen Crawford --- .../actions/start-opensearch-with-one-plugin/action.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index d798c52926..7e0c29141d 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -59,8 +59,8 @@ runs: run: | echo in base dir Windows ls - tar -xzf opensearch-${{ inputs.opensearch-version }}*.zip - rm -f opensearch-${{ inputs.opensearch-version }}*.zip + tar -xzf opensearch-${{ inputs.opensearch-version }}-windows-x64.zip + rm -f opensearch-${{ inputs.opensearch-version }}-windows-x64.zip echo after extraction ls shell: bash @@ -78,6 +78,8 @@ runs: cd .. cd .. mv ./build/distributions/${{ inputs.plugin-name }}-${{ inputs.opensearch-version }}.0-SNAPSHOT.zip ./${{ inputs.plugin-name }}.zip + echo check if moved + ls shell: bash # Install the plugin, runs its start-script, and start the OpenSearch server @@ -93,7 +95,7 @@ runs: cd .. cd .. chmod +x ./opensearch-${{ inputs.opensearch-version }}/bin/opensearch-plugin - yes | ./opensearch-${{ inputs.opensearch-version }}/bin/opensearch-plugin install file:$pwd/${{ inputs.plugin-name }}.zip + yes | ./opensearch-${{ inputs.opensearch-version }}/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip yes, yes, no | ./opensearch-${{ inputs.opensearch-version }}/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} shell: bash From 3e97659c52ef990d6989ad1f587874e54853eb22 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 11:33:05 -0500 Subject: [PATCH 039/142] Use min builds instead of distributions Signed-off-by: Stephen Crawford --- .../action.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 7e0c29141d..cb45db28a9 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -32,13 +32,13 @@ runs: - uses: peternied/download-file@v1 if: ${{ runner.os == 'Windows' }} with: - url: https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${{ inputs.opensearch-version }}/latest/windows/x64/zip/dist/opensearch/opensearch-${{ inputs.opensearch-version }}-windows-x64.zip + url: https://artifacts.opensearch.org/snapshots/core/opensearch/${{ inputs.opensearch-version }}-SNAPSHOT/opensearch-min-${{ inputs.opensearch-version }}-SNAPSHOT-windows-x64-latest.zip # Download OpenSearch - uses: peternied/download-file@v1 if: ${{ runner.os == 'Linux' }} with: - url: https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${{ inputs.opensearch-version }}/latest/linux/x64/tar/dist/opensearch/opensearch-${{ inputs.opensearch-version }}-linux-x64.tar.gz + url: https://artifacts.opensearch.org/snapshots/core/opensearch/${{ inputs.opensearch-version }}-SNAPSHOT/opensearch-min-${{ inputs.opensearch-version }}-SNAPSHOT-linux-x64-latest.tar.gz # Extract downloaded zip @@ -59,11 +59,11 @@ runs: run: | echo in base dir Windows ls - tar -xzf opensearch-${{ inputs.opensearch-version }}-windows-x64.zip - rm -f opensearch-${{ inputs.opensearch-version }}-windows-x64.zip + tar -xzf opensearch-min-${{ inputs.opensearch-version }}-SNAPSHOT-windows-x64-latest.zip + del opensearch-min-${{ inputs.opensearch-version }}-SNAPSHOT-windows-x64-latest.zip echo after extraction ls - shell: bash + shell: pwsh # Move and rename the plugin for installation - name: Move and rename the plugin for installation @@ -77,7 +77,7 @@ runs: echo $pwd cd .. cd .. - mv ./build/distributions/${{ inputs.plugin-name }}-${{ inputs.opensearch-version }}.0-SNAPSHOT.zip ./${{ inputs.plugin-name }}.zip + mv ./build/distributions/${{ inputs.plugin-name }}-*.zip ${{ inputs.plugin-name }}.zip echo check if moved ls shell: bash @@ -95,8 +95,8 @@ runs: cd .. cd .. chmod +x ./opensearch-${{ inputs.opensearch-version }}/bin/opensearch-plugin - yes | ./opensearch-${{ inputs.opensearch-version }}/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip - yes, yes, no | ./opensearch-${{ inputs.opensearch-version }}/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} + yes | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip + yes, yes, no | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} shell: bash - name: Install Plugin into OpenSearch for Windows @@ -117,7 +117,7 @@ runs: # Run OpenSearch - name: Run OpenSearch with plugin on Linux if: ${{ runner.os == 'Linux'}} - run: .\opensearch-${{ inputs.opensearch-version }}\bin\opensearch.sh + run: .\opensearch-${{ inputs.opensearch-version }}-SNAPSHOT\bin\opensearch.sh shell: bash - name: Run OpenSearch with plugin on Windows From 99cb135ee5e7bf54ebf0a0080e0deda0bb1182f2 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 11:35:55 -0500 Subject: [PATCH 040/142] Add SNAPSHOT suffix Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index cb45db28a9..fe5bcd305b 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -87,7 +87,7 @@ runs: if: ${{ runner.os == 'Linux'}} run: | echo in OS - cd opensearch-${{ inputs.opensearch-version }} + cd opensearch-${{ inputs.opensearch-version }}-SNAPSHOT ls echo in bin cd bin @@ -103,7 +103,7 @@ runs: if: ${{ runner.os == 'Windows'}} run: | echo in OS - cd opensearch-${{ inputs.opensearch-version }}* + cd opensearch-${{ inputs.opensearch-version }}-SNAPSHOT ls echo in bin cd bin From fa406a2deed9df0e01be193b02329248219c253e Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 12:25:11 -0500 Subject: [PATCH 041/142] add .sh Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index fe5bcd305b..d16422a784 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -94,8 +94,8 @@ runs: ls cd .. cd .. - chmod +x ./opensearch-${{ inputs.opensearch-version }}/bin/opensearch-plugin - yes | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip + chmod +x ./opensearch-${{ inputs.opensearch-version }}/bin/opensearch-plugin.sh + yes | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin.sh install file:$(pwd)/${{ inputs.plugin-name }}.zip yes, yes, no | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} shell: bash From b2cf12162f4e5b6314f1caff826ba85128e035b2 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 12:31:01 -0500 Subject: [PATCH 042/142] Test linux, fixed path name Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 4 ++-- .github/workflows/plugin_install.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index d16422a784..0468c74904 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -94,8 +94,8 @@ runs: ls cd .. cd .. - chmod +x ./opensearch-${{ inputs.opensearch-version }}/bin/opensearch-plugin.sh - yes | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin.sh install file:$(pwd)/${{ inputs.plugin-name }}.zip + chmod +x ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin + yes | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip yes, yes, no | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} shell: bash diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index e924acbf10..04f146b3d0 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -7,8 +7,8 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-latest, ubuntu-latest] - jdk: [11, 17] + os: [ubuntu-latest] + jdk: [17] runs-on: ${{ matrix.os }} steps: - name: Set up JDK From bb7f5f3226def0230754fcbb357037aedcc4c006 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 12:41:30 -0500 Subject: [PATCH 043/142] Fix pipe format Signed-off-by: Stephen Crawford --- .../start-opensearch-with-one-plugin/action.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 0468c74904..f6d3a3dde7 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -86,17 +86,9 @@ runs: - name: Install Plugin into OpenSearch for Linux if: ${{ runner.os == 'Linux'}} run: | - echo in OS - cd opensearch-${{ inputs.opensearch-version }}-SNAPSHOT - ls - echo in bin - cd bin - ls - cd .. - cd .. chmod +x ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin yes | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip - yes, yes, no | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} + echo "yes yes no" | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} shell: bash - name: Install Plugin into OpenSearch for Windows From c1a397712ec5ef1203dd930c2710f1115f83d29a Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 12:44:15 -0500 Subject: [PATCH 044/142] Add echo for steps Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index f6d3a3dde7..a088e4d86b 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -88,7 +88,9 @@ runs: run: | chmod +x ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin yes | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip + echo "Installed plugin" echo "yes yes no" | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} + echo "Ran setup script" shell: bash - name: Install Plugin into OpenSearch for Windows From 6a7dd1829908e26b45296928524aebc89e9e431f Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 12:44:45 -0500 Subject: [PATCH 045/142] Add echo for steps Signed-off-by: Stephen Crawford --- .../start-opensearch-with-one-plugin/action.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index a088e4d86b..ac7406818c 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -89,21 +89,13 @@ runs: chmod +x ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin yes | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip echo "Installed plugin" - echo "yes yes no" | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} + echo "yes yes no" | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }}.sh echo "Ran setup script" shell: bash - name: Install Plugin into OpenSearch for Windows if: ${{ runner.os == 'Windows'}} run: | - echo in OS - cd opensearch-${{ inputs.opensearch-version }}-SNAPSHOT - ls - echo in bin - cd bin - ls - cd .. - cd .. 'y' | .\opensearch-${{ inputs.opensearch-version }}-SNAPSHOT\bin\opensearch-plugin.bat install file:$pwd\${{ inputs.plugin-name }}.zip 'y', 'y', 'N' | .\opensearch-${{ inputs.opensearch-version }}-SNAPSHOT\plugins\${{ inputs.plugin-name }}\tools\${{ inputs.plugin-start-script }}.bat shell: pwsh From 2b0973276b31599e96a9aa986e7e18d3799834c6 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 12:48:14 -0500 Subject: [PATCH 046/142] use arrows instead of bars Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index ac7406818c..93c271da5e 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -87,9 +87,10 @@ runs: if: ${{ runner.os == 'Linux'}} run: | chmod +x ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin - yes | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip + echo "Installing plugin" + yes > ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip echo "Installed plugin" - echo "yes yes no" | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }}.sh + echo "yes yes no" > ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }}.sh echo "Ran setup script" shell: bash From f1aabcba782918b8fa9943bcef905e6e3c3f218a Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 12:54:28 -0500 Subject: [PATCH 047/142] Add echo to front of install Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 93c271da5e..3f88cab381 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -88,9 +88,9 @@ runs: run: | chmod +x ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin echo "Installing plugin" - yes > ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip + echo "yes" | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip echo "Installed plugin" - echo "yes yes no" > ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }}.sh + echo "yes yes no" | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }}.sh echo "Ran setup script" shell: bash From 83e81dc966f26884a9ce20cb3dc006e8ffcab24d Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 12:58:39 -0500 Subject: [PATCH 048/142] Try process again Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 3f88cab381..1faf45ed2a 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -88,9 +88,9 @@ runs: run: | chmod +x ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin echo "Installing plugin" - echo "yes" | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip + echo "yes" | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$pwd/${{ inputs.plugin-name }}.zip echo "Installed plugin" - echo "yes yes no" | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }}.sh + echo "yes yes no" | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} echo "Ran setup script" shell: bash From 3d2c12e13383490d12c1cb406073eeca08c86ac8 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 13:10:06 -0500 Subject: [PATCH 049/142] Try to make sure file path is correct for plugin file install Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 1faf45ed2a..754f3bb2f1 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -88,7 +88,7 @@ runs: run: | chmod +x ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin echo "Installing plugin" - echo "yes" | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$pwd/${{ inputs.plugin-name }}.zip + echo "yes" | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:./${{ inputs.plugin-name }}.zip echo "Installed plugin" echo "yes yes no" | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} echo "Ran setup script" From 7ff3310e4c47c15a44ceee0f3d11601c52c1e8a7 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 13:32:22 -0500 Subject: [PATCH 050/142] Use pwd in linux install Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 754f3bb2f1..1faf45ed2a 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -88,7 +88,7 @@ runs: run: | chmod +x ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin echo "Installing plugin" - echo "yes" | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:./${{ inputs.plugin-name }}.zip + echo "yes" | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$pwd/${{ inputs.plugin-name }}.zip echo "Installed plugin" echo "yes yes no" | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} echo "Ran setup script" From a17cc0a7c34f4ab290b6b738d43741d27fe148e2 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 13:42:11 -0500 Subject: [PATCH 051/142] Use pwd in linux install Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 1faf45ed2a..629df1e0fa 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -88,7 +88,7 @@ runs: run: | chmod +x ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin echo "Installing plugin" - echo "yes" | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$pwd/${{ inputs.plugin-name }}.zip + echo "yes" | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip echo "Installed plugin" echo "yes yes no" | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} echo "Ran setup script" @@ -97,7 +97,7 @@ runs: - name: Install Plugin into OpenSearch for Windows if: ${{ runner.os == 'Windows'}} run: | - 'y' | .\opensearch-${{ inputs.opensearch-version }}-SNAPSHOT\bin\opensearch-plugin.bat install file:$pwd\${{ inputs.plugin-name }}.zip + 'y' | .\opensearch-${{ inputs.opensearch-version }}-SNAPSHOT\bin\opensearch-plugin.bat install file:$(pwd)\${{ inputs.plugin-name }}.zip 'y', 'y', 'N' | .\opensearch-${{ inputs.opensearch-version }}-SNAPSHOT\plugins\${{ inputs.plugin-name }}\tools\${{ inputs.plugin-start-script }}.bat shell: pwsh From fe030ba00aba711f08997fdeb52242408951c692 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 13:49:06 -0500 Subject: [PATCH 052/142] remove echo for pipe Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 629df1e0fa..0675a109b6 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -88,9 +88,9 @@ runs: run: | chmod +x ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin echo "Installing plugin" - echo "yes" | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip + y | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip echo "Installed plugin" - echo "yes yes no" | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} + y y n | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} echo "Ran setup script" shell: bash From c8146a6ad4c56e728bfa2270cd0f91af56ef7cda Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 13:55:27 -0500 Subject: [PATCH 053/142] Try with quotes Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 0675a109b6..7d8febc21d 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -88,9 +88,9 @@ runs: run: | chmod +x ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin echo "Installing plugin" - y | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip + 'y' | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip echo "Installed plugin" - y y n | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} + 'y', 'y', 'N' | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} echo "Ran setup script" shell: bash From 2d35d9577cd85468744fb80cfc8348daddd8e8cb Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 13:59:35 -0500 Subject: [PATCH 054/142] Try printf '%s\n' y n n y y n Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 7d8febc21d..8030f860df 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -88,9 +88,9 @@ runs: run: | chmod +x ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin echo "Installing plugin" - 'y' | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip + yes | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip echo "Installed plugin" - 'y', 'y', 'N' | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} + printf '%s\n' y y n | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} echo "Ran setup script" shell: bash From ff5ff60a21422a4d6698dcb1856a6a7deb4e3741 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 14:02:09 -0500 Subject: [PATCH 055/142] Try no pipinh Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 8030f860df..5172e72f09 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -88,9 +88,9 @@ runs: run: | chmod +x ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin echo "Installing plugin" - yes | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip + ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip echo "Installed plugin" - printf '%s\n' y y n | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} + ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} echo "Ran setup script" shell: bash From b3d3f573a7401316567900bfbb3fb494f964d119 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 14:36:09 -0500 Subject: [PATCH 056/142] Bin/bash -c Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 5172e72f09..0f28ae36f4 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -88,9 +88,9 @@ runs: run: | chmod +x ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin echo "Installing plugin" - ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip + /bin/bash -c "yes | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip" echo "Installed plugin" - ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }} + /bin/bash -c "yes yes no | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }}" echo "Ran setup script" shell: bash From c330eb6c62ccf3312164168bf3657eacc7cf9997 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 14:40:28 -0500 Subject: [PATCH 057/142] Bin/bash -c Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 0f28ae36f4..2ea1fb0777 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -90,7 +90,7 @@ runs: echo "Installing plugin" /bin/bash -c "yes | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip" echo "Installed plugin" - /bin/bash -c "yes yes no | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }}" + /bin/bash -c "yes | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }}" echo "Ran setup script" shell: bash From 51eac8530886d88f1944184738c3f0b73d29ac7d Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 14:44:00 -0500 Subject: [PATCH 058/142] Add ls for os dir paths Signed-off-by: Stephen Crawford --- .../start-opensearch-with-one-plugin/action.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 2ea1fb0777..2c9cbc7a18 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -90,6 +90,16 @@ runs: echo "Installing plugin" /bin/bash -c "yes | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip" echo "Installed plugin" + cd ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/ + echo "In plugins" + ls + cd ./${{ inputs.plugin-name }}/tools + echo "In tools" + ls + cd .. + cd .. + cd .. + cd .. /bin/bash -c "yes | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }}" echo "Ran setup script" shell: bash From e8b18ee5efcf21c32ed66f8b8be31f81873fb32a Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 14:46:42 -0500 Subject: [PATCH 059/142] Add ls for os dir paths Signed-off-by: Stephen Crawford --- .../start-opensearch-with-one-plugin/action.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 2c9cbc7a18..34be3fc4c0 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -90,17 +90,7 @@ runs: echo "Installing plugin" /bin/bash -c "yes | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip" echo "Installed plugin" - cd ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/ - echo "In plugins" - ls - cd ./${{ inputs.plugin-name }}/tools - echo "In tools" - ls - cd .. - cd .. - cd .. - cd .. - /bin/bash -c "yes | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }}" + /bin/bash -c "yes | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }}.sh" echo "Ran setup script" shell: bash From 49a27b236d132e1714cdab0bc0b81ca0825beb97 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 14:49:48 -0500 Subject: [PATCH 060/142] Fix permissions Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 34be3fc4c0..28273cd3d2 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -90,6 +90,7 @@ runs: echo "Installing plugin" /bin/bash -c "yes | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip" echo "Installed plugin" + chmod +x ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }}.sh /bin/bash -c "yes | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }}.sh" echo "Ran setup script" shell: bash From 0639752038a5d34353c0b8b1121723bbb2696be7 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 14:53:09 -0500 Subject: [PATCH 061/142] Work? Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 28273cd3d2..b4888bec6e 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -105,7 +105,7 @@ runs: # Run OpenSearch - name: Run OpenSearch with plugin on Linux if: ${{ runner.os == 'Linux'}} - run: .\opensearch-${{ inputs.opensearch-version }}-SNAPSHOT\bin\opensearch.sh + run: ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch.sh shell: bash - name: Run OpenSearch with plugin on Windows From 62d62bde9fa2c41ef6b136317c6bd8bb59213414 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 14:56:16 -0500 Subject: [PATCH 062/142] Ls OS bin: Signed-off-by: Stephen Crawford --- .../actions/start-opensearch-with-one-plugin/action.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index b4888bec6e..410740b70b 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -105,7 +105,13 @@ runs: # Run OpenSearch - name: Run OpenSearch with plugin on Linux if: ${{ runner.os == 'Linux'}} - run: ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch.sh + run: | + echo "Look into os bin" + cd opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin + ls + cd .. + cd .. + ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch.sh shell: bash - name: Run OpenSearch with plugin on Windows From 03fb2dea0721adc9af491ce629b6f2945a98730b Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 14:59:18 -0500 Subject: [PATCH 063/142] Remove suffix Signed-off-by: Stephen Crawford --- .../actions/start-opensearch-with-one-plugin/action.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 410740b70b..a07d9e6316 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -105,13 +105,7 @@ runs: # Run OpenSearch - name: Run OpenSearch with plugin on Linux if: ${{ runner.os == 'Linux'}} - run: | - echo "Look into os bin" - cd opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin - ls - cd .. - cd .. - ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch.sh + run: ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch shell: bash - name: Run OpenSearch with plugin on Windows From 771c20578b2e16c78fb9dfef838e63a98a91da3e Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 15:07:15 -0500 Subject: [PATCH 064/142] Test Linux and JDK 17 Signed-off-by: Stephen Crawford --- .../action.yml | 29 ++----------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index a07d9e6316..2d1fb2c730 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -45,41 +45,21 @@ runs: - name: Extract downloaded zip if: ${{ runner.os == 'Linux' }} run: | - echo in base dir linux - ls tar -xzf opensearch-*.tar.gz rm -f opensearch-*.tar.gz - echo after extraction - ls shell: bash # Extract downloaded zip - name: Extract downloaded zip if: ${{ runner.os == 'Windows' }} run: | - echo in base dir Windows - ls tar -xzf opensearch-min-${{ inputs.opensearch-version }}-SNAPSHOT-windows-x64-latest.zip del opensearch-min-${{ inputs.opensearch-version }}-SNAPSHOT-windows-x64-latest.zip - echo after extraction - ls shell: pwsh # Move and rename the plugin for installation - name: Move and rename the plugin for installation - run: | - echo in build - cd build - ls - echo in distributions - cd distributions - ls - echo $pwd - cd .. - cd .. - mv ./build/distributions/${{ inputs.plugin-name }}-*.zip ${{ inputs.plugin-name }}.zip - echo check if moved - ls + run: mv ./build/distributions/${{ inputs.plugin-name }}-*.zip ${{ inputs.plugin-name }}.zip shell: bash # Install the plugin, runs its start-script, and start the OpenSearch server @@ -87,12 +67,9 @@ runs: if: ${{ runner.os == 'Linux'}} run: | chmod +x ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin - echo "Installing plugin" /bin/bash -c "yes | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip" - echo "Installed plugin" chmod +x ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }}.sh /bin/bash -c "yes | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }}.sh" - echo "Ran setup script" shell: bash - name: Install Plugin into OpenSearch for Windows @@ -122,9 +99,7 @@ runs: # Verify that the server is operational - name: Check OpenSearch Running on Linux if: ${{ runner.os != 'Windows'}} - run: | - docker logs ops - curl https://localhost:9200/_cat/plugins -u 'admin:admin' -k -v + run: curl https://localhost:9200/_cat/plugins -u 'admin:admin' -k -v shell: bash - name: Check OpenSearch Running on Windows From 639f2175bec5b364a381fa82bb3b843321f979d2 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 15:14:09 -0500 Subject: [PATCH 065/142] specify bin/bash for run Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 2d1fb2c730..73ba70ef84 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -82,7 +82,7 @@ runs: # Run OpenSearch - name: Run OpenSearch with plugin on Linux if: ${{ runner.os == 'Linux'}} - run: ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch + run: /bin/bash -c "./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch" shell: bash - name: Run OpenSearch with plugin on Windows From 009bcf7308eb8884bf9850cd58471ae9dd1debc5 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 15:50:22 -0500 Subject: [PATCH 066/142] Craig's suggestion Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 6 +----- .github/workflows/plugin_install.yml | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 73ba70ef84..8b2a9749e7 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -14,10 +14,6 @@ inputs: description: 'The file name for the configuration script for the plugin such as install_demo_configurations -- may not be needed for every plugin' required: false - docker-host-plugin-zip: - description: 'The name of the zip file for the plugin hosted on docker-host i.e. security-plugin.zip ' - required: true - runs: using: "composite" steps: @@ -82,7 +78,7 @@ runs: # Run OpenSearch - name: Run OpenSearch with plugin on Linux if: ${{ runner.os == 'Linux'}} - run: /bin/bash -c "./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch" + run: /bin/bash -c "./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch &" shell: bash - name: Run OpenSearch with plugin on Windows diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 04f146b3d0..ad846abed8 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -28,7 +28,6 @@ jobs: opensearch-version: 3.0.0 plugin-name: opensearch-security plugin-start-script: install_demo_configuration - docker-host-plugin-zip: security-plugin.zip - name: Run sanity tests uses: gradle/gradle-build-action@v2 From 318e6c6b8913a02525de910c0448249d8c0121c6 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 15:55:46 -0500 Subject: [PATCH 067/142] Test on windows and linux fully without docker Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index ad846abed8..6a68a8c519 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -7,8 +7,8 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest] - jdk: [17] + os: [windows-latest, ubuntu-latest] + jdk: [11, 17] runs-on: ${{ matrix.os }} steps: - name: Set up JDK From cc6e627611d547f4ed19d7f47d43a82271a9e7a5 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 15:56:41 -0500 Subject: [PATCH 068/142] Re enable workflows Signed-off-by: Stephen Crawford --- .github/workflows/ci.yml | 2 +- .github/workflows/code-hygiene.yml | 2 +- .github/workflows/integration-tests.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 125328a9b5..3e7fc78987 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ name: CI -on: [] #push, pull_request +on: [push, pull_request] env: GRADLE_OPTS: -Dhttp.keepAlive=false diff --git a/.github/workflows/code-hygiene.yml b/.github/workflows/code-hygiene.yml index 53934662eb..f078cb2b56 100644 --- a/.github/workflows/code-hygiene.yml +++ b/.github/workflows/code-hygiene.yml @@ -1,6 +1,6 @@ name: Code Hygiene -on: [] #push, pull_request +on: [push, pull_request] jobs: linelint: diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 370d96a789..fff2f84650 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1,6 +1,6 @@ name: Bulk Integration Test -on: [ ] #workflow_dispatch +on: [workflow_dispatch] env: GRADLE_OPTS: -Dhttp.keepAlive=false From 39dac1a83c830e3e24e10e1e23970c24d2d73d52 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 16:52:07 -0500 Subject: [PATCH 069/142] Try setup script Signed-off-by: Stephen Crawford --- .../action.yml | 24 ++++++++++----- .github/workflows/plugin_install.yml | 30 +++++++++++++++++-- 2 files changed, 45 insertions(+), 9 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 8b2a9749e7..b544f41019 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -10,7 +10,7 @@ inputs: description: 'The name of the plugin to use, such as opensearch-security' required: true - plugin-start-script: + setup-script: description: 'The file name for the configuration script for the plugin such as install_demo_configurations -- may not be needed for every plugin' required: false @@ -58,23 +58,33 @@ runs: run: mv ./build/distributions/${{ inputs.plugin-name }}-*.zip ${{ inputs.plugin-name }}.zip shell: bash - # Install the plugin, runs its start-script, and start the OpenSearch server + # Install the plugin - name: Install Plugin into OpenSearch for Linux if: ${{ runner.os == 'Linux'}} run: | - chmod +x ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin - /bin/bash -c "yes | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip" - chmod +x ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }}.sh - /bin/bash -c "yes | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }}.sh" + chmod +x ./setup.sh + ./setup.sh shell: bash - name: Install Plugin into OpenSearch for Windows if: ${{ runner.os == 'Windows'}} run: | 'y' | .\opensearch-${{ inputs.opensearch-version }}-SNAPSHOT\bin\opensearch-plugin.bat install file:$(pwd)\${{ inputs.plugin-name }}.zip - 'y', 'y', 'N' | .\opensearch-${{ inputs.opensearch-version }}-SNAPSHOT\plugins\${{ inputs.plugin-name }}\tools\${{ inputs.plugin-start-script }}.bat shell: pwsh + # Run any configuration scripts + - name: Run Setup Script for Linux + if: ${{ runner.os == 'Linux' }} & ${{ inputs.setup-script == true }} + run: | + chmod +x ./setup.sh + ./setup.sh + shell: bash + + - name: Run Setup Script for Windows + if: ${{ runner.os == 'Windows' }} & ${{ inputs.setup-script == true }} + run: start .\setup.bat + shell: bash + # Run OpenSearch - name: Run OpenSearch with plugin on Linux if: ${{ runner.os == 'Linux'}} diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 6a68a8c519..7c17e4cc41 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -8,7 +8,7 @@ jobs: fail-fast: false matrix: os: [windows-latest, ubuntu-latest] - jdk: [11, 17] + jdk: [17] runs-on: ${{ matrix.os }} steps: - name: Set up JDK @@ -22,12 +22,38 @@ jobs: - name: Assemble target plugin run: ./gradlew assemble + - name: Create Setup Script + if: ${{ runner.os == 'Linux' }} + run: | + cat > setup.sh <<'EOF' + chmod +x ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin + /bin/bash -c "yes | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip" + chown -R opensearch $OPENSEARCH_HOME + chmod 0700 $OPENSEARCH_HOME/config + chmod 0600 $OPENSEARCH_HOME/config/kirk.pem + chmod 0600 $OPENSEARCH_HOME/config/kirk-key.pem + chmod 0600 $OPENSEARCH_HOME/config/esnode.pem + chmod 0600 $OPENSEARCH_HOME/config/esnode-key.pem + chmod 0600 $OPENSEARCH_HOME/config/root-ca.pem + # echo plugins.security.unsupported.restapi.allow_securityconfig_modification: true >> $OPENSEARCH_HOME/config/opensearch.yml + echo plugins.security.allow_default_init_securityindex: true >> $OPENSEARCH_HOME/config/opensearch.yml + echo network.host: "0.0.0.0" >> $OPENSEARCH_HOME/config/opensearch.yml + echo discovery.type: single-node >> $OPENSEARCH_HOME/config/opensearch.yml + EOF + + - name: Create Setup Script + if: ${{ runner.os == 'Windows' }} + run: | + cat > setup.bat <<'EOF' + 'y', 'y', 'N' | .\opensearch-${{ inputs.opensearch-version }}-SNAPSHOT\plugins\${{ inputs.plugin-name }}\tools\${{ inputs.plugin-start-script }}.bat + EOF + - name: Run Opensearch with A Single Plugin uses: ./.github/actions/start-opensearch-with-one-plugin with: opensearch-version: 3.0.0 plugin-name: opensearch-security - plugin-start-script: install_demo_configuration + setup.sh: true - name: Run sanity tests uses: gradle/gradle-build-action@v2 From 73437ca852ce50efcda694be8cd5b27c7bfec47b Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 16:56:25 -0500 Subject: [PATCH 070/142] diasble extra workflows Signed-off-by: Stephen Crawford --- .github/workflows/ci.yml | 2 +- .github/workflows/code-hygiene.yml | 2 +- .github/workflows/integration-tests.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e7fc78987..125328a9b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ name: CI -on: [push, pull_request] +on: [] #push, pull_request env: GRADLE_OPTS: -Dhttp.keepAlive=false diff --git a/.github/workflows/code-hygiene.yml b/.github/workflows/code-hygiene.yml index f078cb2b56..53934662eb 100644 --- a/.github/workflows/code-hygiene.yml +++ b/.github/workflows/code-hygiene.yml @@ -1,6 +1,6 @@ name: Code Hygiene -on: [push, pull_request] +on: [] #push, pull_request jobs: linelint: diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index fff2f84650..9b02b653cb 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1,6 +1,6 @@ name: Bulk Integration Test -on: [workflow_dispatch] +on: [] #workflow_dispatch env: GRADLE_OPTS: -Dhttp.keepAlive=false From 457a7be76e5eb5ecffeda6a29e94dcc92fd8e9a7 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Thu, 17 Nov 2022 17:07:31 -0500 Subject: [PATCH 071/142] fix pathes in workflow Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 7c17e4cc41..39dd803ebf 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -26,8 +26,8 @@ jobs: if: ${{ runner.os == 'Linux' }} run: | cat > setup.sh <<'EOF' - chmod +x ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin - /bin/bash -c "yes | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/${{ inputs.plugin-name }}.zip" + chmod +x ./opensearch-3.0.0-SNAPSHOT/bin/opensearch-plugin + /bin/bash -c "yes | ./opensearch-3.0.0-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/opensearch-security.zip" chown -R opensearch $OPENSEARCH_HOME chmod 0700 $OPENSEARCH_HOME/config chmod 0600 $OPENSEARCH_HOME/config/kirk.pem From 32ec5c0151d596fcde664e7e1876b2cb85fbc909 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 09:53:56 -0500 Subject: [PATCH 072/142] Different cat pattern for Windows Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 39dd803ebf..2b0d5d3e34 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -44,9 +44,9 @@ jobs: - name: Create Setup Script if: ${{ runner.os == 'Windows' }} run: | - cat > setup.bat <<'EOF' - 'y', 'y', 'N' | .\opensearch-${{ inputs.opensearch-version }}-SNAPSHOT\plugins\${{ inputs.plugin-name }}\tools\${{ inputs.plugin-start-script }}.bat - EOF + New-Item .\setup.bat -type file + echo "'y', 'y', 'N' | .\opensearch-${{ inputs.opensearch-version }}-SNAPSHOT\plugins\${{ inputs.plugin-name }}\tools\${{ inputs.plugin-start-script }}.bat" >> setup.bat + - name: Run Opensearch with A Single Plugin uses: ./.github/actions/start-opensearch-with-one-plugin From 2828bf8a3e2d035deedce6d81c4b0d1685f7a1b5 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 09:58:09 -0500 Subject: [PATCH 073/142] Remove config settings Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 2b0d5d3e34..5857e84d51 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -28,17 +28,6 @@ jobs: cat > setup.sh <<'EOF' chmod +x ./opensearch-3.0.0-SNAPSHOT/bin/opensearch-plugin /bin/bash -c "yes | ./opensearch-3.0.0-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/opensearch-security.zip" - chown -R opensearch $OPENSEARCH_HOME - chmod 0700 $OPENSEARCH_HOME/config - chmod 0600 $OPENSEARCH_HOME/config/kirk.pem - chmod 0600 $OPENSEARCH_HOME/config/kirk-key.pem - chmod 0600 $OPENSEARCH_HOME/config/esnode.pem - chmod 0600 $OPENSEARCH_HOME/config/esnode-key.pem - chmod 0600 $OPENSEARCH_HOME/config/root-ca.pem - # echo plugins.security.unsupported.restapi.allow_securityconfig_modification: true >> $OPENSEARCH_HOME/config/opensearch.yml - echo plugins.security.allow_default_init_securityindex: true >> $OPENSEARCH_HOME/config/opensearch.yml - echo network.host: "0.0.0.0" >> $OPENSEARCH_HOME/config/opensearch.yml - echo discovery.type: single-node >> $OPENSEARCH_HOME/config/opensearch.yml EOF - name: Create Setup Script From 99d5df147ad3b22ec28caa92a2abe66efc08c479 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 09:59:11 -0500 Subject: [PATCH 074/142] Swap to && from & Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index b544f41019..97fd805ceb 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -74,14 +74,15 @@ runs: # Run any configuration scripts - name: Run Setup Script for Linux - if: ${{ runner.os == 'Linux' }} & ${{ inputs.setup-script == true }} + if: ${{ runner.os == 'Linux' }} && ${{ inputs.setup-script == true }} run: | + echo "running linux setup" chmod +x ./setup.sh ./setup.sh shell: bash - name: Run Setup Script for Windows - if: ${{ runner.os == 'Windows' }} & ${{ inputs.setup-script == true }} + if: ${{ runner.os == 'Windows' }} && ${{ inputs.setup-script == true }} run: start .\setup.bat shell: bash From f31f9d159bfdb17dcdd31b9bae881500e84e5be8 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 10:04:56 -0500 Subject: [PATCH 075/142] Fix linux Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 4 ++-- .github/workflows/plugin_install.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 97fd805ceb..f26d27b31d 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -62,8 +62,8 @@ runs: - name: Install Plugin into OpenSearch for Linux if: ${{ runner.os == 'Linux'}} run: | - chmod +x ./setup.sh - ./setup.sh + chmod +x ./opensearch-3.0.0-SNAPSHOT/bin/opensearch-plugin + /bin/bash -c "yes | ./opensearch-3.0.0-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/opensearch-security.zip" shell: bash - name: Install Plugin into OpenSearch for Windows diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 5857e84d51..911bb9a33d 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -26,8 +26,8 @@ jobs: if: ${{ runner.os == 'Linux' }} run: | cat > setup.sh <<'EOF' - chmod +x ./opensearch-3.0.0-SNAPSHOT/bin/opensearch-plugin - /bin/bash -c "yes | ./opensearch-3.0.0-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/opensearch-security.zip" + chmod +x ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }}.sh + /bin/bash -c "yes | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }}.sh" EOF - name: Create Setup Script From d2cb0dfe391d893fb4c801128e3f1c09961b8435 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 10:07:21 -0500 Subject: [PATCH 076/142] Fix linux Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 911bb9a33d..b100b25786 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -26,15 +26,15 @@ jobs: if: ${{ runner.os == 'Linux' }} run: | cat > setup.sh <<'EOF' - chmod +x ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }}.sh - /bin/bash -c "yes | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-start-script }}.sh" + chmod +x ./opensearch-3.0.0-SNAPSHOT/plugins/opensearch-security/tools/opensearch-security.sh + /bin/bash -c "yes | ./opensearch-3.0.0-SNAPSHOT/plugins/opensearch-security/tools/install_demo_configuration.sh" EOF - name: Create Setup Script if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - echo "'y', 'y', 'N' | .\opensearch-${{ inputs.opensearch-version }}-SNAPSHOT\plugins\${{ inputs.plugin-name }}\tools\${{ inputs.plugin-start-script }}.bat" >> setup.bat + echo "'y', 'y', 'N' | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" >> setup.bat - name: Run Opensearch with A Single Plugin From f773d4e570675f70ad376de92e179141b0b71e6f Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 10:19:41 -0500 Subject: [PATCH 077/142] Fix ands in ifs Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index f26d27b31d..3c300c2b07 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -74,7 +74,7 @@ runs: # Run any configuration scripts - name: Run Setup Script for Linux - if: ${{ runner.os == 'Linux' }} && ${{ inputs.setup-script == true }} + if: ${{ runner.os == 'Linux' && inputs.setup-script == 'true' }} run: | echo "running linux setup" chmod +x ./setup.sh @@ -82,7 +82,7 @@ runs: shell: bash - name: Run Setup Script for Windows - if: ${{ runner.os == 'Windows' }} && ${{ inputs.setup-script == true }} + if: ${{ runner.os == 'Windows'&& inputs.setup-script == 'true' }} run: start .\setup.bat shell: bash From 399c012143d1f0143a4d58c4e901ea9168fcfddd Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 10:25:04 -0500 Subject: [PATCH 078/142] remove quotes from true Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 3c300c2b07..6b687bb844 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -12,7 +12,7 @@ inputs: setup-script: description: 'The file name for the configuration script for the plugin such as install_demo_configurations -- may not be needed for every plugin' - required: false + required: true runs: using: "composite" @@ -74,7 +74,7 @@ runs: # Run any configuration scripts - name: Run Setup Script for Linux - if: ${{ runner.os == 'Linux' && inputs.setup-script == 'true' }} + if: ${{ runner.os == 'Linux' && inputs.setup-script == true }} run: | echo "running linux setup" chmod +x ./setup.sh @@ -82,7 +82,7 @@ runs: shell: bash - name: Run Setup Script for Windows - if: ${{ runner.os == 'Windows'&& inputs.setup-script == 'true' }} + if: ${{ runner.os == 'Windows' && inputs.setup-script == true }} run: start .\setup.bat shell: bash From 6ab899d493471045a2c5c75364e1f9057d06b820 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 10:28:59 -0500 Subject: [PATCH 079/142] remove quotes from true Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index b100b25786..45e1a27be1 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -42,7 +42,7 @@ jobs: with: opensearch-version: 3.0.0 plugin-name: opensearch-security - setup.sh: true + setup-script: true - name: Run sanity tests uses: gradle/gradle-build-action@v2 From 66983820b27603e1aba7507fbbdec782f4ae0d53 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 10:33:31 -0500 Subject: [PATCH 080/142] Readd quotes to true Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 6b687bb844..ae6a26e968 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -74,7 +74,7 @@ runs: # Run any configuration scripts - name: Run Setup Script for Linux - if: ${{ runner.os == 'Linux' && inputs.setup-script == true }} + if: ${{ runner.os == 'Linux' && inputs.setup-script == 'true' }} run: | echo "running linux setup" chmod +x ./setup.sh @@ -82,7 +82,7 @@ runs: shell: bash - name: Run Setup Script for Windows - if: ${{ runner.os == 'Windows' && inputs.setup-script == true }} + if: ${{ runner.os == 'Windows' && inputs.setup-script == 'true' }} run: start .\setup.bat shell: bash From 5ed4e99e052d6cb1f7546ae8dad38990ecc5768d Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 10:36:55 -0500 Subject: [PATCH 081/142] Fix permission mistake Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 45e1a27be1..b0e4d3c842 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -26,7 +26,7 @@ jobs: if: ${{ runner.os == 'Linux' }} run: | cat > setup.sh <<'EOF' - chmod +x ./opensearch-3.0.0-SNAPSHOT/plugins/opensearch-security/tools/opensearch-security.sh + chmod +x ./opensearch-3.0.0-SNAPSHOT/plugins/opensearch-security/tools/install_demo_configuration.sh /bin/bash -c "yes | ./opensearch-3.0.0-SNAPSHOT/plugins/opensearch-security/tools/install_demo_configuration.sh" EOF From a2b5940c6115706b97eac95db1a9fb90e8718a8b Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 10:39:06 -0500 Subject: [PATCH 082/142] Add note for when running windows setup script Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index ae6a26e968..96aee38889 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -83,7 +83,9 @@ runs: - name: Run Setup Script for Windows if: ${{ runner.os == 'Windows' && inputs.setup-script == 'true' }} - run: start .\setup.bat + run: | + echo "Running Windows Startup Script" + start .\setup.bat shell: bash # Run OpenSearch From 812ac69975f3e4b5c24b1d66266fd3cf0d2eb1e6 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 10:56:36 -0500 Subject: [PATCH 083/142] Try to fix how command added to windows script Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index b0e4d3c842..f2050f7834 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -34,7 +34,7 @@ jobs: if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - echo "'y', 'y', 'N' | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" >> setup.bat + Add-Content -Path .\setup.bat -Value ''y', 'y', 'N' | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat' - name: Run Opensearch with A Single Plugin From caa4784712015423ec35a69a255ae9263f711bb0 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 11:01:09 -0500 Subject: [PATCH 084/142] Try to fix how command added to windows script Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index f2050f7834..8f1dc19278 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -34,7 +34,7 @@ jobs: if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - Add-Content -Path .\setup.bat -Value ''y', 'y', 'N' | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat' + Add-Content -Path .\setup.bat -Value "'y', 'y', 'N' | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" - name: Run Opensearch with A Single Plugin From e7be66cad1cb39ee932c105df1d34ae6e189c90e Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 11:06:11 -0500 Subject: [PATCH 085/142] Call windows command Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 8f1dc19278..0d2a1f49b5 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -7,7 +7,7 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-latest, ubuntu-latest] + os: [windows-latest] jdk: [17] runs-on: ${{ matrix.os }} steps: @@ -34,7 +34,7 @@ jobs: if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - Add-Content -Path .\setup.bat -Value "'y', 'y', 'N' | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" + Add-Content -Path .\setup.bat -Value "call 'y', 'y', 'N' | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" - name: Run Opensearch with A Single Plugin From 39b6eb29f26fd34297fdcc26b871a043d0e34853 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 11:15:58 -0500 Subject: [PATCH 086/142] Remove arguments Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 0d2a1f49b5..4896b29640 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -34,7 +34,7 @@ jobs: if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - Add-Content -Path .\setup.bat -Value "call 'y', 'y', 'N' | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" + Add-Content -Path .\setup.bat -Value "call .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" - name: Run Opensearch with A Single Plugin From d8f70e36ed685e86650a6206780fc8f1872ee86a Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 11:26:53 -0500 Subject: [PATCH 087/142] Try with bash in powershell Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 4896b29640..5106e83100 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -34,7 +34,7 @@ jobs: if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - Add-Content -Path .\setup.bat -Value "call .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" + Add-Content -Path .\setup.bat -Value "/bin/bash -c "yes | ./opensearch-3.0.0-SNAPSHOT/plugins/opensearch-security/tools/install_demo_configuration.bat"" - name: Run Opensearch with A Single Plugin From 9daa34067fdc9efd2d6079b8cfeaf6688e0665a2 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 11:38:02 -0500 Subject: [PATCH 088/142] Retry windows Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 5106e83100..e5478d1776 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -34,7 +34,7 @@ jobs: if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - Add-Content -Path .\setup.bat -Value "/bin/bash -c "yes | ./opensearch-3.0.0-SNAPSHOT/plugins/opensearch-security/tools/install_demo_configuration.bat"" + Add-Content -Path .\setup.bat -Value "'y', 'y', 'N' | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" - name: Run Opensearch with A Single Plugin From 1f429a5304994d9dd09052487838e4254f8d801e Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 11:48:15 -0500 Subject: [PATCH 089/142] Try redirection Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index e5478d1776..2b7b3d995b 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -34,7 +34,7 @@ jobs: if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - Add-Content -Path .\setup.bat -Value "'y', 'y', 'N' | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" + "'y', 'y', 'N' | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" >> .\setup.bat - name: Run Opensearch with A Single Plugin From eaed816290a3da4834fb96a4ef34c103d1d99b7a Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 11:54:07 -0500 Subject: [PATCH 090/142] Print out bat script Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 2b7b3d995b..933a572a43 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -35,6 +35,7 @@ jobs: run: | New-Item .\setup.bat -type file "'y', 'y', 'N' | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" >> .\setup.bat + get-content .\setup.bat - name: Run Opensearch with A Single Plugin From fb31b63892a8abbccd26aa4297242e1d16873a14 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 12:02:36 -0500 Subject: [PATCH 091/142] Assign args variable before Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 933a572a43..dc3e7f60df 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -34,7 +34,8 @@ jobs: if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - "'y', 'y', 'N' | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" >> .\setup.bat + "$args = 'y', 'y', 'N'" >> setup.bat + "call .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat $args" >> .\setup.bat get-content .\setup.bat From 7e69404923bf8b78fc83130123ace326338c1087 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 12:06:29 -0500 Subject: [PATCH 092/142] Escape Args Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index dc3e7f60df..177b76dde6 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -34,8 +34,8 @@ jobs: if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - "$args = 'y', 'y', 'N'" >> setup.bat - "call .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat $args" >> .\setup.bat + "^$args = 'y', 'y', 'N'" >> setup.bat + "call .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat ^$args" >> .\setup.bat get-content .\setup.bat From 54e1839159d2b7d15045af241aff4c670014eab1 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 12:10:59 -0500 Subject: [PATCH 093/142] Reddit solution Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 177b76dde6..1a03ff6de4 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -34,8 +34,7 @@ jobs: if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - "^$args = 'y', 'y', 'N'" >> setup.bat - "call .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat ^$args" >> .\setup.bat + Set-Content .\setup.bat "'y', 'y', 'N' | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" -Encoding Ascii get-content .\setup.bat From 05a01efae80b3b9f2e29339de1803c5968527dee Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 12:15:56 -0500 Subject: [PATCH 094/142] swap shell type Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 2 +- .github/workflows/plugin_install.yml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 96aee38889..673ef456e4 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -86,7 +86,7 @@ runs: run: | echo "Running Windows Startup Script" start .\setup.bat - shell: bash + shell: pwsh # Run OpenSearch - name: Run OpenSearch with plugin on Linux diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 1a03ff6de4..0c74560947 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -35,7 +35,6 @@ jobs: run: | New-Item .\setup.bat -type file Set-Content .\setup.bat "'y', 'y', 'N' | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" -Encoding Ascii - get-content .\setup.bat - name: Run Opensearch with A Single Plugin From 0f5f910830096c30145a324547ef4a8284458a91 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 12:22:11 -0500 Subject: [PATCH 095/142] swap shell type Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 0c74560947..abf971d51c 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -34,7 +34,7 @@ jobs: if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - Set-Content .\setup.bat "'y', 'y', 'N' | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" -Encoding Ascii + Set-Content .\setup.bat "call .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" - name: Run Opensearch with A Single Plugin From 5a3835fc82d73d56b505746fe3cf5ea222226283 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 12:29:21 -0500 Subject: [PATCH 096/142] Add call and get content to the script Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index abf971d51c..5ce4361921 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -35,7 +35,7 @@ jobs: run: | New-Item .\setup.bat -type file Set-Content .\setup.bat "call .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" - + Get-Content .\setup.bat - name: Run Opensearch with A Single Plugin uses: ./.github/actions/start-opensearch-with-one-plugin From 860e4ef219ea688df68ac412efd16ba9f45dd62e Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 13:23:56 -0500 Subject: [PATCH 097/142] Add echos and @ Signed-off-by: Stephen Crawford --- .../start-opensearch-with-one-plugin/action.yml | 10 +++++----- .github/workflows/plugin_install.yml | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 673ef456e4..34c6c1c7e2 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -74,19 +74,19 @@ runs: # Run any configuration scripts - name: Run Setup Script for Linux - if: ${{ runner.os == 'Linux' && inputs.setup-script == 'true' }} + if: ${{ runner.os == 'Linux' && inputs.setup-script != '' }} run: | echo "running linux setup" - chmod +x ./setup.sh + chmod +x ./setup.sh ./setup.sh shell: bash - name: Run Setup Script for Windows - if: ${{ runner.os == 'Windows' && inputs.setup-script == 'true' }} + if: ${{ runner.os == 'Windows' && inputs.setup-script != '' }} run: | echo "Running Windows Startup Script" - start .\setup.bat - shell: pwsh + .\setup.bat + shell: bash # Run OpenSearch - name: Run OpenSearch with plugin on Linux diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 5ce4361921..766412f054 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -34,7 +34,8 @@ jobs: if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - Set-Content .\setup.bat "call .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" + Set-Content .\setup.bat "@call .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" + "@echo Echo from Setup " >> .\setup.bat Get-Content .\setup.bat - name: Run Opensearch with A Single Plugin From 865d6c2799c431672fe19f8aeb21de9555d6daaf Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 13:28:55 -0500 Subject: [PATCH 098/142] Swap to action version of assemble Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 766412f054..084470daf5 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -20,7 +20,9 @@ jobs: uses: actions/checkout@v2 - name: Assemble target plugin - run: ./gradlew assemble + uses: gradle/gradle-build-action@v2 + with: + arguments: assemble - name: Create Setup Script if: ${{ runner.os == 'Linux' }} From 5c61919c1376acaec86ebce93a0b56240e3d2824 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 13:31:35 -0500 Subject: [PATCH 099/142] Cat the windows script Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 34c6c1c7e2..f1f84e2072 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -85,7 +85,8 @@ runs: if: ${{ runner.os == 'Windows' && inputs.setup-script != '' }} run: | echo "Running Windows Startup Script" - .\setup.bat + cat setup.bat + setup.bat shell: bash # Run OpenSearch From 327ed3e83b037e27d0aa2a29ecbe615874b35e16 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 13:36:54 -0500 Subject: [PATCH 100/142] Start the bat file Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index f1f84e2072..d94fd952b6 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -86,7 +86,7 @@ runs: run: | echo "Running Windows Startup Script" cat setup.bat - setup.bat + start setup.bat shell: bash # Run OpenSearch From 7bfe16882e565248c3a4247391b6be4a2b30b281 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 13:38:35 -0500 Subject: [PATCH 101/142] Try slash bat file Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index d94fd952b6..62372e3974 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -86,7 +86,7 @@ runs: run: | echo "Running Windows Startup Script" cat setup.bat - start setup.bat + .\setup.bat shell: bash # Run OpenSearch From 6f8af4692bb7ad1c3cefe5f7cb95b9b7ec7c9071 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 13:44:20 -0500 Subject: [PATCH 102/142] Flip slash Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 62372e3974..85f6f26471 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -86,7 +86,7 @@ runs: run: | echo "Running Windows Startup Script" cat setup.bat - .\setup.bat + ./setup.bat shell: bash # Run OpenSearch From 0d0ae7df030dba7c0d6b75ecba81567dabd0d5a5 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 16:02:57 -0500 Subject: [PATCH 103/142] Echo then call? Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 084470daf5..62d23d7b2c 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -36,7 +36,7 @@ jobs: if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - Set-Content .\setup.bat "@call .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" + Set-Content .\setup.bat "echo y | @call .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" "@echo Echo from Setup " >> .\setup.bat Get-Content .\setup.bat From f734cafd3aaaa92acd819f979e5e910c2da03ca4 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 16:07:30 -0500 Subject: [PATCH 104/142] YYN Call? Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 62d23d7b2c..44c9eab2e8 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -36,7 +36,7 @@ jobs: if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - Set-Content .\setup.bat "echo y | @call .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" + Set-Content .\setup.bat "'y', 'y', 'N' | @call .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" "@echo Echo from Setup " >> .\setup.bat Get-Content .\setup.bat From 2a3ae7501b7baa154a74811100e7fb4bd9cb992a Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 16:12:00 -0500 Subject: [PATCH 105/142] YYN No call Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 44c9eab2e8..616b018edf 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -36,7 +36,7 @@ jobs: if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - Set-Content .\setup.bat "'y', 'y', 'N' | @call .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" + Set-Content .\setup.bat "'y', 'y', 'N' | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" "@echo Echo from Setup " >> .\setup.bat Get-Content .\setup.bat From 1cff85a0fd197936629ee825c3b9a6b35ea009ae Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 16:16:45 -0500 Subject: [PATCH 106/142] Escape pipe Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 616b018edf..bac2c58dab 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -36,7 +36,7 @@ jobs: if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - Set-Content .\setup.bat "'y', 'y', 'N' | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" + Set-Content .\setup.bat "'y', 'y', 'N' ^| .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" "@echo Echo from Setup " >> .\setup.bat Get-Content .\setup.bat From 69435620ba246934554d503e12840c12b45c4ba2 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 16:19:47 -0500 Subject: [PATCH 107/142] Escape pipe with echo and call Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index bac2c58dab..7443785876 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -36,7 +36,7 @@ jobs: if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - Set-Content .\setup.bat "'y', 'y', 'N' ^| .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" + Set-Content .\setup.bat "echo "'y', 'y', 'N'" ^| call .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" "@echo Echo from Setup " >> .\setup.bat Get-Content .\setup.bat From bbff221cad28943b229fdc66e16f0b80981a2e3d Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 16:24:21 -0500 Subject: [PATCH 108/142] Escape pipe with echo and call Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 7443785876..d7527c2e26 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -36,7 +36,7 @@ jobs: if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - Set-Content .\setup.bat "echo "'y', 'y', 'N'" ^| call .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" + Set-Content .\setup.bat " @ECHO "'y', 'y', 'N'" ^| @CALL .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" "@echo Echo from Setup " >> .\setup.bat Get-Content .\setup.bat From 2c945df4da5ef1695d5538fe630164eb59c141ad Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 16:29:36 -0500 Subject: [PATCH 109/142] Escape pipe with echo and call Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index d7527c2e26..682c467c51 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -36,7 +36,7 @@ jobs: if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - Set-Content .\setup.bat " @ECHO "'y', 'y', 'N'" ^| @CALL .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" + Set-Content .\setup.bat " @ECHO yes | @CALL .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" "@echo Echo from Setup " >> .\setup.bat Get-Content .\setup.bat From 92d781219ae358fe1288dda2548788ce0088a005 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 16:34:05 -0500 Subject: [PATCH 110/142] Put echo afterwards Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 682c467c51..57b590425e 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -37,7 +37,7 @@ jobs: run: | New-Item .\setup.bat -type file Set-Content .\setup.bat " @ECHO yes | @CALL .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" - "@echo Echo from Setup " >> .\setup.bat + "@echo y y N" >> .\setup.bat Get-Content .\setup.bat - name: Run Opensearch with A Single Plugin From edf13b7df9c8ab7d173f79f88323ed22653afbb6 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 16:39:03 -0500 Subject: [PATCH 111/142] Confirm false Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 57b590425e..9d55bb03b1 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -36,8 +36,7 @@ jobs: if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - Set-Content .\setup.bat " @ECHO yes | @CALL .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" - "@echo y y N" >> .\setup.bat + Set-Content .\setup.bat "@CALL .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat -Confirm:$false" Get-Content .\setup.bat - name: Run Opensearch with A Single Plugin From 72bc2334816444f3c3bc2fa7b9abf6e5b87ccbfb Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 16:45:56 -0500 Subject: [PATCH 112/142] >> then start in pwsh Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 4 ++-- .github/workflows/plugin_install.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 85f6f26471..758c329264 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -86,8 +86,8 @@ runs: run: | echo "Running Windows Startup Script" cat setup.bat - ./setup.bat - shell: bash + start .\setup.bat + shell: pwsh # Run OpenSearch - name: Run OpenSearch with plugin on Linux diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 9d55bb03b1..0e8e17c497 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -36,7 +36,7 @@ jobs: if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - Set-Content .\setup.bat "@CALL .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat -Confirm:$false" + "'y', 'y', 'N' | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" >> .\setup.bat Get-Content .\setup.bat - name: Run Opensearch with A Single Plugin From f8076de699442b7d4019d40dedf482d75987aa07 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 16:55:03 -0500 Subject: [PATCH 113/142] invoke expression the setup bat Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 758c329264..8ba3ad4eb0 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -83,10 +83,7 @@ runs: - name: Run Setup Script for Windows if: ${{ runner.os == 'Windows' && inputs.setup-script != '' }} - run: | - echo "Running Windows Startup Script" - cat setup.bat - start .\setup.bat + run: Invoke-Expression -Command 'cmd.exe /C .\setup.bat' shell: pwsh # Run OpenSearch From eb19fc3d1347bad352911131ccec7baf5546433c Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 17:05:57 -0500 Subject: [PATCH 114/142] different echo format Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 2 +- .github/workflows/plugin_install.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 8ba3ad4eb0..c1c68324f2 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -83,7 +83,7 @@ runs: - name: Run Setup Script for Windows if: ${{ runner.os == 'Windows' && inputs.setup-script != '' }} - run: Invoke-Expression -Command 'cmd.exe /C .\setup.bat' + run: call .\setup.bat shell: pwsh # Run OpenSearch diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 0e8e17c497..1b802da812 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -36,7 +36,7 @@ jobs: if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - "'y', 'y', 'N' | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" >> .\setup.bat + "(echo y && echo echo y && echo N ) | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" >> .\setup.bat Get-Content .\setup.bat - name: Run Opensearch with A Single Plugin From bc748c831054834a0cabfb94322b3961ec4260a8 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 17:10:44 -0500 Subject: [PATCH 115/142] different echo format Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index c1c68324f2..f5019becc0 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -83,7 +83,7 @@ runs: - name: Run Setup Script for Windows if: ${{ runner.os == 'Windows' && inputs.setup-script != '' }} - run: call .\setup.bat + run: Call .\setup.bat shell: pwsh # Run OpenSearch From bbf892472d1465f94550351d450df15eea336dcc Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 17:16:41 -0500 Subject: [PATCH 116/142] Try not call for setup.bat Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index f5019becc0..c4752056bd 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -83,7 +83,7 @@ runs: - name: Run Setup Script for Windows if: ${{ runner.os == 'Windows' && inputs.setup-script != '' }} - run: Call .\setup.bat + run: .\setup.bat shell: pwsh # Run OpenSearch From 5c80f70efef9a7ea21d4434370b24086ba9a3dd3 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 17:25:13 -0500 Subject: [PATCH 117/142] Try not call for setup.bat Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 1b802da812..600127c396 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -36,7 +36,7 @@ jobs: if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - "(echo y && echo echo y && echo N ) | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" >> .\setup.bat + "powershell (echo y && echo echo y && echo N ) | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" >> .\setup.bat Get-Content .\setup.bat - name: Run Opensearch with A Single Plugin From ab63241b1956d567f54cef2c306d80b24cb88007 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Fri, 18 Nov 2022 17:31:27 -0500 Subject: [PATCH 118/142] Try cmd.exe Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 600127c396..25305c27cc 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -36,7 +36,7 @@ jobs: if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - "powershell (echo y && echo echo y && echo N ) | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat" >> .\setup.bat + "cmd.exe /c '(echo y && echo echo y && echo N ) | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat'" >> .\setup.bat Get-Content .\setup.bat - name: Run Opensearch with A Single Plugin From 04b2457de85bdfb8f879aff53acf9d3df202a3f4 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Mon, 21 Nov 2022 11:33:30 -0500 Subject: [PATCH 119/142] Try with specifying powershell Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 25305c27cc..a8a027a1f7 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -36,7 +36,7 @@ jobs: if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - "cmd.exe /c '(echo y && echo echo y && echo N ) | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat'" >> .\setup.bat + "powershell.exe -noexit -command "echo 'y' | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat'"" >> .\setup.bat Get-Content .\setup.bat - name: Run Opensearch with A Single Plugin From 4651ff4c1addf95e30a29d11d9cd00894b5f2cd0 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Mon, 21 Nov 2022 11:40:32 -0500 Subject: [PATCH 120/142] Try with specifying powershell and using set-content Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index a8a027a1f7..8ad8cba3cc 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -36,7 +36,7 @@ jobs: if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - "powershell.exe -noexit -command "echo 'y' | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat'"" >> .\setup.bat + Set-Content .\setup.bat -Value "powershell.exe -noexit -command `"echo 'y' | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat'`"" Get-Content .\setup.bat - name: Run Opensearch with A Single Plugin From e325a2dce8aee884f568e053ab0b49f3e93b141a Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Mon, 21 Nov 2022 11:44:47 -0500 Subject: [PATCH 121/142] Try with specifying powershell and using set-content Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 8ad8cba3cc..b850a88c83 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -36,7 +36,7 @@ jobs: if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - Set-Content .\setup.bat -Value "powershell.exe -noexit -command `"echo 'y' | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat'`"" + Set-Content .\setup.bat -Value "powershell.exe -noexit -command `"echo 'y' | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat`"" Get-Content .\setup.bat - name: Run Opensearch with A Single Plugin From 5e0467753e14eb8592da1d63e051c93b5f283073 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Mon, 21 Nov 2022 11:52:14 -0500 Subject: [PATCH 122/142] Test window and linux with setup script using jdk 11 and 17 Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index b850a88c83..667e730d44 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -7,8 +7,8 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-latest] - jdk: [17] + os: [ubuntu-latest, windows-latest] + jdk: [11, 17] runs-on: ${{ matrix.os }} steps: - name: Set up JDK From 73eed5a205441240e43293db5e24cc3d57895f98 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Mon, 21 Nov 2022 11:59:50 -0500 Subject: [PATCH 123/142] Re-enable other workflows Signed-off-by: Stephen Crawford --- .github/workflows/ci.yml | 2 +- .github/workflows/code-hygiene.yml | 2 +- .github/workflows/integration-tests.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 125328a9b5..3e7fc78987 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ name: CI -on: [] #push, pull_request +on: [push, pull_request] env: GRADLE_OPTS: -Dhttp.keepAlive=false diff --git a/.github/workflows/code-hygiene.yml b/.github/workflows/code-hygiene.yml index 53934662eb..f078cb2b56 100644 --- a/.github/workflows/code-hygiene.yml +++ b/.github/workflows/code-hygiene.yml @@ -1,6 +1,6 @@ name: Code Hygiene -on: [] #push, pull_request +on: [push, pull_request] jobs: linelint: diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 9b02b653cb..fff2f84650 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1,6 +1,6 @@ name: Bulk Integration Test -on: [] #workflow_dispatch +on: [workflow_dispatch] env: GRADLE_OPTS: -Dhttp.keepAlive=false From fa44b6c03131b02011da800ac5d5a79b1801c5c9 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Mon, 21 Nov 2022 14:00:30 -0500 Subject: [PATCH 124/142] Readd sanity test Signed-off-by: Stephen Crawford --- .../actions/start-opensearch-with-one-plugin/action.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index c4752056bd..23badb2ba9 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -62,8 +62,8 @@ runs: - name: Install Plugin into OpenSearch for Linux if: ${{ runner.os == 'Linux'}} run: | - chmod +x ./opensearch-3.0.0-SNAPSHOT/bin/opensearch-plugin - /bin/bash -c "yes | ./opensearch-3.0.0-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/opensearch-security.zip" + chmod +x ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin + /bin/bash -c "yes | ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/opensearch-security.zip" shell: bash - name: Install Plugin into OpenSearch for Windows @@ -118,3 +118,8 @@ runs: $Headers = @{ Authorization = $baseCredentials } Invoke-WebRequest -SkipCertificateCheck -Uri 'https://localhost:9200/_cat/plugins' -Headers $Headers; shell: pwsh + + - name: Run sanity tests + uses: gradle/gradle-build-action@v2 + with: + arguments: integTestRemote -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="opensearch" -Dhttps=true -Duser=admin -Dpassword=admin \ No newline at end of file From 741f9ca37b0da748a0703044c83bb619e6e7bae6 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Mon, 21 Nov 2022 14:56:08 -0500 Subject: [PATCH 125/142] Correct changes from merge conflicts Signed-off-by: Stephen Crawford --- .../action.yml | 2 +- .github/workflows/plugin_install.yml | 173 ++++++------------ 2 files changed, 54 insertions(+), 121 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 23badb2ba9..9c5a1d6ffb 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -1,4 +1,4 @@ -name: 'Start OpenSearch with One Plugin' +name: 'Launch OpenSearch with a single plugin installed' description: 'Downloads latest build of OpenSearch, installs a plugin, executes a script and then starts OpenSearch on localhost:9200' inputs: diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index c4752056bd..6dc773d2fb 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -1,120 +1,53 @@ -name: 'Start OpenSearch with One Plugin' -description: 'Downloads latest build of OpenSearch, installs a plugin, executes a script and then starts OpenSearch on localhost:9200' - -inputs: - opensearch-version: - description: 'The version of OpenSearch that should be used, e.g "3.0.0"' - required: true - - plugin-name: - description: 'The name of the plugin to use, such as opensearch-security' - required: true - - setup-script: - description: 'The file name for the configuration script for the plugin such as install_demo_configurations -- may not be needed for every plugin' - required: true - -runs: - using: "composite" - steps: - - # Configure longpath names if on Windows - - name: Enable Longpaths if on Windows - if: ${{ runner.os == 'Windows' }} - run: git config --system core.longpaths true - shell: pwsh - - # Download OpenSearch - - uses: peternied/download-file@v1 - if: ${{ runner.os == 'Windows' }} - with: - url: https://artifacts.opensearch.org/snapshots/core/opensearch/${{ inputs.opensearch-version }}-SNAPSHOT/opensearch-min-${{ inputs.opensearch-version }}-SNAPSHOT-windows-x64-latest.zip - - # Download OpenSearch - - uses: peternied/download-file@v1 - if: ${{ runner.os == 'Linux' }} - with: - url: https://artifacts.opensearch.org/snapshots/core/opensearch/${{ inputs.opensearch-version }}-SNAPSHOT/opensearch-min-${{ inputs.opensearch-version }}-SNAPSHOT-linux-x64-latest.tar.gz - - - # Extract downloaded zip - - name: Extract downloaded zip - if: ${{ runner.os == 'Linux' }} - run: | - tar -xzf opensearch-*.tar.gz - rm -f opensearch-*.tar.gz - shell: bash - - # Extract downloaded zip - - name: Extract downloaded zip - if: ${{ runner.os == 'Windows' }} - run: | - tar -xzf opensearch-min-${{ inputs.opensearch-version }}-SNAPSHOT-windows-x64-latest.zip - del opensearch-min-${{ inputs.opensearch-version }}-SNAPSHOT-windows-x64-latest.zip - shell: pwsh - - # Move and rename the plugin for installation - - name: Move and rename the plugin for installation - run: mv ./build/distributions/${{ inputs.plugin-name }}-*.zip ${{ inputs.plugin-name }}.zip - shell: bash - - # Install the plugin - - name: Install Plugin into OpenSearch for Linux - if: ${{ runner.os == 'Linux'}} - run: | - chmod +x ./opensearch-3.0.0-SNAPSHOT/bin/opensearch-plugin - /bin/bash -c "yes | ./opensearch-3.0.0-SNAPSHOT/bin/opensearch-plugin install file:$(pwd)/opensearch-security.zip" - shell: bash - - - name: Install Plugin into OpenSearch for Windows - if: ${{ runner.os == 'Windows'}} - run: | - 'y' | .\opensearch-${{ inputs.opensearch-version }}-SNAPSHOT\bin\opensearch-plugin.bat install file:$(pwd)\${{ inputs.plugin-name }}.zip - shell: pwsh - - # Run any configuration scripts - - name: Run Setup Script for Linux - if: ${{ runner.os == 'Linux' && inputs.setup-script != '' }} - run: | - echo "running linux setup" - chmod +x ./setup.sh - ./setup.sh - shell: bash - - - name: Run Setup Script for Windows - if: ${{ runner.os == 'Windows' && inputs.setup-script != '' }} - run: .\setup.bat - shell: pwsh - - # Run OpenSearch - - name: Run OpenSearch with plugin on Linux - if: ${{ runner.os == 'Linux'}} - run: /bin/bash -c "./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/bin/opensearch &" - shell: bash - - - name: Run OpenSearch with plugin on Windows - if: ${{ runner.os == 'Windows'}} - run: start .\opensearch-${{ inputs.opensearch-version }}-SNAPSHOT\bin\opensearch.bat - shell: pwsh - - # Give the OpenSearch process some time to boot up before sending any requires, might need to increase the default time! - - name: Sleep while OpenSearch starts - uses: peternied/action-sleep@v1 - with: - seconds: 30 - - # Verify that the server is operational - - name: Check OpenSearch Running on Linux - if: ${{ runner.os != 'Windows'}} - run: curl https://localhost:9200/_cat/plugins -u 'admin:admin' -k -v - shell: bash - - - name: Check OpenSearch Running on Windows - if: ${{ runner.os == 'Windows'}} - run: | - $credentialBytes = [Text.Encoding]::ASCII.GetBytes("admin:admin") - $encodedCredentials = [Convert]::ToBase64String($credentialBytes) - $baseCredentials = "Basic $encodedCredentials" - $Headers = @{ Authorization = $baseCredentials } - Invoke-WebRequest -SkipCertificateCheck -Uri 'https://localhost:9200/_cat/plugins' -Headers $Headers; - shell: pwsh +name: Plugin Install + +on: [push, pull_request, workflow_dispatch] + +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@v1 + with: + java-version: ${{ matrix.jdk }} + + - name: Checkout Branch + uses: actions/checkout@v2 + + - name: Assemble target plugin + uses: gradle/gradle-build-action@v2 + with: + arguments: assemble + + - name: Create Setup Script + if: ${{ runner.os == 'Linux' }} + run: | + cat > setup.sh <<'EOF' + chmod +x ./opensearch-3.0.0-SNAPSHOT/plugins/opensearch-security/tools/install_demo_configuration.sh + /bin/bash -c "yes | ./opensearch-3.0.0-SNAPSHOT/plugins/opensearch-security/tools/install_demo_configuration.sh" + EOF + + - name: Create Setup Script + if: ${{ runner.os == 'Windows' }} + run: | + New-Item .\setup.bat -type file + Set-Content .\setup.bat -Value "powershell.exe -noexit -command `"echo 'y' | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat`"" + Get-Content .\setup.bat + + - name: Run Opensearch with A Single Plugin + uses: ./.github/actions/start-opensearch-with-one-plugin + with: + opensearch-version: 3.0.0 + plugin-name: opensearch-security + setup-script: true + + - name: Run sanity tests + uses: gradle/gradle-build-action@v2 + with: + arguments: integTestRemote -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="opensearch" -Dhttps=true -Duser=admin -Dpassword=admin \ No newline at end of file From 4a5af6653277654303a7692a7cdcfd4757da6151 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Mon, 21 Nov 2022 14:58:19 -0500 Subject: [PATCH 126/142] Add missing new line Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 2 +- .github/workflows/plugin_install.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 9c5a1d6ffb..4186e86e52 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -122,4 +122,4 @@ runs: - name: Run sanity tests uses: gradle/gradle-build-action@v2 with: - arguments: integTestRemote -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="opensearch" -Dhttps=true -Duser=admin -Dpassword=admin \ No newline at end of file + arguments: integTestRemote -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="opensearch" -Dhttps=true -Duser=admin -Dpassword=admin diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 6dc773d2fb..e5554448bb 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -29,7 +29,7 @@ jobs: if: ${{ runner.os == 'Linux' }} run: | cat > setup.sh <<'EOF' - chmod +x ./opensearch-3.0.0-SNAPSHOT/plugins/opensearch-security/tools/install_demo_configuration.sh + chmod +x ./opensearch-3.0.0-SNAPSHOT/plugins/opensearch-security/tools/install_demo_configuration.sh /bin/bash -c "yes | ./opensearch-3.0.0-SNAPSHOT/plugins/opensearch-security/tools/install_demo_configuration.sh" EOF From d5ebffa197a46772f744700296885ab45fab96b7 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Mon, 21 Nov 2022 15:02:12 -0500 Subject: [PATCH 127/142] Add missing new line Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index e5554448bb..e3d8b86f68 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -50,4 +50,4 @@ jobs: - name: Run sanity tests uses: gradle/gradle-build-action@v2 with: - arguments: integTestRemote -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="opensearch" -Dhttps=true -Duser=admin -Dpassword=admin \ No newline at end of file + arguments: integTestRemote -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="opensearch" -Dhttps=true -Duser=admin -Dpassword=admin From 86b85e7b66e9d681b064201fb48626fcd9f72af6 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Mon, 21 Nov 2022 15:10:20 -0500 Subject: [PATCH 128/142] Use environment variables Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index e3d8b86f68..a6a7417acd 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -2,6 +2,10 @@ name: Plugin Install on: [push, pull_request, workflow_dispatch] +env: + OPENSEARCH_VERSION: 3.0.0 + PLUGIN_NAME: opensearch-security + jobs: plugin-install: strategy: @@ -29,22 +33,22 @@ jobs: if: ${{ runner.os == 'Linux' }} run: | cat > setup.sh <<'EOF' - chmod +x ./opensearch-3.0.0-SNAPSHOT/plugins/opensearch-security/tools/install_demo_configuration.sh - /bin/bash -c "yes | ./opensearch-3.0.0-SNAPSHOT/plugins/opensearch-security/tools/install_demo_configuration.sh" + chmod +x ./opensearch-$OPENSEARCH_VERSION-SNAPSHOT/plugins/$PLUGIN_NAME/tools/install_demo_configuration.sh + /bin/bash -c "yes | ./opensearch-$OPENSEARCH_VERSION-SNAPSHOT/plugins/$PLUGIN_NAME/tools/install_demo_configuration.sh" EOF - name: Create Setup Script if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - Set-Content .\setup.bat -Value "powershell.exe -noexit -command `"echo 'y' | .\opensearch-3.0.0-SNAPSHOT\plugins\opensearch-security\tools\install_demo_configuration.bat`"" + Set-Content .\setup.bat -Value "powershell.exe -noexit -command `"echo 'y' | .\opensearch-$OPENSEARCH_VERSION-SNAPSHOT\plugins\$PLUGIN_NAME\tools\install_demo_configuration.bat`"" Get-Content .\setup.bat - name: Run Opensearch with A Single Plugin uses: ./.github/actions/start-opensearch-with-one-plugin with: - opensearch-version: 3.0.0 - plugin-name: opensearch-security + opensearch-version: $OPENSEARCH_VERSION + plugin-name: $PLUGIN_NAME setup-script: true - name: Run sanity tests From 0301e1a5e1227cf4515567c94df82ed283fcfb85 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Mon, 21 Nov 2022 15:12:27 -0500 Subject: [PATCH 129/142] Use environment variables Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index a6a7417acd..5cbd4a2dda 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -47,8 +47,8 @@ jobs: - name: Run Opensearch with A Single Plugin uses: ./.github/actions/start-opensearch-with-one-plugin with: - opensearch-version: $OPENSEARCH_VERSION - plugin-name: $PLUGIN_NAME + opensearch-version: ${{ OPENSEARCH_VERSION }} + plugin-name: ${{ PLUGIN_NAME }} setup-script: true - name: Run sanity tests From e25d2d8a777b9f9d5a5079c3c86dbbe3a415c30f Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Mon, 21 Nov 2022 15:16:56 -0500 Subject: [PATCH 130/142] Retry env variable formatting and passing Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 5cbd4a2dda..25a6a25f6f 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -33,22 +33,22 @@ jobs: if: ${{ runner.os == 'Linux' }} run: | cat > setup.sh <<'EOF' - chmod +x ./opensearch-$OPENSEARCH_VERSION-SNAPSHOT/plugins/$PLUGIN_NAME/tools/install_demo_configuration.sh - /bin/bash -c "yes | ./opensearch-$OPENSEARCH_VERSION-SNAPSHOT/plugins/$PLUGIN_NAME/tools/install_demo_configuration.sh" + 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 - Set-Content .\setup.bat -Value "powershell.exe -noexit -command `"echo 'y' | .\opensearch-$OPENSEARCH_VERSION-SNAPSHOT\plugins\$PLUGIN_NAME\tools\install_demo_configuration.bat`"" + Set-Content .\setup.bat -Value "powershell.exe -noexit -command `"echo 'y' | .\opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT\plugins\${{ env.PLUGIN_NAME }}\tools\install_demo_configuration.bat`"" Get-Content .\setup.bat - name: Run Opensearch with A Single Plugin uses: ./.github/actions/start-opensearch-with-one-plugin with: - opensearch-version: ${{ OPENSEARCH_VERSION }} - plugin-name: ${{ PLUGIN_NAME }} + opensearch-version: ${{ env.OPENSEARCH_VERSION }} + plugin-name: ${{ env.PLUGIN_NAME }} setup-script: true - name: Run sanity tests From 37d8c14641411baca9cb90aaac897ef3bf6767ca Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Tue, 22 Nov 2022 09:52:33 -0500 Subject: [PATCH 131/142] Fixed description for setup-script Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 4186e86e52..5960592b3b 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -11,7 +11,7 @@ inputs: required: true setup-script: - description: 'The file name for the configuration script for the plugin such as install_demo_configurations -- may not be needed for every plugin' + description: 'An input indicating whether a setup script should be run for the plugin. Leave empty to indicate one should not be run.' required: true runs: From 73aa65d8775d80a9db5d9c2c1e15440157b00d30 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Tue, 22 Nov 2022 09:55:19 -0500 Subject: [PATCH 132/142] Fixed description for setup-script and rename job steps Signed-off-by: Stephen Crawford --- .../start-opensearch-with-one-plugin/action.yml | 12 ++++++------ .github/workflows/integration-tests.yml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 5960592b3b..05e859b3f4 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -25,27 +25,27 @@ runs: shell: pwsh # Download OpenSearch - - uses: peternied/download-file@v1 + - name: Download OpenSearch for Windows + uses: peternied/download-file@v1 if: ${{ runner.os == 'Windows' }} with: url: https://artifacts.opensearch.org/snapshots/core/opensearch/${{ inputs.opensearch-version }}-SNAPSHOT/opensearch-min-${{ inputs.opensearch-version }}-SNAPSHOT-windows-x64-latest.zip - # Download OpenSearch - - uses: peternied/download-file@v1 + + - name: Download OpenSearch for Linux + uses: peternied/download-file@v1 if: ${{ runner.os == 'Linux' }} with: url: https://artifacts.opensearch.org/snapshots/core/opensearch/${{ inputs.opensearch-version }}-SNAPSHOT/opensearch-min-${{ inputs.opensearch-version }}-SNAPSHOT-linux-x64-latest.tar.gz - # Extract downloaded zip - - name: Extract downloaded zip + - name: Extract downloaded tar if: ${{ runner.os == 'Linux' }} run: | tar -xzf opensearch-*.tar.gz rm -f opensearch-*.tar.gz shell: bash - # Extract downloaded zip - name: Extract downloaded zip if: ${{ runner.os == 'Windows' }} run: | diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index fff2f84650..b609ad7293 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1,6 +1,6 @@ name: Bulk Integration Test -on: [workflow_dispatch] +on: [ workflow_dispatch ] env: GRADLE_OPTS: -Dhttp.keepAlive=false From c30d2befc9295e0f71b51e61abf67c9b8ff029b6 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Wed, 23 Nov 2022 15:25:52 -0500 Subject: [PATCH 133/142] Swapped to not required Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 05e859b3f4..760062a699 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -12,7 +12,7 @@ inputs: setup-script: description: 'An input indicating whether a setup script should be run for the plugin. Leave empty to indicate one should not be run.' - required: true + required: false runs: using: "composite" From e287b17fcf5a0508bb20a95d4b122249f6db2eff Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Mon, 28 Nov 2022 10:42:42 -0500 Subject: [PATCH 134/142] Swap setup parameter to script name Signed-off-by: Stephen Crawford --- .../actions/start-opensearch-with-one-plugin/action.yml | 8 ++++---- .github/workflows/plugin_install.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 760062a699..0e6253a5ab 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -11,7 +11,7 @@ inputs: required: true setup-script: - description: 'An input indicating whether a setup script should be run for the plugin. Leave empty to indicate one should not be run.' + description: 'The name of the setup script you want to run i.e. "setup" (do not include file extension). Leave empty to indicate one should not be run.' required: false runs: @@ -77,13 +77,13 @@ runs: if: ${{ runner.os == 'Linux' && inputs.setup-script != '' }} run: | echo "running linux setup" - chmod +x ./setup.sh - ./setup.sh + chmod +x ./${{ inputs.setup-script }} + ./${{ inputs.setup-script }}.sh shell: bash - name: Run Setup Script for Windows if: ${{ runner.os == 'Windows' && inputs.setup-script != '' }} - run: .\setup.bat + run: .\${{ inputs.setup-script }}.bat shell: pwsh # Run OpenSearch diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 25a6a25f6f..037633b435 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -49,7 +49,7 @@ jobs: with: opensearch-version: ${{ env.OPENSEARCH_VERSION }} plugin-name: ${{ env.PLUGIN_NAME }} - setup-script: true + setup-script: setup - name: Run sanity tests uses: gradle/gradle-build-action@v2 From 94fad5bc31729572431d5ce8adf0c741ef4c3b9d Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Mon, 28 Nov 2022 10:48:27 -0500 Subject: [PATCH 135/142] Add .sh file extension Signed-off-by: Stephen Crawford --- .github/actions/start-opensearch-with-one-plugin/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 0e6253a5ab..669e11fc7a 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -10,7 +10,7 @@ inputs: description: 'The name of the plugin to use, such as opensearch-security' required: true - setup-script: + setup-script-name: description: 'The name of the setup script you want to run i.e. "setup" (do not include file extension). Leave empty to indicate one should not be run.' required: false @@ -77,7 +77,7 @@ runs: if: ${{ runner.os == 'Linux' && inputs.setup-script != '' }} run: | echo "running linux setup" - chmod +x ./${{ inputs.setup-script }} + chmod +x ./${{ inputs.setup-script }}.sh ./${{ inputs.setup-script }}.sh shell: bash From c9f3587bc62194f7a30e0170998b85ce0d4b1a9c Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Mon, 28 Nov 2022 11:37:20 -0500 Subject: [PATCH 136/142] Try /c Signed-off-by: Stephen Crawford --- .github/workflows/ci.yml | 2 +- .github/workflows/code-hygiene.yml | 2 +- .github/workflows/integration-tests.yml | 2 +- .github/workflows/plugin_install.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b4319f1c1..579b58cf84 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ name: CI -on: [push, pull_request] +on: [] # push, pull_request env: GRADLE_OPTS: -Dhttp.keepAlive=false diff --git a/.github/workflows/code-hygiene.yml b/.github/workflows/code-hygiene.yml index f078cb2b56..53934662eb 100644 --- a/.github/workflows/code-hygiene.yml +++ b/.github/workflows/code-hygiene.yml @@ -1,6 +1,6 @@ name: Code Hygiene -on: [push, pull_request] +on: [] #push, pull_request jobs: linelint: diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index b609ad7293..370d96a789 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1,6 +1,6 @@ name: Bulk Integration Test -on: [ workflow_dispatch ] +on: [ ] #workflow_dispatch env: GRADLE_OPTS: -Dhttp.keepAlive=false diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 037633b435..d44ddf02d1 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -41,7 +41,7 @@ jobs: if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - Set-Content .\setup.bat -Value "powershell.exe -noexit -command `"echo 'y' | .\opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT\plugins\${{ env.PLUGIN_NAME }}\tools\install_demo_configuration.bat`"" + Set-Content .\setup.bat -Value "/c powershell.exe -noexit -command `"echo 'y' | .\opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT\plugins\${{ env.PLUGIN_NAME }}\tools\install_demo_configuration.bat`"" Get-Content .\setup.bat - name: Run Opensearch with A Single Plugin From 7b814b4f394306d055a3fe45398c2f400f6c2895 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Mon, 28 Nov 2022 11:41:27 -0500 Subject: [PATCH 137/142] Retry without /c Signed-off-by: Stephen Crawford --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index d44ddf02d1..037633b435 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -41,7 +41,7 @@ jobs: if: ${{ runner.os == 'Windows' }} run: | New-Item .\setup.bat -type file - Set-Content .\setup.bat -Value "/c powershell.exe -noexit -command `"echo 'y' | .\opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT\plugins\${{ env.PLUGIN_NAME }}\tools\install_demo_configuration.bat`"" + Set-Content .\setup.bat -Value "powershell.exe -noexit -command `"echo 'y' | .\opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT\plugins\${{ env.PLUGIN_NAME }}\tools\install_demo_configuration.bat`"" Get-Content .\setup.bat - name: Run Opensearch with A Single Plugin From 13dfcfcb6ef1990b29eaef5a335ab153f898b71c Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Mon, 28 Nov 2022 11:47:04 -0500 Subject: [PATCH 138/142] Readd CI Signed-off-by: Stephen Crawford --- .github/workflows/ci.yml | 2 +- .github/workflows/code-hygiene.yml | 2 +- .github/workflows/integration-tests.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 579b58cf84..7b4319f1c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ name: CI -on: [] # push, pull_request +on: [push, pull_request] env: GRADLE_OPTS: -Dhttp.keepAlive=false diff --git a/.github/workflows/code-hygiene.yml b/.github/workflows/code-hygiene.yml index 53934662eb..f078cb2b56 100644 --- a/.github/workflows/code-hygiene.yml +++ b/.github/workflows/code-hygiene.yml @@ -1,6 +1,6 @@ name: Code Hygiene -on: [] #push, pull_request +on: [push, pull_request] jobs: linelint: diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 370d96a789..b609ad7293 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1,6 +1,6 @@ name: Bulk Integration Test -on: [ ] #workflow_dispatch +on: [ workflow_dispatch ] env: GRADLE_OPTS: -Dhttp.keepAlive=false From 396e087b8b7dda4fa6ed01391bc0fe6a17d29b12 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Mon, 28 Nov 2022 11:51:14 -0500 Subject: [PATCH 139/142] Retry flaky test Signed-off-by: Stephen Crawford --- .github/workflows/integration-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index b609ad7293..fff2f84650 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1,6 +1,6 @@ name: Bulk Integration Test -on: [ workflow_dispatch ] +on: [workflow_dispatch] env: GRADLE_OPTS: -Dhttp.keepAlive=false From 2487fe3a27c4233fc037b5ba54e586bdcac1568d Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Mon, 28 Nov 2022 11:55:30 -0500 Subject: [PATCH 140/142] Retry flaky test Signed-off-by: Stephen Crawford --- .github/workflows/integration-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index fff2f84650..b609ad7293 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1,6 +1,6 @@ name: Bulk Integration Test -on: [workflow_dispatch] +on: [ workflow_dispatch ] env: GRADLE_OPTS: -Dhttp.keepAlive=false From 0be4a79611b6524b4a1211128e8a68baef3bd062 Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Mon, 28 Nov 2022 12:01:20 -0500 Subject: [PATCH 141/142] Retry flaky test Signed-off-by: Stephen Crawford --- .github/workflows/integration-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index b609ad7293..fff2f84650 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1,6 +1,6 @@ name: Bulk Integration Test -on: [ workflow_dispatch ] +on: [workflow_dispatch] env: GRADLE_OPTS: -Dhttp.keepAlive=false From 962677d66c4ea6280d5d441e710e4fa1fe0f888d Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Mon, 28 Nov 2022 13:07:07 -0500 Subject: [PATCH 142/142] Rename fields Signed-off-by: Stephen Crawford --- .../start-opensearch-with-one-plugin/action.yml | 10 +++++----- .github/workflows/plugin_install.yml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/actions/start-opensearch-with-one-plugin/action.yml b/.github/actions/start-opensearch-with-one-plugin/action.yml index 669e11fc7a..fd838a6cbf 100644 --- a/.github/actions/start-opensearch-with-one-plugin/action.yml +++ b/.github/actions/start-opensearch-with-one-plugin/action.yml @@ -74,16 +74,16 @@ runs: # Run any configuration scripts - name: Run Setup Script for Linux - if: ${{ runner.os == 'Linux' && inputs.setup-script != '' }} + if: ${{ runner.os == 'Linux' && inputs.setup-script-name != '' }} run: | echo "running linux setup" - chmod +x ./${{ inputs.setup-script }}.sh - ./${{ inputs.setup-script }}.sh + chmod +x ./${{ inputs.setup-script-name }}.sh + ./${{ inputs.setup-script-name }}.sh shell: bash - name: Run Setup Script for Windows - if: ${{ runner.os == 'Windows' && inputs.setup-script != '' }} - run: .\${{ inputs.setup-script }}.bat + if: ${{ runner.os == 'Windows' && inputs.setup-script-name != '' }} + run: .\${{ inputs.setup-script-name }}.bat shell: pwsh # Run OpenSearch diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 037633b435..6df8fa3728 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -49,7 +49,7 @@ jobs: with: opensearch-version: ${{ env.OPENSEARCH_VERSION }} plugin-name: ${{ env.PLUGIN_NAME }} - setup-script: setup + setup-script-name: setup - name: Run sanity tests uses: gradle/gradle-build-action@v2