Add initial .travis.yml
This commit is contained in:
parent
7111ef75d6
commit
2273ec160e
|
|
@ -0,0 +1,29 @@
|
|||
language: bash
|
||||
|
||||
# for secret experimental features ;)
|
||||
sudo: 9000
|
||||
|
||||
env:
|
||||
- VERSION=9.5
|
||||
- VERSION=9.4
|
||||
- VERSION=9.3
|
||||
- VERSION=9.2
|
||||
- VERSION=9.1
|
||||
- VERSION=9.0
|
||||
|
||||
install:
|
||||
- git clone https://github.com/docker-library/official-images.git ~/official-images
|
||||
|
||||
before_script:
|
||||
- env | sort
|
||||
- cd "$VERSION"
|
||||
- image="postgres:$VERSION"
|
||||
|
||||
script:
|
||||
- docker build -t "$image" .
|
||||
- ~/official-images/test/run.sh "$image"
|
||||
|
||||
after_script:
|
||||
- docker images
|
||||
|
||||
# vim:set et ts=2 sw=2:
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
set -eo pipefail
|
||||
|
||||
cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
|
||||
|
||||
|
|
@ -13,6 +13,7 @@ packagesUrl='http://apt.postgresql.org/pub/repos/apt/dists/jessie-pgdg/main/bina
|
|||
packages="$(echo "$packagesUrl" | sed -r 's/[^a-zA-Z.-]+/-/g')"
|
||||
curl -sSL "${packagesUrl}.bz2" | bunzip2 > "$packages"
|
||||
|
||||
travisEnv=
|
||||
for version in "${versions[@]}"; do
|
||||
fullVersion="$(grep -m1 -A10 "^Package: postgresql-$version\$" "$packages" | grep -m1 '^Version: ' | cut -d' ' -f2)"
|
||||
(
|
||||
|
|
@ -21,6 +22,11 @@ for version in "${versions[@]}"; do
|
|||
mv "$version/Dockerfile.template" "$version/Dockerfile"
|
||||
sed -i 's/%%PG_MAJOR%%/'$version'/g; s/%%PG_VERSION%%/'$fullVersion'/g' "$version/Dockerfile"
|
||||
)
|
||||
|
||||
travisEnv='\n - VERSION='"$version$travisEnv"
|
||||
done
|
||||
|
||||
travis="$(awk -v 'RS=\n\n' '$1 == "env:" { $0 = "env:'"$travisEnv"'" } { printf "%s%s", $0, RS }' .travis.yml)"
|
||||
echo "$travis" > .travis.yml
|
||||
|
||||
rm "$packages"
|
||||
|
|
|
|||
Loading…
Reference in New Issue