mirror of
https://github.com/PowerShell/PowerShell.git
synced 2024-11-23 01:34:19 +08:00
Cleanup Docker release testing (#10310)
This commit is contained in:
parent
3ca5a1bdb0
commit
9eb5587d07
@ -3,24 +3,21 @@
|
||||
# Exit on errors
|
||||
set -e
|
||||
|
||||
#
|
||||
# Example use:
|
||||
# ./InstallTarballPackage.sh "6.0.0-beta.9" "powershell-6.0.0-beta.9-linux-x64.tar.gz"
|
||||
#
|
||||
|
||||
usage() {
|
||||
echo "usage: $0 <powershell version> <powershell package name>"
|
||||
exit 1
|
||||
}
|
||||
|
||||
POWERSHELL_VERSION=$1
|
||||
if [ ! "$POWERSHELL_VERSION" ]
|
||||
then
|
||||
if [ ! "$POWERSHELL_VERSION" ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
POWERSHELL_PACKAGE=$2
|
||||
if [ ! "$POWERSHELL_PACKAGE" ]
|
||||
then
|
||||
if [ ! "$POWERSHELL_PACKAGE" ]; then
|
||||
usage
|
||||
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
|
||||
ln -s /opt/microsoft/powershell/$POWERSHELL_VERSION/pwsh $POWERSHELL_LINKFILE
|
||||
# Add the symbolic link path to /etc/shells
|
||||
if [ ! -f /etc/shells ] ; then
|
||||
if [ ! -f /etc/shells ]; then
|
||||
echo $POWERSHELL_LINKFILE > /etc/shells ;
|
||||
else
|
||||
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
|
||||
```
|
||||
|
||||
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
|
||||
|
||||
|
@ -17,7 +17,7 @@ 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 yum install -y $PACKAGENAME
|
||||
RUN curl -L -o $PACKAGENAME $PACKAGELOCATION/$PACKAGENAME \
|
||||
&& yum 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"
|
||||
|
@ -23,8 +23,8 @@ 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
|
||||
RUN mkdir -p /opt/microsoft/powershell \
|
||||
&& tar zxf $PACKAGENAME -C /opt/microsoft/powershell
|
||||
|
||||
# Download and run tests
|
||||
RUN $TESTDOWNLOADCOMMAND
|
||||
|
@ -30,8 +30,8 @@ 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
|
||||
RUN mkdir -p /opt/microsoft/powershell \
|
||||
&& tar zxf $PACKAGENAME -C /opt/microsoft/powershell
|
||||
|
||||
# Download and run tests
|
||||
RUN $TESTDOWNLOADCOMMAND
|
||||
|
@ -31,8 +31,8 @@ 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
|
||||
RUN mkdir -p /opt/microsoft/powershell \
|
||||
&& tar zxf $PACKAGENAME -C /opt/microsoft/powershell
|
||||
|
||||
# Download and run tests
|
||||
RUN $TESTDOWNLOADCOMMAND
|
||||
|
@ -23,8 +23,8 @@ 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
|
||||
RUN mkdir -p /opt/microsoft/powershell \
|
||||
&& tar zxf $PACKAGENAME -C /opt/microsoft/powershell
|
||||
|
||||
# Download and run tests
|
||||
RUN $TESTDOWNLOADCOMMAND
|
||||
|
@ -75,7 +75,6 @@ function Get-LinuxContainer
|
||||
Path = "$psscriptroot/../release/$os"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# Return a list of Windows Container Test Cases
|
||||
@ -130,7 +129,7 @@ function Test-SkipLinux
|
||||
return $true
|
||||
}
|
||||
default {
|
||||
throw "Unknow docker os '$os'"
|
||||
throw "Unknown docker os '$os'"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user