Add initial .travis.yml

This commit is contained in:
Tilo Spannagel 2017-03-14 10:48:58 +01:00
parent b9bae3112c
commit 8389d9659d
No known key found for this signature in database
GPG Key ID: B89F1626A58E1429
2 changed files with 35 additions and 0 deletions

25
.travis.yml Normal file
View File

@ -0,0 +1,25 @@
language: bash
services: docker
env:
- VERSION=11.0 VARIANT=fpm
- VERSION=11.0 VARIANT=apache
- VERSION=10.0 VARIANT=fpm
- VERSION=10.0 VARIANT=apache
- VERSION=9.0 VARIANT=fpm
- VERSION=9.0 VARIANT=apache
install:
- git clone https://github.com/docker-library/official-images.git ~/official-images
before_script:
- env | sort
- cd "$VERSION"
- image="nextcloud:${VERSION}${VARIANT:+-$VARIANT}"
script:
- travis_retry docker build -t "$image" "${VARIANT}"
- ~/official-images/test/run.sh "$image"
after_script:
- docker images

View File

@ -15,6 +15,7 @@ latests=( $(curl -sSL 'https://nextcloud.com/changelog/' |tac|tac| \
grep -o "\(Version\|Release\)\s\+[[:digit:]]\+\(\.[[:digit:]]\+\)\+" | \
awk '{ print $2 }' | sort -V ) )
travisEnv=
for latest in "${latests[@]}"; do
version=$(echo "$latest" | cut -d. -f1-2)
@ -44,5 +45,14 @@ for latest in "${latests[@]}"; do
# Copy the docker-entrypoint.
cp docker-entrypoint.sh "$version/$variant/docker-entrypoint.sh"
travisEnv='\n - VERSION='"$version"' VARIANT='"$variant$travisEnv"
done
done
# update .travis.yml
travis="$(awk -v 'RS=\n\n' '$1 == "env:" { $0 = "env:'"$travisEnv"'" } { printf "%s%s", $0, RS }' .travis.yml)"
echo "$travis" > .travis.yml
# remove duplicate entries
echo "$(awk '!NF || !seen[$0]++' .travis.yml)" > .travis.yml