forked from openshift-labs/starter-guides
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OLD.travis.yml
28 lines (22 loc) · 869 Bytes
/
OLD.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
dist: trusty
sudo: required
language: python
python: "2.7"
services:
- docker
env:
- ANSIBLE_ROLES_PATH=$ANSIBLE_ROLES_PATH:$PWD/apb/roles
before_install:
- docker login quay.io -u $DOCKER_USER -p $DOCKER_PASS
install:
- pip install ansible
- ansible-galaxy install -r apb/requirements-travis.yml
- ansible-playbook apb/playbooks/provision.yml --syntax-check
script:
- cd apb && docker build -t quay.io/openshiftapb/starter-workshop-apb:$TRAVIS_COMMIT .
after_success:
- if [ "$TRAVIS_BRANCH" == "master" ]; then export TAG="latest"; else export TAG=$TRAVIS_BRANCH ; fi
- echo "Branch=$TRAVIS_BRANCH Tag=$TAG"
- docker tag openshiftapb/starter-workshop-apb:$TRAVIS_COMMIT openshiftapb/starter-workshop-apb:$TAG
- echo "Pushing image to Docker hub: openshiftapb/starter-workshop-apb:$TAG"
- docker push openshiftapb/starter-workshop-apb:$TAG