Skip to content

Commit 8a61a3c

Browse files
committed
up
1 parent aeca196 commit 8a61a3c

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

.github/scripts/build-azure-monitor-dependency.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66
set -e
77

8-
echo "Building azure-monitor-opentelemetry-autoconfigure from $AZURE_MONITOR_OPENTELEMETRY_AUTOCONFIGURE"
8+
echo "Building azure-monitor-opentelemetry-autoconfigure from $AZURE_MONITOR_OPENTELEMETRY_AUTOCONFIGURE_SNAPSHOT"
99

1010
# Parse repo and branch from format "owner/repo:branch"
11-
REPO_BRANCH="$AZURE_MONITOR_OPENTELEMETRY_AUTOCONFIGURE"
11+
REPO_BRANCH="$AZURE_MONITOR_OPENTELEMETRY_AUTOCONFIGURE_SNAPSHOT"
1212
REPO=$(echo "$REPO_BRANCH" | cut -d':' -f1)
1313
BRANCH=$(echo "$REPO_BRANCH" | cut -d':' -f2)
1414

.github/workflows/build-common.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
env:
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

1515
jobs:
1616
spotless:
@@ -49,7 +49,7 @@ jobs:
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
@@ -93,7 +93,7 @@ jobs:
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

Comments
 (0)