Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[main] Inherit VERSION for IIS build in ARM64 Mariner #6587

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions builds/misc/templates/build-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -308,18 +308,17 @@ stages:
set -ex
git clone --recurse-submodules https://github.com/Azure/iot-identity-service.git
pushd iot-identity-service
packageVersion=$(git tag | grep 1.3.[0-9]*$ | sort --version-sort -r | head -1)
sudo docker run --rm \
-v "$(Build.SourcesDirectory)/iot-identity-service:/src" \
-e "ARCH=$PACKAGE_ARCH" \
-e "OS=$OS:$OSVERSION" \
-e "PACKAGE_VERSION=$packageVersion" \
-e "PACKAGE_VERSION=$VERSION" \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Iotedge and Iot-identity-service do not require to have the same version. The best we can do here is probably parse the version from https://github.com/Azure/iot-identity-service/blob/main/.github/workflows/packages.yaml#L68.
Note: The URI is required to be updated if the new branch be created. (i.e. main -> release/1.4).

Copy link
Contributor Author

@onalante-msft onalante-msft Aug 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, we would be tagging our release commits (edit: relative to main) so that we could just set VERSION=$(git describe). However, given that we do not do this, the next safest alternative is probably to add a version.txt at the root directory of iot-identity-service as we do for iotedge. Parsing CI files for a version string seems fragile.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do tag our release artifacts for a given release branch -- main is not a release branch; hence, no tag.
I like the idea of version.txt for the iot-identity-service repo.

-e "PACKAGE_RELEASE=1" \
--privileged \
"ubuntu:18.04" \
'/src/ci/package.sh'
popd
sudo cp iot-identity-service/packages/mariner$(os_version)/$(arch)/aziot-identity-service-$packageVersion-1.cm$(os_version).$(arch).rpm .
sudo cp iot-identity-service/packages/mariner$(os_version)/$(arch)/aziot-identity-service-$VERSION-1.cm$(os_version).$(arch).rpm .
sudo rm -rf iot-identity-service

- bash: |
Expand Down