-
Notifications
You must be signed in to change notification settings - Fork 71
61 lines (53 loc) · 2.12 KB
/
Copy pathverify-binary-installation.yml
File metadata and controls
61 lines (53 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: 'Install Dashboards with Plugin via Binary'
on: [push, pull_request]
env:
OPENSEARCH_VERSION: '3.1.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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up JDK
uses: actions/setup-java@91d3aa4956ec4a53e477c4907347b5e3481be8c9 # v2
with:
distribution: temurin # Temurin is a distribution of adoptium
java-version: 21
- 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@e9060d3df24b30cdbfac62d749fec3367dade572 # v6
with:
opensearch-version: ${{ env.OPENSEARCH_VERSION }}
security-enabled: false
jdk-version: 21
- name: Run Dashboard
id: setup-dashboards
uses: derek-ho/setup-opensearch-dashboards@f64b331c58fe5b0a6533e76da1b46cb9d11bcaef # v1
with:
plugin_name: security-analytics-dashboards-plugin
built_plugin_name: security-analytics-dashboards
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