Skip to content

Commit ce421d4

Browse files
authored
Merge pull request docker-library#192 from infosiftr/appveyor
Add initial .appveyor.yml
2 parents 8c6dcf6 + 7a60976 commit ce421d4

File tree

2 files changed

+38
-4
lines changed

2 files changed

+38
-4
lines changed

.appveyor.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
version: build-{build}.{branch}
2+
image: Visual Studio 2017
3+
4+
environment:
5+
matrix:
6+
- version: 3.6
7+
variant: windowsservercore
8+
- version: 3.5
9+
variant: windowsservercore
10+
- version: 2.7
11+
variant: windowsservercore
12+
13+
install:
14+
- ps: |
15+
[Environment]::SetEnvironmentVariable('dockerImage', ('python:{0}' -f $env:version), [EnvironmentVariableTarget]::Process);
16+
[Environment]::SetEnvironmentVariable('buildDirectory', ('{0}/windows/{1}' -f $env:version, $env:variant), [EnvironmentVariableTarget]::Process);
17+
18+
build_script:
19+
- cmd: appveyor-retry docker build --pull -t %dockerImage% %buildDirectory%
20+
21+
after_build:
22+
- ps: docker images
23+
24+
test_script:
25+
- cmd: docker run --rm %dockerImage% python --version
26+
- cmd: docker run --rm %dockerImage% pip freeze --all

update.sh

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
set -e
2+
set -Eeuo pipefail
33
shopt -s nullglob
44

55
declare -A gpgKeys=(
@@ -48,9 +48,10 @@ generated_warning() {
4848
}
4949

5050
travisEnv=
51+
appveyorEnv=
5152
for version in "${versions[@]}"; do
52-
rcGrepV='-v'
5353
rcVersion="${version%-rc}"
54+
rcGrepV='-v'
5455
if [ "$rcVersion" != "$version" ]; then
5556
rcGrepV=
5657
fi
@@ -111,12 +112,19 @@ for version in "${versions[@]}"; do
111112
"$version"/{,*/,*/*/}Dockerfile
112113
)
113114
fi
114-
for variant in wheezy alpine slim; do
115+
for variant in wheezy alpine slim ''; do
115116
[ -d "$version/$variant" ] || continue
116117
travisEnv='\n - VERSION='"$version VARIANT=$variant$travisEnv"
117118
done
118-
travisEnv='\n - VERSION='"$version VARIANT=$travisEnv"
119+
for winVariant in windowsservercore nanoserver; do
120+
if [ -d "$version/windows/$winVariant" ]; then
121+
appveyorEnv='\n - version: '"$version"'\n variant: '"$winVariant$appveyorEnv"
122+
fi
123+
done
119124
done
120125

121126
travis="$(awk -v 'RS=\n\n' '$1 == "env:" { $0 = "env:'"$travisEnv"'" } { printf "%s%s", $0, RS }' .travis.yml)"
122127
echo "$travis" > .travis.yml
128+
129+
appveyor="$(awk -v 'RS=\n\n' '$1 == "environment:" { $0 = "environment:\n matrix:'"$appveyorEnv"'" } { printf "%s%s", $0, RS }' .appveyor.yml)"
130+
echo "$appveyor" > .appveyor.yml

0 commit comments

Comments
 (0)