Skip to content

Commit

Permalink
Fix running Alerting security tests in GitHub Actions (opensearch-pro…
Browse files Browse the repository at this point in the history
…ject#252)

* Remove appending candidate_version to OpenSearch docker tag

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>

* Split tests into separate workflows

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>

* Fix syntax error in test-workflow

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>
  • Loading branch information
qreshi authored and lezzago committed Mar 9, 2022
1 parent d6ef50c commit cccbe4d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/security-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,20 @@ jobs:
echo "RUN if [ -d /usr/share/opensearch/plugins/opensearch-alerting ]; then /usr/share/opensearch/bin/opensearch-plugin remove opensearch-alerting; fi" >> Dockerfile
echo "ADD alerting/build/distributions/opensearch-alerting-$plugin_version-$candidate_version.zip /tmp/" >> Dockerfile
echo "RUN /usr/share/opensearch/bin/opensearch-plugin install --batch file:/tmp/opensearch-alerting-$plugin_version-$candidate_version.zip" >> Dockerfile
docker build -t opensearch-alerting:test .
echo "imagePresent=true" >> $GITHUB_ENV
else
echo "imagePresent=false" >> $GITHUB_ENV
fi
- name: Run Docker Image
if: env.imagePresent == 'true'
run: |
cd ..
docker run -p 9200:9200 -d -p 9600:9600 -e "discovery.type=single-node" opensearch-alerting:test
sleep 120
- name: Run Alerting Test for security enabled test cases
if: env.imagePresent == 'true'
run: |
Expand Down

0 comments on commit cccbe4d

Please sign in to comment.