-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Derek Ho <[email protected]>
- Loading branch information
Showing
3 changed files
with
107 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
test-no-plugins: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: [windows-latest, ubuntu-latest] | ||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: ./ # Use the action | ||
with: | ||
opensearch-version: 3.0.0 | ||
security-enabled: false | ||
|
||
- name: Checks that OpenSearch is healthy | ||
run: curl http://localhost:9200/_cat/plugins -v | ||
shell: bash | ||
|
||
test-with-security: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: [windows-latest, ubuntu-latest] | ||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Download security plugin | ||
uses: suisei-cn/[email protected] | ||
with: | ||
url: https://aws.oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.opensearch.plugin&a=opensearch-security&v=3.0.0.0-SNAPSHOT&p=zip | ||
target: plugin-artifacts/ | ||
filename: security.zip | ||
|
||
- uses: ./ # Use the action | ||
with: | ||
opensearch-version: 3.0.0 | ||
security-enabled: true | ||
plugins: "file:${{ github.workspace }}/security.zip" | ||
admin-password: "myStrongPassword123!" | ||
|
||
- name: Checks that OpenSearch is healthy | ||
run: curl https://localhost:9200/_cat/plugins -u 'admin:myStrongPassword123!' -k -v | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,43 @@ | ||
# start-opensearch | ||
Github action to start an OpenSearch instance | ||
|
||
```yaml | ||
inputs: | ||
opensearch-version: | ||
description: 'The version of OpenSearch that should be used, e.g "3.0.0"' | ||
required: true | ||
|
||
plugins: | ||
description: 'A comma separated list of plugins to install. Leave empty to not install any. Each entry should be a full path prefixed with `file: `, for example: `file:$(pwd)/my-plugin.zip`' | ||
required: false | ||
|
||
security-enabled: | ||
description: 'Whether security is enabled' | ||
required: true | ||
|
||
admin-password: | ||
description: 'The admin password uses for the cluster' | ||
required: false | ||
|
||
security_config_file: | ||
description: 'Path to a security config file to replace the default. Leave empty if security is not enabled or using the default config' | ||
required: false | ||
``` | ||
## Usage: | ||
```yaml | ||
steps: | ||
- name: Run Opensearch with A Single Plugin | ||
uses: derek-ho/start-opensearch@v1 | ||
with: | ||
opensearch-version: ${{ env.OPENSEARCH_VERSION }} | ||
plugins: "file:${{ github.workspace }}/${{ env.PLUGIN_NAME }}.zip" | ||
security-enabled: true | ||
admin-password: ${{ steps.random-password.outputs.generated_name }} | ||
``` | ||
# Changelog | ||
## v1 | ||
- Initial Release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters