Skip to content

Commit

Permalink
Account for EOF requirement
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Crawford <steecraw@amazon.com>
  • Loading branch information
stephen-crawford committed Nov 14, 2022
1 parent 008149f commit e06fc10
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/actions/start-opensearch-with-one-plugin/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,25 +61,30 @@ runs:

# Install the plugin, runs its start-script, and start the OpenSearch server
- name: Install Plugin into OpenSearch for Linux
if: ${{ runner.os == 'Linux'}}
if: ${{ runner.os == 'Linux'}} && ${{ !inputs.plugin-install-script }}
run: |
cat > os-ep.sh <<EOF
yes | opensearch-plugin install file:///docker-host/${{ inputs.docker-host-plugin-zip }}.zip
chown 1001:1001 -R /opensearch
su -c "/opensearch/bin/opensearch" -s /bin/bash opensearch
EOF
shell: bash

- name: Run Install Script in Provided for Linux
if: ${{ inputs.plugin-install-script }} && ${{ runner.os == 'Linux' }}
run: |
cat > os-ep.sh <<EOF
yes | opensearch-plugin install file:///docker-host/${{ inputs.docker-host-plugin-zip }}.zip
chmod +x plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-demo-script }}.sh
yes | plugins/${{ inputs.plugin-name }}/tools/${{ inputs.plugin-demo-script }}.sh
chown 1001:1001 -R /opensearch
su -c "/opensearch/bin/opensearch" -s /bin/bash opensearch
EOF
shell: bash

- name: Finish Linux Install
if: ${{ runner.os == 'Linux' }}
run: |
chown 1001:1001 -R /opensearch
su -c "/opensearch/bin/opensearch" -s /bin/bash opensearch
EOF
docker build -t opensearch-test -f- . <<EOF
FROM ubuntu:latest
COPY --chown=1001:1001 os-ep.sh /docker-host/
Expand Down

0 comments on commit e06fc10

Please sign in to comment.