-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Universal Command-line only Plugin Installation Action & Workflow #2271
Changes from all commits
949a635
e92d0cd
30c8adb
705f9d9
282a500
8e6fdc6
858068c
c477372
710a8a2
aa59db2
15c4005
3258eb9
b531417
a6b8113
3f8e05a
24e967d
85d7d35
a8b9fbd
0faf6e9
3d0a1fa
0f14071
cb6bf84
9bf4fb2
2ec2a27
8044b7f
9d62afe
e8ef729
cf8a512
1b23eb7
562d45b
5c34160
e9971bd
f0d8cbd
fa6cc22
7e29565
6b45e15
bc6960c
0c38049
3e97659
99cb135
fa406a2
b2cf121
bb7f5f3
c1a3977
6a7dd18
2b09732
f1aabcb
83e81dc
3d2c12e
7ff3310
a17cc0a
fe030ba
c8146a6
2d35d95
ff5ff60
b3d3f57
c330eb6
51eac85
e8b18ee
49a27b2
0639752
62d62bd
03fb2de
771c205
639f217
009bcf7
318e6c6
cc6e627
39dac1a
73437ca
457a7be
32ec5c0
2828bf8
99d5df1
f31f9d1
d2cb0df
f773d4e
399c012
6ab899d
6698382
5ed4e99
a2b5940
812ac69
caa4784
e7be66c
39b6eb2
d8f70e3
9daa340
1f429a5
eaed816
fb31b63
7e69404
54e1839
05a01ef
0f5f910
5a3835f
860e4ef
865d6c2
5c61919
327ed3e
7bfe168
6f8af46
0d0ae7d
f734caf
2a3ae75
1cff85a
6943562
bbff221
2c945df
92d7812
edf13b7
72bc233
f8076de
eb19fc3
bc748c8
bbf8924
5c80f70
ab63241
04b2457
4651ff4
e325a2d
5e04677
73eed5a
57a6ae4
fa44b6c
741f9ca
4a5af66
d5ebffa
86b85e7
0301e1a
e25d2d8
37d8c14
73aa65d
c30d2be
e287b17
94fad5b
c9f3587
7b814b4
13dfcfc
396e087
2487fe3
0be4a79
962677d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,14 +2,19 @@ name: Plugin Install | |
|
||
on: [push, pull_request, workflow_dispatch] | ||
|
||
env: | ||
OPENSEARCH_VERSION: 3.0.0 | ||
PLUGIN_NAME: opensearch-security | ||
|
||
jobs: | ||
plugin-install: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows-latest, ubuntu-latest] | ||
os: [ubuntu-latest, windows-latest] | ||
jdk: [11, 17] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Set up JDK | ||
uses: actions/setup-java@v1 | ||
|
@@ -20,15 +25,31 @@ jobs: | |
uses: actions/checkout@v2 | ||
|
||
- name: Assemble target plugin | ||
run: ./gradlew assemble | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: assemble | ||
|
||
- name: Create Setup Script | ||
if: ${{ runner.os == 'Linux' }} | ||
run: | | ||
cat > setup.sh <<'EOF' | ||
chmod +x ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/plugins/${{ env.PLUGIN_NAME }}/tools/install_demo_configuration.sh | ||
/bin/bash -c "yes | ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/plugins/${{ env.PLUGIN_NAME }}/tools/install_demo_configuration.sh" | ||
EOF | ||
|
||
- name: Create Setup Script | ||
if: ${{ runner.os == 'Windows' }} | ||
run: | | ||
New-Item .\setup.bat -type file | ||
Set-Content .\setup.bat -Value "powershell.exe -noexit -command `"echo 'y' | .\opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT\plugins\${{ env.PLUGIN_NAME }}\tools\install_demo_configuration.bat`"" | ||
Get-Content .\setup.bat | ||
|
||
- name: Run Opensearch with A Single Plugin | ||
uses: ./.github/actions/start-opensearch-with-one-plugin | ||
with: | ||
opensearch-version: 3.0.0 | ||
plugin-name: opensearch-security | ||
plugin-start-script: install_demo_configuration | ||
docker-host-plugin-zip: security-plugin.zip | ||
opensearch-version: ${{ env.OPENSEARCH_VERSION }} | ||
plugin-name: ${{ env.PLUGIN_NAME }} | ||
setup-script-name: setup | ||
|
||
- name: Run sanity tests | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why did we remove the sanity test step? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So I realized that during the conflict resolution it messed up some of the files so I think that is why things looked so weird to you before. I readded this and fixed the copying over of the action to the workflow. |
||
uses: gradle/gradle-build-action@v2 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This command is set to run in background here with
&
. Any specific reason why background and not normally?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because you want it to be a background so that it is able run detached outside of docker.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okie...in my understanding... everything runs outside docker now..so I'm still not sure how this would help (not saying it shouldn't be as it is)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically, the process fails if you do not detach the call. So by making it a background process everything works because then you can have it operate in the background and then go make a curl to it. Otherwise you cannot/would need to open a new terminal during the execution to curl to it. This is my understanding at least--it fails without the & so I added it at Craig's suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DarshitChanpura This call is blocking if it is not detached and the rest of the action does not execute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@scrawfor99 So is there any difference between running it in this way and running it with
docker run
?