This repository has been archived by the owner on Nov 9, 2022. It is now read-only.
This repository is currently being migrated. It's locked while the migration is in progress.
-
Notifications
You must be signed in to change notification settings - Fork 18
/
.travis.yml
92 lines (86 loc) · 3.86 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
sudo: required
language: go
go:
- "1.14.2"
env:
global:
- CHANGE_MINIKUBE_NONE_USER=true
- K8S_VERSION="v1.19.0"
- MINIKUBE_VERSION="v0.28.2"
- IMAGE_NAME=storageos/cluster-operator
- MANIFESTS_IMAGE_NAME=storageos/operator-manifests
before_install:
- |
if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md)|(\.MD)|(\.png)|(\.pdf)|^(doc/)|^(MAINTAINERS)|^(LICENSE)'; then
# Do not skip if it's a tagged build.
if [[ -z "$TRAVIS_TAG" ]]; then
echo "Only doc files were updated, not running the CI."
exit
fi
fi
- sudo apt -y update && sudo apt install -y jq
- curl -Lo yq https://github.com/mikefarah/yq/releases/download/2.3.0/yq_linux_amd64 && chmod +x yq && sudo mv yq /usr/local/bin/
- curl -Lo storageos https://github.com/storageos/go-cli/releases/download/1.0.0/storageos_linux_amd64 && chmod +x storageos && sudo mv storageos /usr/local/bin/
# code-generator is required for generating k8s clientset. The tool expects
# the a file to exist at $GOPATH/src/k8s.io/code-generator/hack/boilerplate.go.txt
# in order to generate the code. Code generation will be replaced by a dynamic
# client in the future.
- git clone --depth=1 https://github.com/kubernetes/code-generator $GOPATH/src/k8s.io/code-generator
# - docker run -d -p 2399:2399 quay.io/coreos/etcd:v3.3.10 /usr/local/bin/etcd -advertise-client-urls http://0.0.0.0:2399 -listen-client-urls http://0.0.0.0:2399
# Skip downloading deps.
install: true
jobs:
include:
# Temporary disable until:
# https://github.com/operator-framework/operator-registry/pull/466
# - go: "1.14"
# sudo: required
# env:
# - "INSTALL_METHOD=olm"
# name: OLM on KinD (k8s-1.19)
# script: ./test/e2e.sh $INSTALL_METHOD
- &base-test
go: "1.14"
sudo: required
env:
- "INSTALL_METHOD=none"
name: KinD (k8s-1.19)
before_script:
- |
if [ -n "$REGISTRY_USER" ] && [ -n "$REGISTRY_PASS" ]; then
docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS";
else
echo "Docker credentials not set. Skipping docker log in...";
fi
script: ./test/e2e.sh $INSTALL_METHOD
- stage: deploy
go: "1.14"
sudo: required
name: Publish Container Image
before_script:
- |
if [ -n "$REGISTRY_USER" ] && [ -n "$REGISTRY_PASS" ]; then
docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS";
else
echo "Docker credentials not set. Skipping docker log in...";
fi
script:
- |
(: ${TRAVIS_TAG:=develop} ; OPERATOR_IMAGE=$IMAGE_NAME:$TRAVIS_TAG MANIFESTS_IMAGE=$MANIFESTS_IMAGE_NAME:cluster-$TRAVIS_TAG make operator-image install-manifest manifests-image)
deploy:
- provider: script
script: bash scripts/deploy.sh tagged
on:
tags: true
- provider: releases
api_key:
secure: mVr6wWr4Tym729atwxNDDI64PjRdocWUMEb4gOM3gOJUo1BjdJ8D0UzzZJvctW8VdDe1SVZGgpLmFGNOBjP9APBjpTl1ZfQvhJ67urlIn3DCoxjFGTB+2+FM0PVV1FX8hQawy/uTtLHOY+4jrVqm2Av2t486613u++/CNkTZeZCW4ydv/lSOCZ3nieX9eCk13/E6bhrHSQxRFD5KgL5ji+5rzuBlJQ12uzEitxRSBRnBPXU19ZPjFOoR2vbxTzI64BfvhQJSzbdNQbwwPFkmZsYuEUHyu3+ZH8N+Rng/wBL4ejt/gOXIfcHjZ5iGPIhJ3lIaVaxI9L6hHsFh3/QI24arI36Wf31XwPav7m6B4irGNBgbJRr2hS0LbPj0nsguzp/yD4vvpKUwlUtib8PwCxen5snZAQFdNB35Y7K+rdY/xkzFPVXktGZuNd9qSiVzs+kwFFzL2qDVgS5Nap7gYpUEY8Rt0urNklwbvPVdO825an8Y/2f1aXG3yT2jVoLi8z+ON1NDjXAEGJAQp9fVA25iCiW/Bbs7LY0O3EvjudUDPHv+70Lb0etpeqmJVJHavMNqC6cTaVkQ76iEzr0SACwBjAXnJBSkaeh+7KDMZJQ85iGJWPz+p4GyJGXxdLej4TGWS/YO6K5p/eNi5cK2Lbx5iSvSrTyndOFymbsLa+Q=
file:
- storageos-operator.yaml
skip_cleanup: true
on:
tags: true
- provider: script
script: bash scripts/deploy.sh develop
on:
branch: master