Skip to content

Commit 4fdfa66

Browse files
Fix CI workflow
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
1 parent 308e562 commit 4fdfa66

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

.github/workflows/ci.yml

+21-20
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,27 @@ jobs:
3232
run: |
3333
echo "separateTestsNames=$(./gradlew listTasksAsJSON -q --console=plain | tail -n 1)" >> $GITHUB_OUTPUT
3434
35+
publish-components-to-maven-local:
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: Set up JDK for build and test
39+
uses: actions/setup-java@v4
40+
with:
41+
distribution: temurin # Temurin is a distribution of adoptium
42+
java-version: 21
43+
44+
- name: Checkout security
45+
uses: actions/checkout@v4
46+
47+
- name: Publish components to Maven Local
48+
run: |
49+
./gradlew :opensearch-resource-sharing-spi:publishToMavenLocal -Dbuild.snapshot=false
50+
./gradlew :opensearch-security-common:publishToMavenLocal -Dbuild.snapshot=false
51+
./gradlew :opensearch-security-client:publishToMavenLocal -Dbuild.snapshot=false
52+
3553
test:
3654
name: test
37-
needs: generate-test-list
55+
needs: [generate-test-list, publish-components-to-maven-local]
3856
strategy:
3957
fail-fast: false
4058
matrix:
@@ -91,9 +109,9 @@ jobs:
91109
fail_ci_if_error: true
92110
verbose: true
93111
94-
95112
integration-tests:
96113
name: integration-tests
114+
needs: publish-components-to-maven-local
97115
strategy:
98116
fail-fast: false
99117
matrix:
@@ -111,24 +129,6 @@ jobs:
111129
- name: Checkout security
112130
uses: actions/checkout@v4
113131

114-
- name: Publish SPI to Local Maven
115-
uses: gradle/gradle-build-action@v3
116-
with:
117-
cache-disabled: true
118-
arguments: :opensearch-resource-sharing-spi:publishToMavenLocal -Dbuild.snapshot=false
119-
120-
- name: Publish Common to Local Maven
121-
uses: gradle/gradle-build-action@v3
122-
with:
123-
cache-disabled: true
124-
arguments: :opensearch-security-common:publishToMavenLocal -Dbuild.snapshot=false
125-
126-
- name: Publish Client to Local Maven
127-
uses: gradle/gradle-build-action@v3
128-
with:
129-
cache-disabled: true
130-
arguments: :opensearch-security-client:publishToMavenLocal -Dbuild.snapshot=false
131-
132132
- name: Run Integration Tests
133133
uses: gradle/gradle-build-action@v3
134134
with:
@@ -153,6 +153,7 @@ jobs:
153153
resource-tests:
154154
env:
155155
CI_ENVIRONMENT: resource-test
156+
needs: publish-components-to-maven-local
156157
strategy:
157158
fail-fast: false
158159
matrix:

0 commit comments

Comments
 (0)