forked from opensearch-project/security
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (61 loc) · 2.72 KB
/
Copy pathplugin_install.yml
File metadata and controls
74 lines (61 loc) · 2.72 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
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Plugin Install
on: [push, pull_request, workflow_dispatch]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env:
OPENSEARCH_VERSION: 3.8.0
PLUGIN_NAME: opensearch-security
jobs:
plugin-install:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
jdk: [21, 25]
runs-on: ${{ matrix.os }}
steps:
- name: Generate Strong Password
id: generate-password
uses: DarshitChanpura/secure-password-action@70c04529b3705c2f0f5fb81d26b29d11ce120d18 # v1.0.0
- name: Set up JDK
uses: actions/setup-java@0f481fcb613427c0f801b606911222b5b6f3083a # v5
with:
distribution: temurin # Temurin is a distribution of adoptium
java-version: ${{ matrix.jdk }}
- name: Checkout Branch
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
- name: Setup Gradle
uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
with:
cache-disabled: true
- name: Assemble target plugin
run: ./gradlew assemble
shell: bash
# Move and rename the plugin for installation
- name: Move and rename the plugin for installation
run: mv ./build/distributions/${{ env.PLUGIN_NAME }}-*.zip ${{ env.PLUGIN_NAME }}.zip
shell: bash
- name: Run Opensearch with A Single Plugin
uses: opensearch-project/opensearch-build/.github/actions/start-opensearch@58029ed0db12929e8e920eb875925335583f9490
if: ${{ runner.os != 'Windows' }}
with:
opensearch-version: ${{ env.OPENSEARCH_VERSION }}
plugins: "file:$(pwd)/${{ env.PLUGIN_NAME }}.zip"
security-enabled: true
admin-password: ${{ steps.generate-password.outputs.password }}
jdk-version: 21
- name: Run Opensearch with A Single Plugin
uses: opensearch-project/opensearch-build/.github/actions/start-opensearch@58029ed0db12929e8e920eb875925335583f9490
if: ${{ runner.os == 'Windows' }}
with:
opensearch-version: ${{ env.OPENSEARCH_VERSION }}
plugins: "file:///$((Get-Location).Path -replace '\\\\','/')/${{ env.PLUGIN_NAME }}.zip"
security-enabled: true
admin-password: ${{ steps.generate-password.outputs.password }}
jdk-version: 21
- name: Run sanity tests
run: ./gradlew integTestRemote -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="opensearch" -Dhttps=true -Duser=admin "-Dpassword=${SECURITY_PASSWORD}" -i
shell: bash
env:
SECURITY_PASSWORD: ${{ steps.generate-password.outputs.password }}