-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
42 lines (34 loc) · 1 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
40
41
42
language: bash
services: docker
env:
global:
- PROJECT=ansible
- NAMESPACE=plasmops
- PUSH_NAMESPACES=plasmops
- VERSION=2.7
- VERSION_PIN=<2.8
install:
- curl -sSL https://github.com/stackfeed/ci-scripts/raw/master/install.sh | sh -s -- -r v0.2
before_script:
- export PATH=$PATH:~/ci-scripts
script:
- |-
docker-build -v $VERSION -l $VERSION "$NAMESPACE/$PROJECT" \
--build-arg version_pin=${VERSION} \
--build-arg version_pin="${VERSION_PIN}" \
-f Dockerfile ./ || exit $?
# deploy containers to hub.docker.com
after_deploy:
- |
# Skip if we are not in the push namespace list
( echo "$PUSH_NAMESPACES" | grep -qw "${TRAVIS_REPO_SLUG%/*}" ) || exit 0
docker-push -r "^$NAMESPACE/$PROJECT:?.*"
# update microbadger
curl -XPOST "https://hooks.microbadger.com/images/${NAMESPACE}/${PROJECT}/${MICROBADGER_TOKEN}"
deploy:
- provider: script
script: /bin/true
on:
branch: master
after_script:
- docker images