diff options
author | Tilo Spannagel <development@tilosp.de> | 2017-03-14 10:48:58 +0100 |
---|---|---|
committer | Tilo Spannagel <development@tilosp.de> | 2017-03-14 16:29:22 +0100 |
commit | 8389d9659d3b0fca075604b9359f82e224807761 (patch) | |
tree | c8eb525cafc87f069e80169e1ccb3fc66eb8f71e | |
parent | b9bae3112cf180622d749a540828ddf9590ca470 (diff) |
Add initial .travis.yml
-rw-r--r-- | .travis.yml | 25 | ||||
-rwxr-xr-x | update.sh | 10 |
2 files changed, 35 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..e8e5b113 --- /dev/null +++ b/.travis.yml @@ -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 @@ -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 |