Skip to content

Commit

Permalink
Get identity service version from source instead of tag (#7280)
Browse files Browse the repository at this point in the history
The Mariner arm64 build is currently failing. When it builds identity service bits, it tries to populate the version by getting the latest 1.5.* tag from the identity service repo. There are no 1.5.* tags yet, so it sends an empty version which causes `make` to fail.

The root cause is that we bumped our release version in code much sooner than we normally do (i.e., the period of time between bumping the version in code and actually publishing the bits is usually hours, but this time it's a couple weeks).

The fix is to extract the version from checked-in sources rather than git tag, since the tag isn't set until after we release.

To test, I ran the CI Build pipeline and confirmed that Mariner arm64 passes.

## Azure IoT Edge PR checklist:
  • Loading branch information
damonbarry authored Apr 30, 2024
1 parent c6409cc commit 7523e68
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion builds/misc/templates/build-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,12 @@ stages:
set -ex
git clone --recurse-submodules --branch main https://github.com/Azure/iot-identity-service.git
pushd iot-identity-service
packageVersion=$(git tag | grep 1.5.[0-9]*$ | sort --version-sort -r | head -1)
packageVersion=$(
grep "PACKAGE_VERSION:" .github/workflows/packages.yaml \
| awk '{print $2}' \
| tr -d "'" \
| tr -d '"'
)
sudo docker run --rm \
-v "$(Build.SourcesDirectory)/iot-identity-service:/src" \
-e "ARCH=$PACKAGE_ARCH" \
Expand Down
6 changes: 3 additions & 3 deletions scripts/linux/github/updateLatestVersion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ update_product_versions_json()
proposedEdgeletVersion=$(cat $IOTEDGE_REPO_PATH/edgelet/version.txt)
proposedCoreImageVersion=$(cat $IOTEDGE_REPO_PATH/versionInfo.json | jq -r '.version')
proposedIisVersion=$(
grep "PACKAGE_VERSION:" $IIS_REPO_PATH/.github/workflows/packages.yaml
| awk '{print $2}'
| tr -d "'"
grep "PACKAGE_VERSION:" $IIS_REPO_PATH/.github/workflows/packages.yaml \
| awk '{print $2}' \
| tr -d "'" \
| tr -d '"'
)

Expand Down

0 comments on commit 7523e68

Please sign in to comment.