Cleanup Docker release testing (#10310)
This commit is contained in:
parent
3ca5a1bdb0
commit
9eb5587d07
|
@ -3,24 +3,21 @@
|
||||||
# Exit on errors
|
# Exit on errors
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
#
|
|
||||||
# Example use:
|
# Example use:
|
||||||
# ./InstallTarballPackage.sh "6.0.0-beta.9" "powershell-6.0.0-beta.9-linux-x64.tar.gz"
|
# ./InstallTarballPackage.sh "6.0.0-beta.9" "powershell-6.0.0-beta.9-linux-x64.tar.gz"
|
||||||
#
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "usage: $0 <powershell version> <powershell package name>"
|
echo "usage: $0 <powershell version> <powershell package name>"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
POWERSHELL_VERSION=$1
|
POWERSHELL_VERSION=$1
|
||||||
if [ ! "$POWERSHELL_VERSION" ]
|
if [ ! "$POWERSHELL_VERSION" ]; then
|
||||||
then
|
|
||||||
usage
|
usage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
POWERSHELL_PACKAGE=$2
|
POWERSHELL_PACKAGE=$2
|
||||||
if [ ! "$POWERSHELL_PACKAGE" ]
|
if [ ! "$POWERSHELL_PACKAGE" ]; then
|
||||||
then
|
|
||||||
usage
|
usage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -37,7 +34,7 @@ tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/$POWERSHELL_VERSION
|
||||||
# Create the symbolic link that points to powershell
|
# Create the symbolic link that points to powershell
|
||||||
ln -s /opt/microsoft/powershell/$POWERSHELL_VERSION/pwsh $POWERSHELL_LINKFILE
|
ln -s /opt/microsoft/powershell/$POWERSHELL_VERSION/pwsh $POWERSHELL_LINKFILE
|
||||||
# Add the symbolic link path to /etc/shells
|
# Add the symbolic link path to /etc/shells
|
||||||
if [ ! -f /etc/shells ] ; then
|
if [ ! -f /etc/shells ]; then
|
||||||
echo $POWERSHELL_LINKFILE > /etc/shells ;
|
echo $POWERSHELL_LINKFILE > /etc/shells ;
|
||||||
else
|
else
|
||||||
grep -q "^${POWERSHELL_LINKFILE}$" /etc/shells || echo $POWERSHELL_LINKFILE >> /etc/shells ;
|
grep -q "^${POWERSHELL_LINKFILE}$" /etc/shells || echo $POWERSHELL_LINKFILE >> /etc/shells ;
|
||||||
|
|
|
@ -10,7 +10,7 @@ The tests must be run separately on the Windows and Linux docker daemons. You ca
|
||||||
Invoke-Pester
|
Invoke-Pester
|
||||||
```
|
```
|
||||||
|
|
||||||
Note: be sure to do this using both the Windows and Linux docker daemon, as the windows.
|
Note: be sure to do this using both the Windows and Linux docker daemon.
|
||||||
|
|
||||||
## To test the productions containers
|
## To test the productions containers
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ ENV LANG en_US.UTF-8
|
||||||
ENV LC_ALL $LANG
|
ENV LC_ALL $LANG
|
||||||
RUN localedef --charmap=UTF-8 --inputfile=en_US $LANG
|
RUN localedef --charmap=UTF-8 --inputfile=en_US $LANG
|
||||||
|
|
||||||
RUN curl -L -o $PACKAGENAME $PACKAGELOCATION/$PACKAGENAME
|
RUN curl -L -o $PACKAGENAME $PACKAGELOCATION/$PACKAGENAME \
|
||||||
RUN yum install -y $PACKAGENAME
|
&& yum install -y $PACKAGENAME
|
||||||
RUN $TESTDOWNLOADCOMMAND
|
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"
|
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"
|
||||||
|
|
|
@ -23,8 +23,8 @@ RUN locale-gen $LANG && update-locale
|
||||||
|
|
||||||
# Install PowerShell package
|
# Install PowerShell package
|
||||||
ADD $PACKAGELOCATION/$PACKAGENAME .
|
ADD $PACKAGELOCATION/$PACKAGENAME .
|
||||||
RUN mkdir -p /opt/microsoft/powershell
|
RUN mkdir -p /opt/microsoft/powershell \
|
||||||
RUN tar zxf $PACKAGENAME -C /opt/microsoft/powershell
|
&& tar zxf $PACKAGENAME -C /opt/microsoft/powershell
|
||||||
|
|
||||||
# Download and run tests
|
# Download and run tests
|
||||||
RUN $TESTDOWNLOADCOMMAND
|
RUN $TESTDOWNLOADCOMMAND
|
||||||
|
|
|
@ -30,8 +30,8 @@ RUN localedef --charmap=UTF-8 --inputfile=en_US $LANG
|
||||||
|
|
||||||
# Install PowerShell package
|
# Install PowerShell package
|
||||||
ADD $PACKAGELOCATION/$PACKAGENAME .
|
ADD $PACKAGELOCATION/$PACKAGENAME .
|
||||||
RUN mkdir -p /opt/microsoft/powershell
|
RUN mkdir -p /opt/microsoft/powershell \
|
||||||
RUN tar zxf $PACKAGENAME -C /opt/microsoft/powershell
|
&& tar zxf $PACKAGENAME -C /opt/microsoft/powershell
|
||||||
|
|
||||||
# Download and run tests
|
# Download and run tests
|
||||||
RUN $TESTDOWNLOADCOMMAND
|
RUN $TESTDOWNLOADCOMMAND
|
||||||
|
|
|
@ -31,8 +31,8 @@ RUN locale-gen $LANG && update-locale
|
||||||
|
|
||||||
# Install PowerShell package
|
# Install PowerShell package
|
||||||
ADD $PACKAGELOCATION/$PACKAGENAME .
|
ADD $PACKAGELOCATION/$PACKAGENAME .
|
||||||
RUN mkdir -p /opt/microsoft/powershell
|
RUN mkdir -p /opt/microsoft/powershell \
|
||||||
RUN tar zxf $PACKAGENAME -C /opt/microsoft/powershell
|
&& tar zxf $PACKAGENAME -C /opt/microsoft/powershell
|
||||||
|
|
||||||
# Download and run tests
|
# Download and run tests
|
||||||
RUN $TESTDOWNLOADCOMMAND
|
RUN $TESTDOWNLOADCOMMAND
|
||||||
|
|
|
@ -23,8 +23,8 @@ RUN locale-gen $LANG && update-locale
|
||||||
|
|
||||||
# Install PowerShell package
|
# Install PowerShell package
|
||||||
ADD $PACKAGELOCATION/$PACKAGENAME .
|
ADD $PACKAGELOCATION/$PACKAGENAME .
|
||||||
RUN mkdir -p /opt/microsoft/powershell
|
RUN mkdir -p /opt/microsoft/powershell \
|
||||||
RUN tar zxf $PACKAGENAME -C /opt/microsoft/powershell
|
&& tar zxf $PACKAGENAME -C /opt/microsoft/powershell
|
||||||
|
|
||||||
# Download and run tests
|
# Download and run tests
|
||||||
RUN $TESTDOWNLOADCOMMAND
|
RUN $TESTDOWNLOADCOMMAND
|
||||||
|
|
|
@ -75,7 +75,6 @@ function Get-LinuxContainer
|
||||||
Path = "$psscriptroot/../release/$os"
|
Path = "$psscriptroot/../release/$os"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Return a list of Windows Container Test Cases
|
# Return a list of Windows Container Test Cases
|
||||||
|
@ -130,7 +129,7 @@ function Test-SkipLinux
|
||||||
return $true
|
return $true
|
||||||
}
|
}
|
||||||
default {
|
default {
|
||||||
throw "Unknow docker os '$os'"
|
throw "Unknown docker os '$os'"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue