Skip to content

Commit

Permalink
Revise smoke test and change Docker files (Azure#18263)
Browse files Browse the repository at this point in the history
* upgrade get-azlocation cmd(upgrade subcriptionclient version, add extend location peremeter, and expose more info

* update test for azlocation

* add changlog

* revise changlog.md:delete new title

* revise changlog.md

* add dockerfiles for debian10,debian11,mairin1,ubuntu2204

* revise docker file name

* change parameter to singular noun

* revise session record json file

* revise docker file

* revise docker file

* revise session record json file

* revise session record json file

* revise session record json file

* revise session record json file

* revise session record json file

* revise session record json file

* revise session record json file

* add parameter(failOnStandardError: true) for smoketest

* add parameter(failOnStandardError: true) for smoketest

* change testcase in smoke test.getazadgroup -> get-azaduser

* change testcase in smoke test.getazadgroup -> get-azaduser

* change testcase in smoke test.getazadgroup -> get-azaduser

* change docker file
  • Loading branch information
Nickcandy authored May 24, 2022
1 parent 39b199f commit 20160e6
Showing 11 changed files with 239 additions and 30 deletions.
8 changes: 8 additions & 0 deletions .azure-pipelines/util/smoke-test-steps.yml
Original file line number Diff line number Diff line change
@@ -102,12 +102,16 @@ jobs:
inputs:
filePath: 'tools/Test/SmokeTest/ScriptsCaller.ps1'
arguments: '-RequiredPsVersion ${{ parameters.psVersion }} -Script "./tools/Test/SmokeTest/RmCoreSmokeTests.ps1 "'
failOnStderr: true


- task: PowerShell@2
displayName: 'Run Smoke Test Reversely'
inputs:
filePath: 'tools/Test/SmokeTest/ScriptsCaller.ps1'
arguments: '-RequiredPsVersion ${{ parameters.psVersion }} -Script "./tools/Test/SmokeTest/RmCoreSmokeTests.ps1 -Reverse"'
failOnStderr: true


- task: PowerShell@2
displayName: Clean Az Modules
@@ -126,12 +130,16 @@ jobs:
inputs:
filePath: 'tools/Test/SmokeTest/ScriptsCaller.ps1'
arguments: '-RequiredPsVersion ${{ parameters.psVersion }} -Script "./tools/Test/SmokeTest/RmCoreSmokeTests.ps1 "'
failOnStderr: true


- task: PowerShell@2
displayName: 'Run Smoke Test Reversely'
inputs:
filePath: 'tools/Test/SmokeTest/ScriptsCaller.ps1'
arguments: '-RequiredPsVersion ${{ parameters.psVersion }} -Script "./tools/Test/SmokeTest/RmCoreSmokeTests.ps1 -Reverse "'
failOnStderr: true


- task: PowerShell@2
displayName: Clean Az Modules
17 changes: 13 additions & 4 deletions docker/Dockerfile-alpine-3.13
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ ARG AZURE=/root/.Azure
ARG VCS_REF="none"
ARG BUILD_DATE=
ARG VERSION=
ARG LATEST=
ARG IMAGE_NAME=mcr.microsoft.com/azure-powershell:${VERSION}-alpine-3.13

ENV AZUREPS_HOST_ENVIRONMENT="dockerImage/${VERSION}-alpine-3.13"
@@ -29,10 +30,18 @@ LABEL maintainer="Azure PowerShell Team <[email protected]>" \
org.label-schema.docker.cmd.test="currently not available" \
org.label-schema.docker.cmd.help="docker run --rm ${IMAGE_NAME} pwsh -c Get-Help"

# install azure-powershell from PSGallery
RUN pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Scope AllUsers -Repository ${REPOSITORY} && \
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Untrusted
RUN if [ "${LATEST}" = True ] ; then \
# install latest azure-powershell from BLOB
pwsh -Command Invoke-WebRequest -uri ${BLOB_URL} -OutFile latest.tar.gz && \
mkdir latest && \
tar -zxvf ./latest.tar.gz -C ./latest && \
pwsh -Command ./latest/InstallModule.ps1 ;\
else \
# install old azure-powershell from PSGallery
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Scope AllUsers -Repository ${REPOSITORY} && \
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Untrusted ;\
fi

# create AzureRmContextSettings.json before it was generated
COPY ${CONFIG}/${AZURERM_CONTEXT_SETTINGS} ${AZURE}/${AZURERM_CONTEXT_SETTINGS}
17 changes: 13 additions & 4 deletions docker/Dockerfile-alpine-3.14
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ ARG AZURE=/root/.Azure
ARG VCS_REF="none"
ARG BUILD_DATE=
ARG VERSION=
ARG LATEST=
ARG IMAGE_NAME=mcr.microsoft.com/azure-powershell:${VERSION}-alpine-3.14

ENV AZUREPS_HOST_ENVIRONMENT="dockerImage/${VERSION}-alpine-3.14"
@@ -29,10 +30,18 @@ LABEL maintainer="Azure PowerShell Team <[email protected]>" \
org.label-schema.docker.cmd.test="currently not available" \
org.label-schema.docker.cmd.help="docker run --rm ${IMAGE_NAME} pwsh -c Get-Help"

# install azure-powershell from PSGallery
RUN pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Scope AllUsers -Repository ${REPOSITORY} && \
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Untrusted
RUN if [ "${LATEST}" = True ] ; then \
# install latest azure-powershell from BLOB
pwsh -Command Invoke-WebRequest -uri ${BLOB_URL} -OutFile latest.tar.gz && \
mkdir latest && \
tar -zxvf ./latest.tar.gz -C ./latest && \
pwsh -Command ./latest/InstallModule.ps1 ;\
else \
# install old azure-powershell from PSGallery
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Scope AllUsers -Repository ${REPOSITORY} && \
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Untrusted ;\
fi

# create AzureRmContextSettings.json before it was generated
COPY ${CONFIG}/${AZURERM_CONTEXT_SETTINGS} ${AZURE}/${AZURERM_CONTEXT_SETTINGS}
18 changes: 13 additions & 5 deletions docker/Dockerfile-centos-7
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ ARG AZURE=/root/.Azure
ARG VCS_REF="none"
ARG BUILD_DATE=
ARG VERSION=
ARG LATEST=
ARG IMAGE_NAME=mcr.microsoft.com/azure-powershell:${VERSION}-centos-7

ENV AZUREPS_HOST_ENVIRONMENT="dockerImage/${VERSION}-centos-7"
@@ -29,11 +30,18 @@ LABEL maintainer="Azure PowerShell Team <[email protected]>" \
org.label-schema.docker.cmd.test="currently not available" \
org.label-schema.docker.cmd.help="docker run --rm ${IMAGE_NAME} pwsh -c Get-Help"

# install azure-powershell from PSGallery
RUN pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Scope AllUsers -Repository ${REPOSITORY} && \
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Untrusted

RUN if [ "${LATEST}" = True ] ; then \
# install latest azure-powershell from BLOB
pwsh -Command Invoke-WebRequest -uri ${BLOB_URL} -OutFile latest.tar.gz && \
mkdir latest && \
tar -zxvf ./latest.tar.gz -C ./latest && \
pwsh -Command ./latest/InstallModule.ps1 ;\
else \
# install old azure-powershell from PSGallery
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Scope AllUsers -Repository ${REPOSITORY} && \
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Untrusted ;\
fi
# create AzureRmContextSettings.json before it was generated
COPY ${CONFIG}/${AZURERM_CONTEXT_SETTINGS} ${AZURE}/${AZURERM_CONTEXT_SETTINGS}

23 changes: 16 additions & 7 deletions docker/Dockerfile-debian-9 → docker/Dockerfile-debian-10
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/powershell:debian-9
FROM mcr.microsoft.com/powershell:debian-10

ARG REPOSITORY=PSGallery
ARG MODULE=Az
@@ -8,9 +8,10 @@ ARG AZURE=/root/.Azure
ARG VCS_REF="none"
ARG BUILD_DATE=
ARG VERSION=
ARG IMAGE_NAME=mcr.microsoft.com/azure-powershell:${VERSION}-debian-9
ARG LATEST=
ARG IMAGE_NAME=mcr.microsoft.com/azure-powershell:${VERSION}-debian-10

ENV AZUREPS_HOST_ENVIRONMENT="dockerImage/${VERSION}-debian-9"
ENV AZUREPS_HOST_ENVIRONMENT="dockerImage/${VERSION}-debian-10"

LABEL maintainer="Azure PowerShell Team <[email protected]>" \
readme.md="http://aka.ms/azpsdockerreadme" \
@@ -29,10 +30,18 @@ LABEL maintainer="Azure PowerShell Team <[email protected]>" \
org.label-schema.docker.cmd.test="currently not available" \
org.label-schema.docker.cmd.help="docker run --rm ${IMAGE_NAME} pwsh -c Get-Help"

# install azure-powershell from PSGallery
RUN pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Scope AllUsers -Repository ${REPOSITORY} && \
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Untrusted
RUN if [ "${LATEST}" = True ] ; then \
# install latest azure-powershell from BLOB
pwsh -Command Invoke-WebRequest -uri ${BLOB_URL} -OutFile latest.tar.gz && \
mkdir latest && \
tar -zxvf ./latest.tar.gz -C ./latest && \
pwsh -Command ./latest/InstallModule.ps1 ;\
else \
# install old azure-powershell from PSGallery
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Scope AllUsers -Repository ${REPOSITORY} && \
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Untrusted ;\
fi

# create AzureRmContextSettings.json before it was generated
COPY ${CONFIG}/${AZURERM_CONTEXT_SETTINGS} ${AZURE}/${AZURERM_CONTEXT_SETTINGS}
49 changes: 49 additions & 0 deletions docker/Dockerfile-debian-11
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
FROM mcr.microsoft.com/powershell:debian-11

ARG REPOSITORY=PSGallery
ARG MODULE=Az
ARG CONFIG=config
ARG AZURERM_CONTEXT_SETTINGS=AzureRmContextSettings.json
ARG AZURE=/root/.Azure
ARG VCS_REF="none"
ARG BUILD_DATE=
ARG VERSION=
ARG LATEST=
ARG IMAGE_NAME=mcr.microsoft.com/azure-powershell:${VERSION}-debian-11

ENV AZUREPS_HOST_ENVIRONMENT="dockerImage/${VERSION}-debian-11"

LABEL maintainer="Azure PowerShell Team <[email protected]>" \
readme.md="http://aka.ms/azpsdockerreadme" \
description="This Dockerfile will install the latest release of Azure PowerShell." \
org.label-schema.build-date=${BUILD_DATE} \
org.label-schema.usage="http://aka.ms/azpsdocker" \
org.label-schema.url="http://aka.ms/azpsdockerreadme" \
org.label-schema.vcs-url="https://github.com/Azure/azure-powershell" \
org.label-schema.name="azure powershell" \
org.label-schema.vendor="Azure PowerShell" \
org.label-schema.version=${VERSION} \
org.label-schema.schema-version="1.0" \
org.label-schema.vcs-ref=${VCS_REF} \
org.label-schema.docker.cmd="docker run --rm ${IMAGE_NAME} pwsh -c '\$PSVERSIONTABLE'" \
org.label-schema.docker.cmd.devel="docker run -it --rm -e 'DebugPreference=Continue' ${IMAGE_NAME} pwsh" \
org.label-schema.docker.cmd.test="currently not available" \
org.label-schema.docker.cmd.help="docker run --rm ${IMAGE_NAME} pwsh -c Get-Help"

RUN if [ "${LATEST}" = True ] ; then \
# install latest azure-powershell from BLOB
pwsh -Command Invoke-WebRequest -uri ${BLOB_URL} -OutFile latest.tar.gz && \
mkdir latest && \
tar -zxvf ./latest.tar.gz -C ./latest && \
pwsh -Command ./latest/InstallModule.ps1 ;\
else \
# install old azure-powershell from PSGallery
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Scope AllUsers -Repository ${REPOSITORY} && \
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Untrusted ;\
fi

# create AzureRmContextSettings.json before it was generated
COPY ${CONFIG}/${AZURERM_CONTEXT_SETTINGS} ${AZURE}/${AZURERM_CONTEXT_SETTINGS}

CMD [ "pwsh" ]
49 changes: 49 additions & 0 deletions docker/Dockerfile-mariner-1
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
FROM mcr.microsoft.com/powershell:preview-mariner-1.0

ARG REPOSITORY=PSGallery
ARG MODULE=Az
ARG CONFIG=config
ARG AZURERM_CONTEXT_SETTINGS=AzureRmContextSettings.json
ARG AZURE=/root/.Azure
ARG VCS_REF="none"
ARG BUILD_DATE=
ARG VERSION=
ARG LATEST=
ARG IMAGE_NAME=mcr.microsoft.com/azure-powershell:${VERSION}-mariner-1.0

ENV AZUREPS_HOST_ENVIRONMENT="dockerImage/${VERSION}-mariner-1.0"

LABEL maintainer="Azure PowerShell Team <[email protected]>" \
readme.md="http://aka.ms/azpsdockerreadme" \
description="This Dockerfile will install the latest release of Azure PowerShell." \
org.label-schema.build-date=${BUILD_DATE} \
org.label-schema.usage="http://aka.ms/azpsdocker" \
org.label-schema.url="http://aka.ms/azpsdockerreadme" \
org.label-schema.vcs-url="https://github.com/Azure/azure-powershell" \
org.label-schema.name="azure powershell" \
org.label-schema.vendor="Azure PowerShell" \
org.label-schema.version=${VERSION} \
org.label-schema.schema-version="1.0" \
org.label-schema.vcs-ref=${VCS_REF} \
org.label-schema.docker.cmd="docker run --rm ${IMAGE_NAME} pwsh -c '\$PSVERSIONTABLE'" \
org.label-schema.docker.cmd.devel="docker run -it --rm -e 'DebugPreference=Continue' ${IMAGE_NAME} pwsh" \
org.label-schema.docker.cmd.test="currently not available" \
org.label-schema.docker.cmd.help="docker run --rm ${IMAGE_NAME} pwsh -c Get-Help"

RUN if [ "${LATEST}" = True ] ; then \
# install latest azure-powershell from BLOB
pwsh -Command Invoke-WebRequest -uri ${BLOB_URL} -OutFile latest.tar.gz && \
mkdir latest && \
tar -zxvf ./latest.tar.gz -C ./latest && \
pwsh -Command ./latest/InstallModule.ps1 ;\
else \
# install old azure-powershell from PSGallery
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Scope AllUsers -Repository ${REPOSITORY} && \
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Untrusted ;\
fi

# create AzureRmContextSettings.json before it was generated
COPY ${CONFIG}/${AZURERM_CONTEXT_SETTINGS} ${AZURE}/${AZURERM_CONTEXT_SETTINGS}

CMD [ "pwsh" ]
19 changes: 14 additions & 5 deletions docker/Dockerfile-ubuntu-18.04
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ ARG AZURE=/root/.Azure
ARG VCS_REF="none"
ARG BUILD_DATE=
ARG VERSION=
ARG LATEST=
ARG IMAGE_NAME=mcr.microsoft.com/azure-powershell:${VERSION}-ubuntu-18.04

ENV AZUREPS_HOST_ENVIRONMENT="dockerImage/${VERSION}-ubuntu-18.04"
@@ -28,11 +29,19 @@ LABEL maintainer="Azure PowerShell Team <[email protected]>" \
org.label-schema.docker.cmd.devel="docker run -it --rm -e 'DebugPreference=Continue' ${IMAGE_NAME} pwsh" \
org.label-schema.docker.cmd.test="currently not available" \
org.label-schema.docker.cmd.help="docker run --rm ${IMAGE_NAME} pwsh -c Get-Help"

# install azure-powershell from PSGallery
RUN pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Scope AllUsers -Repository ${REPOSITORY} && \
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Untrusted

RUN if [ "${LATEST}" = True ] ; then \
# install latest azure-powershell from BLOB
pwsh -Command Invoke-WebRequest -uri ${BLOB_URL} -OutFile latest.tar.gz && \
mkdir latest && \
tar -zxvf ./latest.tar.gz -C ./latest && \
pwsh -Command ./latest/InstallModule.ps1 ;\
else \
# install old azure-powershell from PSGallery
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Scope AllUsers -Repository ${REPOSITORY} && \
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Untrusted ;\
fi

# create AzureRmContextSettings.json before it was generated
COPY ${CONFIG}/${AZURERM_CONTEXT_SETTINGS} ${AZURE}/${AZURERM_CONTEXT_SETTINGS}
17 changes: 13 additions & 4 deletions docker/Dockerfile-ubuntu-20.04
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ ARG AZURE=/root/.Azure
ARG VCS_REF="none"
ARG BUILD_DATE=
ARG VERSION=
ARG LATEST=
ARG IMAGE_NAME=mcr.microsoft.com/azure-powershell:${VERSION}-ubuntu-20.04

ENV AZUREPS_HOST_ENVIRONMENT="dockerImage/${VERSION}-ubuntu-20.04"
@@ -29,10 +30,18 @@ LABEL maintainer="Azure PowerShell Team <[email protected]>" \
org.label-schema.docker.cmd.test="currently not available" \
org.label-schema.docker.cmd.help="docker run --rm ${IMAGE_NAME} pwsh -c Get-Help"

# install azure-powershell from PSGallery
RUN pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Scope AllUsers -Repository ${REPOSITORY} && \
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Untrusted
RUN if [ "${LATEST}" = True ] ; then \
# install latest azure-powershell from BLOB
pwsh -Command Invoke-WebRequest -uri ${BLOB_URL} -OutFile latest.tar.gz && \
mkdir latest && \
tar -zxvf ./latest.tar.gz -C ./latest && \
pwsh -Command ./latest/InstallModule.ps1 ;\
else \
# install old azure-powershell from PSGallery
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Scope AllUsers -Repository ${REPOSITORY} && \
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Untrusted ;\
fi

# create AzureRmContextSettings.json before it was generated
COPY ${CONFIG}/${AZURERM_CONTEXT_SETTINGS} ${AZURE}/${AZURERM_CONTEXT_SETTINGS}
50 changes: 50 additions & 0 deletions docker/Dockerfile-ubuntu-22.04
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
FROM mcr.microsoft.com/powershell:ubuntu-22.04

ARG REPOSITORY=PSGallery
ARG MODULE=Az
ARG CONFIG=config
ARG AZURERM_CONTEXT_SETTINGS=AzureRmContextSettings.json
ARG AZURE=/root/.Azure
ARG VCS_REF="none"
ARG BUILD_DATE=
ARG VERSION=
ARG LATEST=
ARG IMAGE_NAME=mcr.microsoft.com/azure-powershell:${VERSION}-ubuntu-22.04

ENV AZUREPS_HOST_ENVIRONMENT="dockerImage/${VERSION}-ubuntu-22.04"

LABEL maintainer="Azure PowerShell Team <[email protected]>" \
readme.md="http://aka.ms/azpsdockerreadme" \
description="This Dockerfile will install the latest release of Azure PowerShell." \
org.label-schema.build-date=${BUILD_DATE} \
org.label-schema.usage="http://aka.ms/azpsdocker" \
org.label-schema.url="http://aka.ms/azpsdockerreadme" \
org.label-schema.vcs-url="https://github.com/Azure/azure-powershell" \
org.label-schema.name="azure powershell" \
org.label-schema.vendor="Azure PowerShell" \
org.label-schema.version=${VERSION} \
org.label-schema.schema-version="1.0" \
org.label-schema.vcs-ref=${VCS_REF} \
org.label-schema.docker.cmd="docker run --rm ${IMAGE_NAME} pwsh -c '\$PSVERSIONTABLE'" \
org.label-schema.docker.cmd.devel="docker run -it --rm -e 'DebugPreference=Continue' ${IMAGE_NAME} pwsh" \
org.label-schema.docker.cmd.test="currently not available" \
org.label-schema.docker.cmd.help="docker run --rm ${IMAGE_NAME} pwsh -c Get-Help"

RUN if [ "${LATEST}" = True ] ; then \
# install latest azure-powershell from BLOB
pwsh -Command Invoke-WebRequest -uri ${BLOB_URL} -OutFile latest.tar.gz && \
mkdir latest && \
tar -zxvf ./latest.tar.gz -C ./latest && \
pwsh -Command ./latest/InstallModule.ps1 ;\
else \
# install old azure-powershell from PSGallery
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Scope AllUsers -Repository ${REPOSITORY} && \
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Untrusted ;\
fi


# create AzureRmContextSettings.json before it was generated
COPY ${CONFIG}/${AZURERM_CONTEXT_SETTINGS} ${AZURE}/${AZURERM_CONTEXT_SETTINGS}

CMD [ "pwsh" ]
2 changes: 1 addition & 1 deletion tools/Test/SmokeTest/RmCoreSmokeTests.ps1
Original file line number Diff line number Diff line change
@@ -156,7 +156,7 @@ $resourceTestCommands = @(
@{Name = "Az.StorageSync"; Command = {Get-AzStorageSyncService}},
@{Name = "Az.Support"; Command = {Get-AzSupportTicket}},
@{Name = "Az.Resources [Tags]"; Command = {Get-AzTag}},
@{Name = "Az.Resources [MSGraph]"; Command = {Get-AzAdGroup -First 1}},
@{Name = "Az.Resources [MSGraph]"; Command = {Get-AzADUser -First 1 -Select Id}},
@{Name = "Az.TrafficManager"; Command = {Get-AzTrafficManagerProfile}},
@{Name = "Az.Billing [UsageAggregates]"; Command = {Get-UsageAggregates -ReportedStartTime '1/1/2018' -ReportedEndTime '1/2/2018'}},
@{Name = "Az.Websites"; Command = {Get-AzWebApp -ResourceGroupName $resourceGroupName}}

0 comments on commit 20160e6

Please sign in to comment.