2018-05-24 21:20:25 +02:00
|
|
|
dist: trusty
|
|
|
|
sudo: required
|
|
|
|
|
2018-05-18 21:20:22 +02:00
|
|
|
services: docker
|
|
|
|
|
2018-05-24 21:20:25 +02:00
|
|
|
language: bash
|
|
|
|
|
|
|
|
stages:
|
|
|
|
- test scripts
|
|
|
|
# small tests for PRs
|
|
|
|
- name: test images (amd64)
|
|
|
|
if: branch != master
|
|
|
|
# full test for master
|
|
|
|
- name: test images (full)
|
|
|
|
if: branch = master
|
2018-12-13 19:43:45 +01:00
|
|
|
# build and push for master
|
|
|
|
- name: deploy
|
|
|
|
if: branch = master
|
2018-05-18 21:20:22 +02:00
|
|
|
|
|
|
|
install:
|
|
|
|
- git clone https://github.com/docker-library/official-images.git ~/official-images
|
|
|
|
|
|
|
|
before_script:
|
|
|
|
- env | sort
|
2018-05-24 21:20:25 +02:00
|
|
|
- image="friendica/server:${VERSION}${VARIANT:+-$VARIANT}"
|
|
|
|
- if [[ "$ARCH" == 'i386' ]]; then sed -i -e 's/FROM php/FROM i386\/php/g' "${VERSION}/${VARIANT}/Dockerfile"; fi
|
2018-05-18 21:20:22 +02:00
|
|
|
|
|
|
|
script:
|
2018-05-24 21:20:25 +02:00
|
|
|
- travis_retry docker build -t "$image" "${VERSION}/${VARIANT}"
|
2018-05-18 21:20:22 +02:00
|
|
|
- ~/official-images/test/run.sh "$image"
|
2018-05-24 21:20:25 +02:00
|
|
|
- .travis/test-example-dockerfiles.sh "$image"
|
2018-05-18 21:20:22 +02:00
|
|
|
|
|
|
|
after_script:
|
2018-05-24 21:20:25 +02:00
|
|
|
- docker images
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
include:
|
|
|
|
- &test-scripts
|
|
|
|
stage: test scripts
|
|
|
|
env: SCRIPT=update.sh
|
|
|
|
sudo: false
|
|
|
|
services: []
|
|
|
|
install: skip
|
|
|
|
before_script: skip
|
|
|
|
script:
|
|
|
|
- hash_before=$(git write-tree)
|
|
|
|
- ./update.sh
|
|
|
|
- bash -c "[[ $hash_before = $(git add -A && git write-tree) ]]"
|
|
|
|
after_script: skip
|
|
|
|
|
|
|
|
- <<: *test-scripts
|
|
|
|
env: SCRIPT=generate-stackbrew-library.sh
|
|
|
|
install:
|
|
|
|
- wget -O "$HOME/bin/bashbrew" https://doi-janky.infosiftr.net/job/bashbrew/lastSuccessfulBuild/artifact/bin/bashbrew-amd64
|
|
|
|
- chmod +x "$HOME/bin/bashbrew"
|
|
|
|
script:
|
|
|
|
- ./generate-stackbrew-library.sh
|
|
|
|
|
|
|
|
- stage: test images (amd64)
|
2018-09-09 22:22:24 +02:00
|
|
|
env: VERSION=2018.09 VARIANT=fpm-alpine ARCH=amd64
|
|
|
|
- env: VERSION=2018.09 VARIANT=fpm ARCH=amd64
|
|
|
|
- env: VERSION=2018.09 VARIANT=apache ARCH=amd64
|
|
|
|
- env: VERSION=2018.12-dev VARIANT=fpm-alpine ARCH=amd64
|
|
|
|
- env: VERSION=2018.12-dev VARIANT=fpm ARCH=amd64
|
|
|
|
- env: VERSION=2018.12-dev VARIANT=apache ARCH=amd64
|
2018-12-13 14:35:00 +01:00
|
|
|
- env: VERSION=2018.12-rc VARIANT=fpm-alpine ARCH=amd64
|
|
|
|
- env: VERSION=2018.12-rc VARIANT=fpm ARCH=amd64
|
|
|
|
- env: VERSION=2018.12-rc VARIANT=apache ARCH=amd64
|
2018-05-24 21:20:25 +02:00
|
|
|
|
|
|
|
- stage: test images (full)
|
2018-09-09 22:22:24 +02:00
|
|
|
env: VERSION=2018.09 VARIANT=fpm-alpine ARCH=amd64
|
|
|
|
- env: VERSION=2018.09 VARIANT=fpm-alpine ARCH=i386
|
|
|
|
- env: VERSION=2018.09 VARIANT=fpm ARCH=amd64
|
|
|
|
- env: VERSION=2018.09 VARIANT=fpm ARCH=i386
|
|
|
|
- env: VERSION=2018.09 VARIANT=apache ARCH=amd64
|
|
|
|
- env: VERSION=2018.09 VARIANT=apache ARCH=i386
|
|
|
|
- env: VERSION=2018.12-dev VARIANT=fpm-alpine ARCH=amd64
|
|
|
|
- env: VERSION=2018.12-dev VARIANT=fpm-alpine ARCH=i386
|
|
|
|
- env: VERSION=2018.12-dev VARIANT=fpm ARCH=amd64
|
|
|
|
- env: VERSION=2018.12-dev VARIANT=fpm ARCH=i386
|
|
|
|
- env: VERSION=2018.12-dev VARIANT=apache ARCH=amd64
|
|
|
|
- env: VERSION=2018.12-dev VARIANT=apache ARCH=i386
|
2018-12-13 14:35:00 +01:00
|
|
|
- env: VERSION=2018.12-rc VARIANT=fpm-alpine ARCH=amd64
|
|
|
|
- env: VERSION=2018.12-rc VARIANT=fpm-alpine ARCH=i386
|
|
|
|
- env: VERSION=2018.12-rc VARIANT=fpm ARCH=amd64
|
|
|
|
- env: VERSION=2018.12-rc VARIANT=fpm ARCH=i386
|
|
|
|
- env: VERSION=2018.12-rc VARIANT=apache ARCH=amd64
|
|
|
|
- env: VERSION=2018.12-rc VARIANT=apache ARCH=i386
|
2018-12-13 19:43:45 +01:00
|
|
|
|
|
|
|
- stage: deploy
|
|
|
|
env: SCRIPT=build_and_push.sh
|
|
|
|
script: skip
|
|
|
|
deploy:
|
|
|
|
provider: script
|
|
|
|
script: ./build_and_push.sh
|