Skip to content

Commit

Permalink
Merge pull request #54 from StefanScherer/deprecated-docker-package
Browse files Browse the repository at this point in the history
Deprecate docker package
  • Loading branch information
StefanScherer authored Jan 21, 2019
2 parents b2f6362 + a0a6972 commit 0ae7fba
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 71 deletions.
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 18.09.0.{build}
version: 99.0.0.{build}
environment:
TOKEN:
secure: TihxnYdIwtxnhS568XO7PECa6ETPBcTk2fUSgO8wq60c75Io9xPXE3TtLCBf5D6h
Expand Down
13 changes: 7 additions & 6 deletions docker.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
<metadata>
<!-- Read this before publishing packages to chocolatey.org: https://github.com/chocolatey/chocolatey/wiki/CreatePackages -->
<id>docker</id>
<title>Docker CLI</title>
<version>18.09.0</version>
<title>[Deprecated] Docker CLI</title>
<version>99.0.0</version>
<authors>Docker Contributors</authors>
<owners>ahmetalpbalkan</owners>
<summary>Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications.</summary>
<description>Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications. This package contains the docker client for Windows and not the Docker engine to run containers on Windows hosts.

NOTE: Docker client for Windows is not a Docker container engine for Windows. You can use this to manage your Linux and Windows machines running as Docker hosts. You might want to have a look at the "docker-for-windows" package.</description>
<summary>This package is replaced by `docker-cli` to make it more obvious what's getting installed.</summary>
<description>This package is replaced by `docker-cli` to make it more obvious what's getting installed.</description>
<projectUrl>https://www.docker.com</projectUrl>
<projectSourceUrl>https://github.com/docker/cli</projectSourceUrl>
<tags>docker devops containers</tags>
Expand All @@ -24,6 +22,9 @@ NOTE: Docker client for Windows is not a Docker container engine for Windows. Yo
<iconUrl>https://raw.githubusercontent.com/ahmetb/docker-chocolatey/4be06de6bf48c35ddfc871bcf508a2d8308167d4/docker.png</iconUrl>
<packageSourceUrl>https://github.com/ahmetb/docker-chocolatey</packageSourceUrl>
<releaseNotes>Updated to the latest Docker version.</releaseNotes>
<dependencies>
<dependency id="docker-cli" version="18.09.0" />
</dependencies>
</metadata>
<files>
<file src="tools\**" target="tools" />
Expand Down
20 changes: 11 additions & 9 deletions test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,25 @@ if ($spec.package.metadata.version.CompareTo($version)) {
"TEST: Package should contain only install script"
Add-Type -assembly "system.io.compression.filesystem"
$zip = [IO.Compression.ZipFile]::OpenRead("$pwd\docker.$version.nupkg")
if ($zip.Entries.Count -ne 7) {
if ($zip.Entries.Count -ne 5) {
Write-Error "FAIL: Wrong count in nupkg!"
}
$zip.Dispose()

try {
. choco install -y docker -source .
Write-Error "FAIL: docker package could be installed"
} catch {
Write-Host "PASS: docker could not be installed as the dependency could not be found"
}

"TEST: Installation of package should work"
. choco install -y docker-cli -version 18.09.0
. choco install -y docker -source .

"TEST: Version of binary should match"
. docker --version
if (-Not $(docker --version).Contains("version $version,")) {
if (-Not $(docker --version).Contains("version 18.09.0,")) {
Write-Error "FAIL: Wrong version of docker installed!"
}

Expand All @@ -42,13 +50,7 @@ if (Test-Path $env:ChocolateyInstall\bin\docker-proxy.exe) {
Write-Error "FAIL: Docker proxy shim exists!"
}

"TEST: Uninstall show remove the binary"
"TEST: Uninstall should work"
. choco uninstall docker
try {
. docker
Write-Error "FAIL: docker binary still found"
} catch {
Write-Host "PASS: docker not found"
}

"TEST: Finished"
2 changes: 1 addition & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Build and test the docker NuGet package in a Windows container

docker build -t chocolatey - <<EOF
FROM microsoft/windowsservercore
FROM mcr.microsoft.com/windows/servercore:1809
ENV chocolateyUseWindowsCompression false
Expand Down
17 changes: 1 addition & 16 deletions tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
@@ -1,16 +1 @@
$packageName = 'docker'
$url = 'https://github.com/StefanScherer/docker-cli-builder/releases/download/18.09.0/docker.exe'
$checksum = '831d191ecb337889287630d4b89a24953f1416deb76f823f42f7101de23ce540'
$url64 = $url
$checksum64 = $checksum
$checksumType = 'sha256'
$checksumType64 = 'sha256'
$validExitCodes = @(0)

$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"

$file = "$($toolsDir)\docker.exe"

if (![System.IO.Directory]::Exists($toolsDir)) {[System.IO.Directory]::CreateDirectory($toolsDir)}

Get-ChocolateyWebFile $packageName $file $url $url64 $checksum $checksum64 $checksumType $checksumType64
Write-Warning 'This package is superseeded by docker-cli, you should install that package from now on.'
Empty file.
Empty file removed tools/docker/dockerd.exe.ignore
Empty file.
38 changes: 0 additions & 38 deletions update.sh

This file was deleted.

0 comments on commit 0ae7fba

Please sign in to comment.