-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change installed az CLI version with clientVersion
I've added clientVersion to the az mixin configuration so that you can specify which version of the az CLI to install when porter builds the bundle. By default, the latest version of the CLI is installed. ```yaml mixins: - az: clientVersion: 2.35.0 ``` The mixin will use the clientVersion to build the apt package version published by Microsoft, which follows the format VERSION-1~DISTROCODENAME. So in the example above, the package version is 2.35.0-1~stretch. If the user changes the debian version, then stretch will change to match the version, e.g. buster, etc. Signed-off-by: Carolyn Van Slyck <[email protected]>
- Loading branch information
Showing
6 changed files
with
89 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
config: | ||
clientVersion: 1.2.3 | ||
extensions: | ||
- iot | ||
|
||
actions: | ||
install: | ||
- az: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \ | ||
apt-get update && apt-get install -y apt-transport-https lsb-release gnupg curl | ||
RUN curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.asc.gpg | ||
RUN echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list | ||
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \ | ||
apt-get update && apt-get install -y --no-install-recommends \ | ||
azure-cli=1.2.3-1~$(lsb_release -cs) | ||
|
||
RUN az extension add -y --name iot | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \ | ||
apt-get update && apt-get install -y apt-transport-https lsb-release gnupg curl | ||
RUN curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.asc.gpg | ||
RUN echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list | ||
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \ | ||
apt-get update && apt-get install -y --no-install-recommends \ | ||
azure-cli | ||
|