-
Notifications
You must be signed in to change notification settings - Fork 15
/
.travis.yml
60 lines (60 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
52
53
54
55
56
57
58
59
60
language: go
services:
- docker
os: linux
sudo: required
dist: trusty
go:
- 1.11.x
env:
global:
- CHANGE_MINIKUBE_NONE_USER=true
- TAG=${TRAVIS_TAG:=${TRAVIS_COMMIT}}
- GH_URL=https://amadeusitgroup.github.io/workflow-controller
- IMAGE_NAME=traviscontroller
matrix:
- CLUSTER=openshift
- CLUSTER=kubernetes
go_import_path: github.com/amadeusitgroup/workflow-controller
before_install:
# install nsenter for helm and port forwarding
- sudo apt-get -qq update
- sudo apt-get install -y socat
- docker run --rm jpetazzo/nsenter cat /nsenter > /tmp/nsenter && chmod +x /tmp/nsenter
- sudo cp /tmp/nsenter /usr/local/bin
- curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
script:
- ./hack/run-test-ci.sh
stages:
- name: docker-push
if: type NOT IN (pull_request)
- name: release
if: tag IS present
jobs:
include:
- stage: docker-push
name: docker-build
deploy:
- provider: script
script: echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin && cd $TRAVIS_BUILD_DIR && make TAG=$TRAVIS_BRANCH push
on:
branch: master
- stage: release
script:
- docker login -u "$DOCKER_USERNAME" p "$DOCKER_PASSWORD"
- curl -sL https://git.io/goreleaser | bash
deploy:
- provider: releases
api_key:
secure: $GITHUB_TOKEN
skip_cleanup: true
file:
- docs/workflow-controller-$TAG.tgz
on:
tags: true
branches:
only:
- master
- /^v\d+(\.\d+)+$/
after_success:
- bash <(curl -s https://codecov.io/bash) -f $TRAVIS_BUILD_DIR/.cover/cover.out