forked from turbonomic/kubeturbo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
39 lines (32 loc) · 2.64 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
language: go
env:
global:
- DOCKER_IMAGE_NAME=$TRAVIS_REPO_SLUG
services:
- docker
go:
- 1.14
go_import_path: github.com/turbonomic/kubeturbo
before_install:
- go get -v github.com/mattn/goveralls@HEAD
script:
- make fmtcheck
- make vet
- make build
- $HOME/gopath/bin/goveralls -v -race -service=travis-ci -package='github.com/turbonomic/kubeturbo/cmd/kubeturbo github.com/turbonomic/kubeturbo/cmd/kubeturbo/app github.com/turbonomic/kubeturbo/pkg github.com/turbonomic/kubeturbo/pkg/action github.com/turbonomic/kubeturbo/pkg/action/executor github.com/turbonomic/kubeturbo/pkg/action/util github.com/turbonomic/kubeturbo/pkg/cluster github.com/turbonomic/kubeturbo/pkg/discovery github.com/turbonomic/kubeturbo/pkg/discovery/configs github.com/turbonomic/kubeturbo/pkg/discovery/detectors github.com/turbonomic/kubeturbo/pkg/discovery/dtofactory github.com/turbonomic/kubeturbo/pkg/discovery/dtofactory/property github.com/turbonomic/kubeturbo/pkg/discovery/metrics github.com/turbonomic/kubeturbo/pkg/discovery/monitoring github.com/turbonomic/kubeturbo/pkg/discovery/monitoring/kubelet github.com/turbonomic/kubeturbo/pkg/discovery/monitoring/master github.com/turbonomic/kubeturbo/pkg/discovery/monitoring/types github.com/turbonomic/kubeturbo/pkg/discovery/processor github.com/turbonomic/kubeturbo/pkg/discovery/repository github.com/turbonomic/kubeturbo/pkg/discovery/stitching github.com/turbonomic/kubeturbo/pkg/discovery/task github.com/turbonomic/kubeturbo/pkg/discovery/util github.com/turbonomic/kubeturbo/pkg/discovery/worker github.com/turbonomic/kubeturbo/pkg/discovery/worker/aggregation github.com/turbonomic/kubeturbo/pkg/discovery/worker/compliance github.com/turbonomic/kubeturbo/pkg/kubeclient github.com/turbonomic/kubeturbo/pkg/registration github.com/turbonomic/kubeturbo/pkg/resourcemapping github.com/turbonomic/kubeturbo/pkg/turbostore github.com/turbonomic/kubeturbo/pkg/util github.com/turbonomic/kubeturbo/pkg/discovery/worker/k8sappcomponents'
- cp ./kubeturbo build
- cd build
- docker build -t $DOCKER_IMAGE_NAME --build-arg GIT_COMMIT=$TRAVIS_COMMIT --label "git-version=$TRAVIS_COMMIT" .
after_success:
- |
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
if [ -n "$TRAVIS_TAG" ]; then
# Push a release image triggered by a git tag
docker tag $DOCKER_IMAGE_NAME $DOCKER_IMAGE_NAME:$TRAVIS_TAG
docker push $DOCKER_IMAGE_NAME:$TRAVIS_TAG
elif [ "$TRAVIS_BRANCH" == "master" ]; then
# Push the latest image built from master branch
docker push $DOCKER_IMAGE_NAME
fi
fi