This repository has been archived by the owner on Jul 27, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
39 lines (33 loc) · 1.97 KB
/
.travis.yml
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
sudo: required
language: bash
env:
global:
- "SRI_SHA512=bx2JCw5L5PIO0b6ek3HohFx3TsNuZsvCwuQKiwqoEqlmg9vDvlBVMzNvcmx3YEZniVXkf7z+uWnb5snZRE4Ong=="
- "SRI_SHA384=goNhuMdeesV5qJG7lmCG6dMGLYdw43Cne8Yo+OrVFcqVQ5HubiYMXitWbfU3+P5O"
- "SRI_SHA256=0wJ+yOaVEU4mV/5wHA+cnxymViCDcVTz5IRO0MhxSxw="
- "ISSO_VERSION=0.10.6"
services:
- docker
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y parallel openssl wget
script:
- docker build -t isso:testing .
# Run all tests from test directory
- ls tests/*.sh | parallel --joblog /tmp/joblog
- cat /tmp/joblog
after_success:
# Push successful builds of the master branch to Docker Hub
# You need to define $DOCKER_REPO_PREFIX, $DOCKER_REPO_NAME, $DOCKER_USERNAME and $DOCKER_PASSWORD in your Travis settings.
# $DOCKER_REPO_PREFIX - Organisation of username who owns the repo on Docker Hub
# $DOCKER_REPO_NAME - Repository name on Docker Hub
# $DOCKER_USERNAME - Docker Hub username used to push the image
# $DOCKER_PASSWORD - Password of the Docker Hub user used to push the image
# See https://docs.travis-ci.com/user/environment-variables/#Defining-Variables-in-Repository-Settings
- if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" == "master" ] && [ "$DOCKER_REPO_PREFIX" != "" ] && [ "$DOCKER_REPO_NAME" != "" ] && [ "$DOCKER_USERNAME" != "" ] && [ "$DOCKER_PASSWORD" != "" ]; then
tools/tagging.sh "${DOCKER_REPO_PREFIX}/${DOCKER_REPO_NAME}" "${ISSO_VERSION:-latest}" "";
docker images "${DOCKER_REPO_PREFIX}/${DOCKER_REPO_NAME}";
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
docker images --format "{{.Repository}}:{{.Tag}}" "${DOCKER_REPO_PREFIX}/${DOCKER_REPO_NAME}" | xargs -L 1 docker push ;
docker run --rm -v "$(pwd)/:/data/:ro" -e "DOCKERHUB_USERNAME=$DOCKER_USERNAME" -e "DOCKERHUB_PASSWORD=$DOCKER_PASSWORD" -e "DOCKERHUB_REPO_PREFIX=$DOCKER_REPO_PREFIX" -e "DOCKERHUB_REPO_NAME=$DOCKER_REPO_NAME" sheogorath/readme-to-dockerhub;
fi