diff --git a/docker/tests/Templates/debian.8/Dockerfile b/docker/tests/Templates/debian.8/Dockerfile deleted file mode 100644 index 1c52c3b8a2..0000000000 --- a/docker/tests/Templates/debian.8/Dockerfile +++ /dev/null @@ -1,28 +0,0 @@ -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 \ - curl \ - apt-transport-https \ - locales \ - git - -# Setup the locale -ENV LANG en_US.UTF-8 -ENV LC_ALL $LANG -RUN locale-gen $LANG && update-locale - -RUN curl -L -o $PACKAGENAME $PACKAGELOCATION/$PACKAGENAME -RUN dpkg -i $PACKAGENAME || : -RUN apt-get install -y -f -RUN $TESTDOWNLOADCOMMAND -RUN pwsh$PREVIEWSUFFIX -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" diff --git a/docker/tests/Templates/fedora26/Dockerfile b/docker/tests/Templates/fedora26/Dockerfile deleted file mode 100644 index 25adfec102..0000000000 --- a/docker/tests/Templates/fedora26/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -FROM fedora:26 - -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 \ - curl \ - glibc-locale-source \ - compat-openssl10 \ - git \ - && 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 - -RUN curl -L -o $PACKAGENAME $PACKAGELOCATION/$PACKAGENAME -RUN dnf install -y $PACKAGENAME -RUN $TESTDOWNLOADCOMMAND -RUN pwsh$PREVIEWSUFFIX -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" diff --git a/docker/tests/Templates/fedora27/Dockerfile b/docker/tests/Templates/fedora27/Dockerfile deleted file mode 100644 index 78bf3595a4..0000000000 --- a/docker/tests/Templates/fedora27/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -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 \ - curl \ - glibc-locale-source \ - git \ - compat-openssl10 \ - && 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 - -RUN curl -L -o $PACKAGENAME $PACKAGELOCATION/$PACKAGENAME -RUN dnf install -y $PACKAGENAME -RUN $TESTDOWNLOADCOMMAND -RUN pwsh$PREVIEWSUFFIX -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" diff --git a/docker/tests/Templates/fxdependent-debian.9/Dockerfile b/docker/tests/Templates/fxdependent-debian.9/Dockerfile index e591a35aba..3c4b6815d5 100644 --- a/docker/tests/Templates/fxdependent-debian.9/Dockerfile +++ b/docker/tests/Templates/fxdependent-debian.9/Dockerfile @@ -1,4 +1,4 @@ -FROM microsoft/dotnet:2.1-runtime-stretch-slim +FROM microsoft/dotnet:2.1.7-runtime-stretch-slim ARG PACKAGENAME ARG PACKAGELOCATION diff --git a/docker/tests/Templates/fxdependent-fedora27/Dockerfile b/docker/tests/Templates/fxdependent-fedora27/Dockerfile deleted file mode 100644 index d96df77b4d..0000000000 --- a/docker/tests/Templates/fxdependent-fedora27/Dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -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" diff --git a/docker/tests/Templates/fxdependent-opensuse42.2/Dockerfile b/docker/tests/Templates/fxdependent-opensuse42.2/Dockerfile deleted file mode 100644 index c38ff0e129..0000000000 --- a/docker/tests/Templates/fxdependent-opensuse42.2/Dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -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" diff --git a/docker/tests/Templates/fxdependent-opensuse42.3/Dockerfile b/docker/tests/Templates/fxdependent-opensuse42.3/Dockerfile index f6122c9d53..74b4bc9825 100644 --- a/docker/tests/Templates/fxdependent-opensuse42.3/Dockerfile +++ b/docker/tests/Templates/fxdependent-opensuse42.3/Dockerfile @@ -18,7 +18,8 @@ RUN zypper --non-interactive update --skip-interactive \ git # Install dotnet-runtime -RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc +ADD https://packages.microsoft.com/keys/microsoft.asc . +RUN rpmkeys --import 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 \ diff --git a/docker/tests/Templates/fxdependent-ubuntu18.04/Dockerfile b/docker/tests/Templates/fxdependent-ubuntu18.04/Dockerfile index 7c73ab2906..a8d8ccca43 100644 --- a/docker/tests/Templates/fxdependent-ubuntu18.04/Dockerfile +++ b/docker/tests/Templates/fxdependent-ubuntu18.04/Dockerfile @@ -1,4 +1,4 @@ -FROM microsoft/dotnet:2.1-runtime-bionic +FROM microsoft/dotnet:2.1.7-runtime-bionic ARG PACKAGENAME ARG PACKAGELOCATION diff --git a/docker/tests/Templates/opensuse42.2/Dockerfile b/docker/tests/Templates/opensuse42.2/Dockerfile deleted file mode 100644 index 31c16d5927..0000000000 --- a/docker/tests/Templates/opensuse42.2/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -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" - -ARG POWERSHELL_LINKFILE=/usr/bin/pwsh - -# Install dependencies -RUN zypper --non-interactive update --skip-interactive \ - && zypper --non-interactive install \ - glibc-locale \ - glibc-i18ndata \ - tar \ - curl \ - libunwind \ - libicu \ - openssl \ - git - -# Setup the locale -ENV LANG en_US.UTF-8 -ENV LC_ALL $LANG -RUN localedef --charmap=UTF-8 --inputfile=en_US $LANG - -RUN curl -L -o $PACKAGENAME $PACKAGELOCATION/$PACKAGENAME - -# Create the target folder where powershell will be placed -RUN mkdir -p /opt/microsoft/powershell -# Expand powershell to the target folder -RUN tar zxf $PACKAGENAME -C /opt/microsoft/powershell - -# Create the symbolic link that points to powershell -RUN ln -s /opt/microsoft/powershell/pwsh $POWERSHELL_LINKFILE - -RUN $TESTDOWNLOADCOMMAND -RUN pwsh -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" diff --git a/docker/tests/containerTestCommon.psm1 b/docker/tests/containerTestCommon.psm1 index 76caafce98..75796c2fed 100644 --- a/docker/tests/containerTestCommon.psm1 +++ b/docker/tests/containerTestCommon.psm1 @@ -221,19 +221,14 @@ function Get-DefaultPreviewConfigForPackageValidation # format: = @{ 'centos7'='rhel.7'; 'debian.9'='debian.9'; - 'fedora26'='rhel.7'; - 'fedora27'='rhel.7'; 'fedora28'='rhel.7'; - 'opensuse42.2'='linux-x64.tar.gz'; 'opensuse42.3'='linux-x64.tar.gz'; 'ubuntu14.04'='ubuntu.14.04'; 'ubuntu16.04'='ubuntu.16.04'; 'ubuntu18.04'='ubuntu.18.04'; 'fxdependent-centos7'='linux-x64-fxdependent.tar.gz'; 'fxdependent-debian.9'='linux-x64-fxdependent.tar.gz'; - 'fxdependent-fedora27'='linux-x64-fxdependent.tar.gz'; 'fxdependent-fedora28'='linux-x64-fxdependent.tar.gz'; - 'fxdependent-opensuse42.2'='linux-x64-fxdependent.tar.gz'; 'fxdependent-opensuse42.3'='linux-x64-fxdependent.tar.gz'; 'fxdependent-ubuntu14.04'='linux-x64-fxdependent.tar.gz'; 'fxdependent-ubuntu16.04'='linux-x64-fxdependent.tar.gz'; @@ -250,16 +245,11 @@ function Get-DefaultStableConfigForPackageValidation # format: = @{ 'centos7'='rhel.7'; 'debian.9'='debian.9'; - 'fedora26'='rhel.7'; - 'fedora27'='rhel.7'; - 'opensuse42.2'='linux-x64.tar.gz'; 'opensuse42.3'='linux-x64.tar.gz'; 'ubuntu14.04'='ubuntu.14.04'; 'ubuntu16.04'='ubuntu.16.04'; 'fxdependent-centos7'='linux-x64-fxdependent.tar.gz'; 'fxdependent-debian.9'='linux-x64-fxdependent.tar.gz'; - 'fxdependent-fedora27'='linux-x64-fxdependent.tar.gz'; - 'fxdependent-opensuse42.2'='linux-x64-fxdependent.tar.gz'; 'fxdependent-opensuse42.3'='linux-x64-fxdependent.tar.gz'; 'fxdependent-ubuntu14.04'='linux-x64-fxdependent.tar.gz'; 'fxdependent-ubuntu16.04'='linux-x64-fxdependent.tar.gz'