1010env :
1111 # set this to <repo>:<branch/sha> to build and test with an unreleased
1212 # version of the azure-monitor-opentelemetry-autoconfigure dependency
13- AZURE_MONITOR_OPENTELEMETRY_AUTOCONFIGURE : Azure/azure-sdk-for-java:main
13+ AZURE_MONITOR_OPENTELEMETRY_AUTOCONFIGURE_SNAPSHOT : Azure/azure-sdk-for-java:main
1414
1515jobs :
1616 spotless :
4949 java-version : 17
5050
5151 - name : Build and install local azure-monitor-opentelemetry-autoconfigure dependency
52- if : env.AZURE_MONITOR_OPENTELEMETRY_AUTOCONFIGURE != ''
52+ if : env.AZURE_MONITOR_OPENTELEMETRY_AUTOCONFIGURE_SNAPSHOT != ''
5353 run : ./.github/scripts/build-azure-monitor-dependency.sh
5454
5555 - name : Setup Gradle
9393 java-version : 17
9494
9595 - name : Build and install local azure-monitor-opentelemetry-autoconfigure dependency
96- if : env.AZURE_MONITOR_OPENTELEMETRY_AUTOCONFIGURE != ''
96+ if : env.AZURE_MONITOR_OPENTELEMETRY_AUTOCONFIGURE_SNAPSHOT != ''
9797 shell : bash
9898 run : ./.github/scripts/build-azure-monitor-dependency.sh
9999
@@ -163,7 +163,7 @@ jobs:
163163 java-version : 17
164164
165165 - name : Build and install local azure-monitor-opentelemetry-autoconfigure dependency
166- if : env.AZURE_MONITOR_OPENTELEMETRY_AUTOCONFIGURE != ''
166+ if : env.AZURE_MONITOR_OPENTELEMETRY_AUTOCONFIGURE_SNAPSHOT != ''
167167 shell : bash
168168 run : ./.github/scripts/build-azure-monitor-dependency.sh
169169
@@ -235,7 +235,7 @@ jobs:
235235 java-version : 17
236236
237237 - name : Build and install local azure-monitor-opentelemetry-autoconfigure dependency
238- if : env.AZURE_MONITOR_OPENTELEMETRY_AUTOCONFIGURE != ''
238+ if : env.AZURE_MONITOR_OPENTELEMETRY_AUTOCONFIGURE_SNAPSHOT != ''
239239 run : ./.github/scripts/build-azure-monitor-dependency.sh
240240
241241 - name : Setup Gradle
@@ -259,3 +259,14 @@ jobs:
259259 with :
260260 name : ${{ env.UPLOAD_ARTIFACT_NAME }}
261261 path : ' **/build/reports/tests/smokeTest/**/*'
262+
263+ check-snapshot-dependency :
264+ runs-on : ubuntu-latest
265+ steps :
266+ - name : Check for snapshot dependency
267+ run : |
268+ if [[ -n "$AZURE_MONITOR_OPENTELEMETRY_AUTOCONFIGURE_SNAPSHOT" ]]; then
269+ echo "AZURE_MONITOR_OPENTELEMETRY_AUTOCONFIGURE_SNAPSHOT is set to '$AZURE_MONITOR_OPENTELEMETRY_AUTOCONFIGURE_SNAPSHOT'"
270+ echo "PRs testing against a snapshot cannot be merged."
271+ exit 1
272+ fi
0 commit comments