aboutsummaryrefslogtreecommitdiff
blob: 874e1cec20f5be9d4d5b0db6cf51c1127796b8b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
services: docker
language: bash
env:
  global:
    - ORG=gentoo
  matrix:
    - TARGET=portage
    - TARGET=stage3-amd64
    - TARGET=stage3-amd64-hardened
    - TARGET=stage3-amd64-hardened-nomultilib
    - TARGET=stage3-amd64-nomultilib
    - TARGET=stage3-amd64-systemd
    - TARGET=stage3-amd64-musl-vanilla
    - TARGET=stage3-amd64-musl-hardened
    - TARGET=stage3-x86
    - TARGET=stage3-x86-hardened
    - TARGET=stage3-armv7a
    - TARGET=stage3-x86-musl-vanilla
    - TARGET=stage3-ppc
    - TARGET=stage3-ppc64
    - TARGET=stage3-ppc64le

before_install:
  # Install latest Docker
  - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
  - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
  - sudo apt-get update -qq
  - sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
  - echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json
  - sudo apt-get install qemu-user-static binfmt-support
  - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
script:
  - VERSION="$(date -u +%Y%m%d)"
  - sudo ./build.sh
  - if [[ "${TARGET}" == stage* ]]; then 
    sudo docker run -it --rm ${ORG}/${TARGET}:${VERSION} /bin/bash -c "emerge --info" ;
    fi

# Travis is set up to push daily to dockerhub
after_success:
  - if [[ "${TRAVIS_PULL_REQUEST_BRANCH:-${TRAVIS_BRANCH}}" == "master" && "${TRAVIS_EVENT_TYPE}" == "cron" ]]; then
    VERSION=$(date -u +%Y%m%d);
    echo "${DOCKER_PASSWORD}" | docker login -u="${DOCKER_USERNAME}" --password-stdin;
    docker push "${ORG}/${TARGET}:latest";
    docker push "${ORG}/${TARGET}:${VERSION}";
    fi