This repository was archived by the owner on Jan 16, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.travis.yml
49 lines (43 loc) · 1.46 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
---
sudo: true
addons:
apt:
packages:
- python
- realpath
env:
global:
CONTAINER_REPO="gluster/gluster-mixins"
language: go
go:
# Kubernetes minimum_go_version can be found in this file:
# https://github.com/kubernetes/kubernetes/blob/master/hack/lib/golang.sh
- stable
install:
- go get github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb
- go get github.com/prometheus/prometheus/cmd/promtool
- git clone https://github.com/google/jsonnet ${TRAVIS_HOME}/jsonnet
- make -C ${TRAVIS_HOME}/jsonnet CC=clang CXX=clang++
- cp ${TRAVIS_HOME}/jsonnet/jsonnet ${TRAVIS_HOME}/gopath/bin
- jb install
script:
- set -o pipefail &&
find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print |
while read f; do
jsonnet fmt -n 2 --max-blank-lines 2 --string-style s --comment-style s "$f" | diff -u "$f" -;
done
- make all
- ./build.sh "${CONTAINER_REPO}"
deploy:
# Master branch will push the container to :latest
- provider: script
on: # yamllint disable-line rule:truthy
branch: master
script: .travis/push_container.sh ${CONTAINER_REPO} verbatim latest
# Tags of the form v + SEMVER (e.g., v1.2.3) will push to the
# corresponding container version number (e.g., :1.2.3).
- provider: script
on: # yamllint disable-line rule:truthy
tags: true
condition: $TRAVIS_TAG =~ ^v[0-9]+
script: .travis/push_container.sh ${CONTAINER_REPO} version "$TRAVIS_TAG"