Skip to content
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
11 changes: 4 additions & 7 deletions docker/InstallTarballPackage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 ;
Expand Down
2 changes: 1 addition & 1 deletion docker/tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions docker/tests/Templates/centos7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docker/tests/Templates/fxdependent-fedora28/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docker/tests/Templates/fxdependent-ubuntu16.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docker/tests/Templates/fxdependent-ubuntu18.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions docker/tests/containerTestCommon.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ function Get-LinuxContainer
Path = "$psscriptroot/../release/$os"
}
}

}

# Return a list of Windows Container Test Cases
Expand Down Expand Up @@ -130,7 +129,7 @@ function Test-SkipLinux
return $true
}
default {
throw "Unknow docker os '$os'"
throw "Unknown docker os '$os'"
}
}
}
Expand Down