4949 if [[ -f .github/patches/opentelemetry-java.patch ]]; then
5050 echo 'patch_otel_java=true' >> $GITHUB_ENV
5151 fi
52+ if [[ -f .github/patches/opentelemetry-java-instrumentation.patch ]]; then
53+ echo 'patch_otel_java_instrumentation=true' >> $GITHUB_ENV
54+ fi
5255 if [[ -f .github/patches/opentelemetry-java-contrib.patch ]]; then
5356 echo 'patch_otel_java_contrib=true' >> $GITHUB_ENV
5457 fi
@@ -57,21 +60,22 @@ runs:
5760 - name : Clone and patch repositories
5861 run : .github/scripts/patch.sh
5962 if : ${{ env.patch_otel_java == 'true' ||
60- env.patch_otel_java_contrib == 'true' }}
63+ env.patch_otel_java_contrib == 'true' ||
64+ env.patch_otel_java_instrumentation == 'true' }}
6165 shell : bash
6266
6367 - name : Build opentelemetry-java with tests
6468 uses : gradle/actions/setup-gradle@d9c87d481d55275bb5441eef3fe0e46805f9ef70 # v3.5.0
6569 if : ${{ env.patch_otel_java == 'true' && inputs.run_tests != 'false' }}
6670 with :
67- arguments : build publishToMavenLocal
71+ arguments : build publishToMavenLocal --scan --no-daemon
6872 build-root-directory : opentelemetry-java
6973
7074 - name : Build opentelemetry-java
7175 uses : gradle/actions/setup-gradle@d9c87d481d55275bb5441eef3fe0e46805f9ef70 # v3.5.0
7276 if : ${{ env.patch_otel_java == 'true' && inputs.run_tests == 'false' }}
7377 with :
74- arguments : publishToMavenLocal
78+ arguments : publishToMavenLocal --scan --no-daemon
7579 build-root-directory : opentelemetry-java
7680
7781 - name : cleanup opentelemetry-java
@@ -83,17 +87,36 @@ runs:
8387 uses : gradle/actions/setup-gradle@d9c87d481d55275bb5441eef3fe0e46805f9ef70 # v3.5.0
8488 if : ${{ env.patch_otel_java_contrib == 'true' && inputs.run_tests != 'false' }}
8589 with :
86- arguments : build publishToMavenLocal
90+ arguments : build publishToMavenLocal --scan --no-daemon
8791 build-root-directory : opentelemetry-java-contrib
8892
8993 - name : Build opentelemetry-java-contrib
9094 uses : gradle/actions/setup-gradle@d9c87d481d55275bb5441eef3fe0e46805f9ef70 # v3.5.0
9195 if : ${{ env.patch_otel_java_contrib == 'true' && inputs.run_tests == 'false' }}
9296 with :
93- arguments : publishToMavenLocal
97+ arguments : publishToMavenLocal --scan --no-daemon
9498 build-root-directory : opentelemetry-java-contrib
9599
96100 - name : cleanup opentelemetry-java-contrib
97101 run : rm -rf opentelemetry-java-contrib
98102 if : ${{ env.patch_otel_java_contrib == 'true' }}
99103 shell : bash
104+
105+ - name : Build opentelemetry-java-instrumentation with tests
106+ uses : gradle/gradle-build-action@v2
107+ if : ${{ env.patch_otel_java_instrumentation == 'true' && inputs.run_tests != 'false' }}
108+ with :
109+ arguments : check -x spotlessCheck publishToMavenLocal --scan --no-daemon
110+ build-root-directory : opentelemetry-java-instrumentation
111+
112+ - name : Build opentelemetry java instrumentation
113+ uses : gradle/gradle-build-action@v2
114+ if : ${{ env.patch_otel_java_instrumentation == 'true' && inputs.run_tests == 'false' }}
115+ with :
116+ arguments : publishToMavenLocal --scan --no-daemon
117+ build-root-directory : opentelemetry-java-instrumentation
118+
119+ - name : cleanup opentelmetry-java-instrumentation
120+ run : rm -rf opentelemetry-java-instrumentation
121+ if : ${{ env.patch_otel_java_instrumentation == 'true' }}
122+ shell : bash
0 commit comments