-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Adding fxdependent PS package tests #7830
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| FROM centos:7 | ||
|
|
||
| ARG PACKAGENAME | ||
| ARG PACKAGELOCATION | ||
| ARG PREVIEWSUFFIX= | ||
| ARG TESTLIST=/PowerShell/test/powershell/Modules/PackageManagement/PackageManagement.Tests.ps1,/PowerShell/test/powershell/engine/Module | ||
| ARG TESTDOWNLOADCOMMAND="git clone --recursive https://github.com/PowerShell/PowerShell.git" | ||
|
|
||
| # Install dependencies | ||
| RUN yum install -y \ | ||
| glibc-locale-source \ | ||
| git | ||
|
|
||
| # Install dotnet-runtime | ||
| RUN rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm | ||
| RUN yum install -y \ | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This wont be needed if using the 2.1-sdk or 2.1-runtime image is used.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated base image for ubuntu18.04 and debian.9; |
||
| dotnet-runtime-2.1 | ||
|
|
||
| # Setup the locale | ||
| ENV LANG en_US.UTF-8 | ||
| ENV LC_ALL $LANG | ||
| RUN localedef --charmap=UTF-8 --inputfile=en_US $LANG | ||
|
|
||
| # Install PowerShell package | ||
| ADD $PACKAGELOCATION/$PACKAGENAME . | ||
| RUN mkdir -p /opt/microsoft/powershell | ||
| RUN tar zxf $PACKAGENAME -C /opt/microsoft/powershell | ||
|
|
||
| # Download and run tests | ||
| RUN $TESTDOWNLOADCOMMAND | ||
| RUN dotnet /opt/microsoft/powershell/pwsh.dll -c "Import-Module /PowerShell/build.psm1;\$dir='/usr/local/share/powershell/Modules';\$null=New-Item -Type Directory -Path \$dir -ErrorAction SilentlyContinue;Restore-PSPester -Destination \$dir;exit (Invoke-Pester $TESTLIST -PassThru).FailedCount" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| FROM debian:jessie | ||
|
|
||
| ARG PACKAGENAME | ||
| ARG PACKAGELOCATION | ||
| ARG PREVIEWSUFFIX= | ||
| ARG TESTLIST=/PowerShell/test/powershell/Modules/PackageManagement/PackageManagement.Tests.ps1,/PowerShell/test/powershell/engine/Module | ||
| ARG TESTDOWNLOADCOMMAND="git clone --recursive https://github.com/PowerShell/PowerShell.git" | ||
|
|
||
| # Install dependencies | ||
| RUN apt-get update \ | ||
| && apt-get install -y --no-install-recommends \ | ||
| apt-utils \ | ||
| ca-certificates \ | ||
| apt-transport-https \ | ||
| locales \ | ||
| git \ | ||
| wget | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. don't add
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated. |
||
|
|
||
| # Install dotnet-runtime | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This might not be needed.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't find .NET image for debian.8 |
||
| RUN wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg | ||
| RUN mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/ | ||
| ADD https://packages.microsoft.com/config/debian/8/prod.list . | ||
| RUN mv prod.list /etc/apt/sources.list.d/microsoft-prod.list | ||
| RUN apt-get update \ | ||
| && apt-get install -y --no-install-recommends \ | ||
| dotnet-runtime-2.1 | ||
|
|
||
| # Setup the locale | ||
| ENV LANG en_US.UTF-8 | ||
| ENV LC_ALL $LANG | ||
| RUN locale-gen $LANG && update-locale | ||
|
|
||
| # Install PowerShell package | ||
| ADD $PACKAGELOCATION/$PACKAGENAME . | ||
| RUN mkdir -p /opt/microsoft/powershell | ||
| RUN tar zxf $PACKAGENAME -C /opt/microsoft/powershell | ||
|
|
||
| # Download and run tests | ||
| RUN $TESTDOWNLOADCOMMAND | ||
| RUN dotnet /opt/microsoft/powershell/pwsh.dll -c "Import-Module /PowerShell/build.psm1;\$dir='/usr/local/share/powershell/Modules';\$null=New-Item -Type Directory -Path \$dir -ErrorAction SilentlyContinue;Restore-PSPester -Destination \$dir;exit (Invoke-Pester $TESTLIST -PassThru).FailedCount" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| FROM microsoft/dotnet:2.1-runtime-stretch-slim | ||
|
|
||
| ARG PACKAGENAME | ||
| ARG PACKAGELOCATION | ||
| ARG PREVIEWSUFFIX= | ||
| ARG TESTLIST=/PowerShell/test/powershell/Modules/PackageManagement/PackageManagement.Tests.ps1,/PowerShell/test/powershell/engine/Module | ||
| ARG TESTDOWNLOADCOMMAND="git clone --recursive https://github.com/PowerShell/PowerShell.git" | ||
|
|
||
| # Install dependencies | ||
| RUN apt-get update \ | ||
| && apt-get install -y --no-install-recommends \ | ||
| apt-utils \ | ||
| ca-certificates \ | ||
| apt-transport-https \ | ||
| locales \ | ||
| git | ||
|
|
||
| # Setup the locale | ||
| ENV LANG en_US.UTF-8 | ||
| ENV LC_ALL $LANG | ||
| RUN locale-gen $LANG && update-locale | ||
|
|
||
| # Install PowerShell package | ||
| ADD $PACKAGELOCATION/$PACKAGENAME . | ||
| RUN mkdir -p /opt/microsoft/powershell | ||
| RUN tar zxf $PACKAGENAME -C /opt/microsoft/powershell | ||
|
|
||
| # Download and run tests | ||
| RUN $TESTDOWNLOADCOMMAND | ||
| RUN dotnet /opt/microsoft/powershell/pwsh.dll -c "Import-Module /PowerShell/build.psm1;\$dir='/usr/local/share/powershell/Modules';\$null=New-Item -Type Directory -Path \$dir -ErrorAction SilentlyContinue;Restore-PSPester -Destination \$dir;exit (Invoke-Pester $TESTLIST -PassThru).FailedCount" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| FROM fedora:27 | ||
|
|
||
| ARG PACKAGENAME | ||
| ARG PACKAGELOCATION | ||
| ARG PREVIEWSUFFIX= | ||
| ARG TESTLIST=/PowerShell/test/powershell/Modules/PackageManagement/PackageManagement.Tests.ps1,/PowerShell/test/powershell/engine/Module | ||
| ARG TESTDOWNLOADCOMMAND="git clone --recursive https://github.com/PowerShell/PowerShell.git" | ||
|
|
||
| # Install dependencies | ||
| RUN dnf install -y \ | ||
| glibc-locale-source \ | ||
| git \ | ||
| compat-openssl10 \ | ||
| && dnf upgrade-minimal -y --security \ | ||
| && dnf clean all | ||
|
|
||
| # Install dotnet-runtime | ||
| RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc | ||
| ADD https://packages.microsoft.com/config/fedora/27/prod.repo . | ||
| RUN mv prod.repo /etc/yum.repos.d/microsoft-prod.repo | ||
| RUN dnf install -y \ | ||
| dotnet-runtime-2.1 \ | ||
| && dnf upgrade-minimal -y --security \ | ||
| && dnf clean all | ||
|
|
||
| # Setup the locale | ||
| ENV LANG en_US.UTF-8 | ||
| ENV LC_ALL $LANG | ||
| RUN localedef --charmap=UTF-8 --inputfile=en_US $LANG | ||
|
|
||
| # Install PowerShell package | ||
| ADD $PACKAGELOCATION/$PACKAGENAME . | ||
| RUN mkdir -p /opt/microsoft/powershell | ||
| RUN tar zxf $PACKAGENAME -C /opt/microsoft/powershell | ||
|
|
||
| # Download and run tests | ||
| RUN $TESTDOWNLOADCOMMAND | ||
| RUN dotnet /opt/microsoft/powershell/pwsh.dll -c "Import-Module /PowerShell/build.psm1;\$dir='/usr/local/share/powershell/Modules';\$null=New-Item -Type Directory -Path \$dir -ErrorAction SilentlyContinue;Restore-PSPester -Destination \$dir;exit (Invoke-Pester $TESTLIST -PassThru).FailedCount" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| FROM fedora:28 | ||
|
|
||
| ARG PACKAGENAME | ||
| ARG PACKAGELOCATION | ||
| ARG PREVIEWSUFFIX= | ||
| ARG TESTLIST=/PowerShell/test/powershell/Modules/PackageManagement/PackageManagement.Tests.ps1,/PowerShell/test/powershell/engine/Module | ||
| ARG TESTDOWNLOADCOMMAND="git clone --recursive https://github.com/PowerShell/PowerShell.git" | ||
|
|
||
| # Install dependencies | ||
| RUN dnf install -y \ | ||
| glibc-locale-source \ | ||
| git \ | ||
| compat-openssl10 \ | ||
| && dnf upgrade-minimal -y --security \ | ||
| && dnf clean all | ||
|
|
||
| # Install dotnet-runtime | ||
| RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc | ||
| ADD https://packages.microsoft.com/config/fedora/27/prod.repo . | ||
| RUN mv prod.repo /etc/yum.repos.d/microsoft-prod.repo | ||
| RUN dnf install -y \ | ||
| dotnet-runtime-2.1 \ | ||
| && dnf upgrade-minimal -y --security \ | ||
| && dnf clean all | ||
|
|
||
| # Setup the locale | ||
| ENV LANG en_US.UTF-8 | ||
| ENV LC_ALL $LANG | ||
| RUN localedef --charmap=UTF-8 --inputfile=en_US $LANG | ||
|
|
||
| # Install PowerShell package | ||
| ADD $PACKAGELOCATION/$PACKAGENAME . | ||
| RUN mkdir -p /opt/microsoft/powershell | ||
| RUN tar zxf $PACKAGENAME -C /opt/microsoft/powershell | ||
|
|
||
| # Download and run tests | ||
| RUN $TESTDOWNLOADCOMMAND | ||
| RUN dotnet /opt/microsoft/powershell/pwsh.dll -c "Import-Module /PowerShell/build.psm1;\$dir='/usr/local/share/powershell/Modules';\$null=New-Item -Type Directory -Path \$dir -ErrorAction SilentlyContinue;Restore-PSPester -Destination \$dir;exit (Invoke-Pester $TESTLIST -PassThru).FailedCount" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| FROM opensuse:42.2 | ||
|
|
||
| ARG PACKAGENAME | ||
| ARG PACKAGELOCATION | ||
| ARG PREVIEWSUFFIX= | ||
| ARG TESTLIST=/PowerShell/test/powershell/Modules/PackageManagement/PackageManagement.Tests.ps1,/PowerShell/test/powershell/engine/Module | ||
| ARG TESTDOWNLOADCOMMAND="git clone --recursive https://github.com/PowerShell/PowerShell.git" | ||
|
|
||
| # Install dependencies | ||
| RUN zypper --non-interactive update --skip-interactive \ | ||
| && zypper --non-interactive install \ | ||
| glibc-locale \ | ||
| glibc-i18ndata \ | ||
| tar \ | ||
| libunwind \ | ||
| libicu \ | ||
| openssl \ | ||
| git | ||
|
|
||
| # Install dotnet-runtime | ||
| RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc | ||
| ADD https://packages.microsoft.com/config/opensuse/42.2/prod.repo . | ||
| RUN mv prod.repo /etc/zypp/repos.d/microsoft-prod.repo | ||
| RUN zypper --non-interactive update --skip-interactive \ | ||
| && zypper --non-interactive install \ | ||
| dotnet-runtime-2.1 | ||
|
|
||
| # Setup the locale | ||
| ENV LANG en_US.UTF-8 | ||
| ENV LC_ALL $LANG | ||
| RUN localedef --charmap=UTF-8 --inputfile=en_US $LANG | ||
|
|
||
| # Install PowerShell package | ||
| ADD $PACKAGELOCATION/$PACKAGENAME . | ||
| RUN mkdir -p /opt/microsoft/powershell | ||
| RUN tar zxf $PACKAGENAME -C /opt/microsoft/powershell | ||
|
|
||
| # Download and run tests | ||
| RUN $TESTDOWNLOADCOMMAND | ||
| RUN dotnet /opt/microsoft/powershell/pwsh.dll -c "Import-Module /PowerShell/build.psm1;\$dir='/usr/local/share/powershell/Modules';\$null=New-Item -Type Directory -Path \$dir -ErrorAction SilentlyContinue;Restore-PSPester -Destination \$dir;exit (Invoke-Pester $TESTLIST -PassThru).FailedCount" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| FROM opensuse:42.3 | ||
|
|
||
| ARG PACKAGENAME | ||
| ARG PACKAGELOCATION | ||
| ARG PREVIEWSUFFIX= | ||
| ARG TESTLIST=/PowerShell/test/powershell/Modules/PackageManagement/PackageManagement.Tests.ps1,/PowerShell/test/powershell/engine/Module | ||
| ARG TESTDOWNLOADCOMMAND="git clone --recursive https://github.com/PowerShell/PowerShell.git" | ||
|
|
||
| # Install dependencies | ||
| RUN zypper --non-interactive update --skip-interactive \ | ||
| && zypper --non-interactive install \ | ||
| glibc-locale \ | ||
| glibc-i18ndata \ | ||
| tar \ | ||
| libunwind \ | ||
| libicu \ | ||
| openssl \ | ||
| git | ||
|
|
||
| # Install dotnet-runtime | ||
| RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc | ||
| ADD https://packages.microsoft.com/config/opensuse/42.2/prod.repo . | ||
| RUN mv prod.repo /etc/zypp/repos.d/microsoft-prod.repo | ||
| RUN zypper --non-interactive update --skip-interactive \ | ||
| && zypper --non-interactive install \ | ||
| dotnet-runtime-2.1 | ||
|
|
||
| # Setup the locale | ||
| ENV LANG en_US.UTF-8 | ||
| ENV LC_ALL $LANG | ||
| RUN localedef --charmap=UTF-8 --inputfile=en_US $LANG | ||
|
|
||
| # Install PowerShell package | ||
| ADD $PACKAGELOCATION/$PACKAGENAME . | ||
| RUN mkdir -p /opt/microsoft/powershell | ||
| RUN tar zxf $PACKAGENAME -C /opt/microsoft/powershell | ||
|
|
||
| # Download and run tests | ||
| RUN $TESTDOWNLOADCOMMAND | ||
| RUN dotnet /opt/microsoft/powershell/pwsh.dll -c "Import-Module /PowerShell/build.psm1;\$dir='/usr/local/share/powershell/Modules';\$null=New-Item -Type Directory -Path \$dir -ErrorAction SilentlyContinue;Restore-PSPester -Destination \$dir;exit (Invoke-Pester $TESTLIST -PassThru).FailedCount" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| FROM ubuntu:trusty | ||
|
|
||
| ARG PACKAGENAME | ||
| ARG PACKAGELOCATION | ||
| ARG PREVIEWSUFFIX= | ||
| ARG TESTLIST=/PowerShell/test/powershell/Modules/PackageManagement/PackageManagement.Tests.ps1,/PowerShell/test/powershell/engine/Module | ||
| ARG TESTDOWNLOADCOMMAND="git clone --recursive https://github.com/PowerShell/PowerShell.git" | ||
|
|
||
| # Install dependencies | ||
| RUN apt-get update \ | ||
| && apt-get install -y --no-install-recommends \ | ||
| apt-utils \ | ||
| ca-certificates \ | ||
| apt-transport-https \ | ||
| locales \ | ||
| git | ||
|
|
||
| # Install dotnet-runtime | ||
| ADD https://packages.microsoft.com/config/ubuntu/14.04/packages-microsoft-prod.deb . | ||
| RUN dpkg -i packages-microsoft-prod.deb | ||
| RUN apt-get update \ | ||
| && apt-get install -y --no-install-recommends \ | ||
| dotnet-runtime-2.1 | ||
|
|
||
| # Setup the locale | ||
| ENV LANG en_US.UTF-8 | ||
| ENV LC_ALL $LANG | ||
| RUN locale-gen $LANG && update-locale | ||
|
|
||
| # Install PowerShell package | ||
| ADD $PACKAGELOCATION/$PACKAGENAME . | ||
| RUN mkdir -p /opt/microsoft/powershell | ||
| RUN tar zxf $PACKAGENAME -C /opt/microsoft/powershell | ||
|
|
||
| # Download and run tests | ||
| RUN $TESTDOWNLOADCOMMAND | ||
| RUN dotnet /opt/microsoft/powershell/pwsh.dll -c "Import-Module /PowerShell/build.psm1;\$dir='/usr/local/share/powershell/Modules';\$null=New-Item -Type Directory -Path \$dir -ErrorAction SilentlyContinue;Restore-PSPester -Destination \$dir;exit (Invoke-Pester $TESTLIST -PassThru).FailedCount" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| FROM ubuntu:xenial | ||
|
|
||
| ARG PACKAGENAME | ||
| ARG PACKAGELOCATION | ||
| ARG PREVIEWSUFFIX= | ||
| ARG TESTLIST=/PowerShell/test/powershell/Modules/PackageManagement/PackageManagement.Tests.ps1,/PowerShell/test/powershell/engine/Module | ||
| ARG TESTDOWNLOADCOMMAND="git clone --recursive https://github.com/PowerShell/PowerShell.git" | ||
|
|
||
| # Install dependencies | ||
| RUN apt-get update \ | ||
| && apt-get install -y --no-install-recommends \ | ||
| apt-utils \ | ||
| ca-certificates \ | ||
| apt-transport-https \ | ||
| locales \ | ||
| git | ||
|
|
||
| # Install dotnet-runtime | ||
| ADD https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb . | ||
| RUN dpkg -i packages-microsoft-prod.deb | ||
| RUN apt-get update \ | ||
| && apt-get install -y --no-install-recommends \ | ||
| dotnet-runtime-2.1 | ||
|
|
||
| # Setup the locale | ||
| ENV LANG en_US.UTF-8 | ||
| ENV LC_ALL $LANG | ||
| RUN locale-gen $LANG && update-locale | ||
|
|
||
| # Install PowerShell package | ||
| ADD $PACKAGELOCATION/$PACKAGENAME . | ||
| RUN mkdir -p /opt/microsoft/powershell | ||
| RUN tar zxf $PACKAGENAME -C /opt/microsoft/powershell | ||
|
|
||
| # Download and run tests | ||
| RUN $TESTDOWNLOADCOMMAND | ||
| RUN dotnet /opt/microsoft/powershell/pwsh.dll -c "Import-Module /PowerShell/build.psm1;\$dir='/usr/local/share/powershell/Modules';\$null=New-Item -Type Directory -Path \$dir -ErrorAction SilentlyContinue;Restore-PSPester -Destination \$dir;exit (Invoke-Pester $TESTLIST -PassThru).FailedCount" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| FROM microsoft/dotnet:2.1-runtime-bionic | ||
|
|
||
| ARG PACKAGENAME | ||
| ARG PACKAGELOCATION | ||
| ARG PREVIEWSUFFIX= | ||
| ARG TESTLIST=/PowerShell/test/powershell/Modules/PackageManagement/PackageManagement.Tests.ps1,/PowerShell/test/powershell/engine/Module | ||
| ARG TESTDOWNLOADCOMMAND="git clone --recursive https://github.com/PowerShell/PowerShell.git" | ||
|
|
||
| # Install dependencies | ||
| RUN apt-get update \ | ||
| && apt-get install -y --no-install-recommends \ | ||
| apt-utils \ | ||
| ca-certificates \ | ||
| apt-transport-https \ | ||
| locales \ | ||
| git | ||
|
|
||
| # Setup the locale | ||
| ENV LANG en_US.UTF-8 | ||
| ENV LC_ALL $LANG | ||
| RUN locale-gen $LANG && update-locale | ||
|
|
||
| # Install PowerShell package | ||
| ADD $PACKAGELOCATION/$PACKAGENAME . | ||
| RUN mkdir -p /opt/microsoft/powershell | ||
| RUN tar zxf $PACKAGENAME -C /opt/microsoft/powershell | ||
|
|
||
| # Download and run tests | ||
| RUN $TESTDOWNLOADCOMMAND | ||
| RUN dotnet /opt/microsoft/powershell/pwsh.dll -c "Import-Module /PowerShell/build.psm1;\$dir='/usr/local/share/powershell/Modules';\$null=New-Item -Type Directory -Path \$dir -ErrorAction SilentlyContinue;Restore-PSPester -Destination \$dir;exit (Invoke-Pester $TESTLIST -PassThru).FailedCount" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should base this off the 2.1-runtime and 2.1-sdk image flavors from https://hub.docker.com/r/microsoft/dotnet/tags/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated this for ubuntu18.04 and debian.9;
Unfortunately they don't have any other images.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to test all these platforms?