-
Notifications
You must be signed in to change notification settings - Fork 378
Add CI check for demo script #1690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
peternied
merged 5 commits into
opensearch-project:main
from
peternied:demo-script-test
Mar 23, 2022
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
32735f3
Add CI check for demo script
peternied 46214f1
Moving to OpenSearch 1.4.0 that does not have the jar conflict
peternied 5c41c9d
Remove unneeded configuration entry
peternied b7445bc
Switch to wildcard instead of version number
peternied 7582c8d
Move default opensearch version forward
peternied File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,70 @@ | ||
| name: Plugin Install | ||
|
|
||
| on: [push, pull_request, workflow_dispatch] | ||
|
|
||
| env: | ||
| OPENSEARCH_VERSION: "1.4.0" | ||
|
|
||
| jobs: | ||
| plugin_install: | ||
| name: Plugin Install | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: true | ||
| matrix: | ||
| jdk: [8, 11, 14] | ||
|
|
||
| steps: | ||
| - name: Set up JDK | ||
| uses: actions/setup-java@v1 | ||
| with: | ||
| java-version: ${{ matrix.jdk }} | ||
|
|
||
| - name: Checkout security | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Build | ||
| run: ./gradlew clean assemble -Dbuild.snapshot=false | ||
|
|
||
| - name: Download OpenSearch Core | ||
| run: | | ||
| wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${{env.OPENSEARCH_VERSION}}/latest/linux/x64/builds/opensearch/dist/opensearch-min-${{env.OPENSEARCH_VERSION}}-linux-x64.tar.gz | ||
| tar -xzf opensearch-*.tar.gz | ||
| rm -f opensearch-*.tar.gz | ||
|
|
||
| - name: Move and rename security plugin for installation | ||
| run: mv build/distributions/opensearch-security-*.0.zip opensearch-security.zip | ||
|
|
||
| - name: Run OpenSearch with plugin | ||
| run: | | ||
| cat > os-ep.sh <<EOF | ||
|
peternied marked this conversation as resolved.
|
||
| yes | opensearch-plugin install file:///docker-host/security-plugin.zip | ||
| chmod +x plugins/opensearch-security/tools/install_demo_configuration.sh | ||
| yes | plugins/opensearch-security/tools/install_demo_configuration.sh | ||
| chown 1001:1001 -R /opensearch | ||
| su -c "/opensearch/bin/opensearch" -s /bin/bash opensearch | ||
| EOF | ||
| docker build -t opensearch-test:latest -f- . <<EOF | ||
| FROM ubuntu:latest | ||
| COPY --chown=1001:1001 os-ep.sh /docker-host/ | ||
| COPY --chown=1001:1001 opensearch-security.zip /docker-host/security-plugin.zip | ||
| COPY --chown=1001:1001 opensearch* /opensearch/ | ||
| RUN chmod +x /docker-host/os-ep.sh | ||
| RUN useradd -u 1001 -s /sbin/nologin opensearch | ||
| ENV PATH="/opensearch/bin:${PATH}" | ||
| WORKDIR /opensearch/ | ||
| ENTRYPOINT /docker-host/os-ep.sh | ||
| EOF | ||
| docker run --name ops -d -p 9200:9200 -p 9600:9600 -i opensearch-test:latest | ||
|
|
||
| - name: Sleep while OpenSearch finishes starting up | ||
| uses: whatnick/wait-action@v0.1.2 | ||
| with: | ||
| time: '30s' | ||
|
|
||
| - name: Check OpenSearch Running | ||
| run: curl -XGET https://localhost:9200 -u 'admin:admin' -k -v | ||
|
|
||
| - name: Get Docker Logs | ||
|
peternied marked this conversation as resolved.
|
||
| if: always() | ||
| run: docker logs ops | ||
|
peternied marked this conversation as resolved.
|
||
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.