forked from openstad/openstad-image-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
51 lines (45 loc) · 1.6 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
43
44
45
46
47
48
49
50
51
language: minimal
# easy way to get your local config: cat ${HOME}/.kube/config | base64 | pbcopy
env:
global:
- DOCKER_PUBLIC_USERNAME=openstad
- DOCKER_IMAGE_NAME=image
- K8S_DEPLOYMENT_NAME=openstad-image
- K8S_NAMESPACE=openstad
services:
- docker
before_install:
- echo ${DOCKER_PUBLIC_USERNAME}
- echo "$DOCKER_PUBLIC_USERNAME"
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin;
- echo ${DOCKER_PUBLIC_USERNAME}/${DOCKER_IMAGE_NAME}:${TRAVIS_BUILD_ID}
- docker build -t ${DOCKER_PUBLIC_USERNAME}/${DOCKER_IMAGE_NAME}:${TRAVIS_BUILD_ID} .
script:
# No tests yet
# - docker run -e CI=true ${DOCKER_PUBLIC_USERNAME}/${DOCKER_IMAGE_NAME}:${TRAVIS_BUILD_ID} env npm run test -- --coverage
- echo "skipping tests"
deploy:
# what branches to deploy automatically
- provider: script
script: bash docker_deploy
on:
all_branches: true
# @TODO:
# Add an autodeploy setup of the release branche
# Either Create different config in travis to deploy to different cluster
# Or add a different namespace for ACC
# condition: $TRAVIS_BRANCH =~ ^(development|release)$
condition: $TRAVIS_BRANCH =~ ^(development)$
# master automatically pushes new docker container with latest tag to docker
# master automatically pushes new docker container with latest tag to docker
- provider: script
#script not yet tested
script: bash docker_publish_latest
on:
branch: master
- provider: script
#script not yet tested
script: bash docker_publish_tag
on:
tags: true
all_branches: true