-
Notifications
You must be signed in to change notification settings - Fork 32
/
.travis.yml
33 lines (27 loc) · 1.15 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
env:
global:
- REPO=siamaksade/openshift-demos-ansible
sudo: required
language: python
python: "2.7"
services:
- docker
before_install:
- docker login -u $DOCKER_USER -p $DOCKER_PASS
install:
- pip install ansible
- ansible-galaxy install -r playbooks/coolstore/requirements.yml
- ansible-playbook playbooks/coolstore/undeploy.yml --syntax-check
- ansible-playbook playbooks/coolstore/idle.yml --syntax-check
- ansible-playbook playbooks/coolstore/unidle.yml --syntax-check
- ansible-playbook playbooks/coolstore/imagebuild-pipeline.yml --syntax-check
- ansible-playbook playbooks/coolstore/msa-cicd-eap-full.yml --syntax-check
- ansible-playbook playbooks/coolstore/msa-cicd-eap-min.yml --syntax-check
- ansible-playbook playbooks/coolstore/msa-full.yml --syntax-check
- ansible-playbook playbooks/coolstore/msa-min.yml --syntax-check
script:
- docker build -f Dockerfile -t $REPO:dev .
after_success:
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
- docker tag $REPO:dev $REPO:$TAG
- docker push $REPO:$TAG