Skip to content

Publish docker image to ACR #1348

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

Merged
merged 6 commits into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions .azure-pipelines/generate-rollup-module-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ jobs:
publishVstsFeed: '0985d294-5762-4bc2-a565-161ef349ca3e/edc337b9-e5ea-49dd-a2cb-e8d66668ca57'
allowPackageConflicts: true

- task: CopyFiles@2
displayName: 'Copy DockerImage to artifact staging directory'
inputs:
contents: '$(System.DefaultWorkingDirectory)/Dockerfile'
targetFolder: $(Build.ArtifactStagingDirectory)

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact Microsoft.Graph.nupkg'
inputs:
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM mcr.microsoft.com/powershell

ARG MODULE_VERSION=latest
ARG VERSION=latest

RUN pwsh -c "if ('${MODULE_VERSION}' -eq 'latest') { Install-Module Microsoft.Graph -Scope CurrentUser -AllowClobber -Force} else { Install-Module Microsoft.Graph -Scope CurrentUser -AllowClobber -Force -Version ${MODULE_VERSION} }"
RUN pwsh -c "if ('${VERSION}' -eq 'latest') { Install-Module Microsoft.Graph -Scope CurrentUser -AllowClobber -Force} else { Install-Module Microsoft.Graph -Scope CurrentUser -AllowClobber -Force -RequiredVersion ${VERSION} }"

LABEL description="# Welcome to Microsoft Graph PowrShell \
To start learning about the module checkout the [getting started documentation](https://docs.microsoft.com/en-us/powershell/microsoftgraph/get-started)"