-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow to verify binary installation (#347)
* Add workflow to verify binary installation Signed-off-by: Derek Ho <[email protected]> * Fix name Signed-off-by: Derek Ho <[email protected]> --------- Signed-off-by: Derek Ho <[email protected]> (cherry picked from commit 7264cf7) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
fc2fa72
commit acfbe63
Showing
1 changed file
with
56 additions
and
0 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,56 @@ | ||
name: 'Install Dashboards with Plugin via Binary' | ||
|
||
on: [push, pull_request] | ||
env: | ||
OPENSEARCH_VERSION: '3.0.0' | ||
CI: 1 | ||
# avoid warnings like "tput: No value for $TERM and no -T specified" | ||
TERM: xterm | ||
|
||
jobs: | ||
verify-binary-installation: | ||
name: Run binary installation | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
# TODO: add windows support when OSD core is stable on windows | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout Branch | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set env | ||
run: | | ||
opensearch_version=$(node -p "require('./opensearch_dashboards.json').opensearchDashboardsVersion") | ||
plugin_version=$(node -p "require('./opensearch_dashboards.json').version") | ||
echo "OPENSEARCH_VERSION=$opensearch_version" >> $GITHUB_ENV | ||
echo "PLUGIN_VERSION=$plugin_version" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
- name: Run Opensearch | ||
uses: derek-ho/start-opensearch@v2 | ||
with: | ||
opensearch-version: ${{ env.OPENSEARCH_VERSION }} | ||
security-enabled: false | ||
|
||
- name: Run Dashboard | ||
id: setup-dashboards | ||
uses: derek-ho/setup-opensearch-dashboards@v2 | ||
with: | ||
plugin_name: dashboards-visualizations | ||
built_plugin_name: ganttChartDashboards | ||
built_plugin_suffix: ${{ env.OPENSEARCH_VERSION }} | ||
install_zip: true | ||
|
||
- name: Start the binary | ||
run: | | ||
nohup ./bin/opensearch-dashboards & | ||
working-directory: ${{ steps.setup-dashboards.outputs.dashboards-binary-directory }} | ||
shell: bash | ||
|
||
- name: Health check | ||
run: | | ||
timeout 300 bash -c 'while [[ "$(curl http://localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done' | ||
shell: bash | ||
|