-
Notifications
You must be signed in to change notification settings - Fork 62
/
.travis.yml
62 lines (62 loc) · 1.58 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
61
62
language: go
dist: trusty
sudo: required
go:
- 1.11.x
os: linux
services:
- docker
env:
global:
- CHANGE_MINIKUBE_NONE_USER=true
- TAG=${TRAVIS_TAG:=${TRAVIS_COMMIT}}
- GH_URL=https://amadeusitgroup.github.io/redis-operator
- IMAGE_NAME=traviscontroller
matrix:
- CLUSTER=openshift
- CLUSTER=kubernetes
go_import_path: github.com/amadeusitgroup/redis-operator
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: build
if: type NOT IN (pull_request)
- name: release
if: tag IS present
jobs:
include:
- stage: build
name: build
deploy:
- provider: script
script: echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin && cd $TRAVIS_BUILD_DIR && make TAG=master push
on:
branch: master
- stage: release
name: 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/helm-redis-cluster-$TAG.tgz
- docs/helm-redis-operator-$TAG.tgz
on:
tags: true
branches:
only:
- master
- /^v\d+(\.\d+)+$/
after_success:
- bash <(curl -s https://codecov.io/bash)