forked from mittwald/servicegateway
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
57 lines (48 loc) · 1.44 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
language: go
os: linux
dist: xenial
go:
- '1.12'
services:
- docker
addons:
apt:
packages:
- curl
- bash
- wget
env:
global:
- GO111MODULE=on
- CGO_ENABLED=0
- GO_VERSION=1.12
- HELM_VERSION=v3.0.2
- GOLANG_LINT_VERSION=v1.23.7
install:
- wget https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz -O /tmp/helm.tar.gz
- tar xzf /tmp/helm.tar.gz -C /tmp --strip-components=1
- chmod +x /tmp/helm
- wget -O - -q https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANG_LINT_VERSION}
script:
- golangci-lint run || exit 1
- curl -sL https://git.io/goreleaser | bash -s -- --snapshot --skip-publish --rm-dist
- /tmp/helm template ./deploy/helm-chart/servicegateway/.
- /tmp/helm lint ./deploy/helm-chart/servicegateway/
before_deploy:
- docker login -u "${DOCKER_LOGIN_USERNAME}" -p "${DOCKER_LOGIN_PASSWORD}" quay.io
deploy:
- provider: script
cleanup: false
script: curl -sL https://git.io/goreleaser | bash -s -- --snapshot --skip-publish --rm-dist && docker push "quay.io/mittwald/servicegateway:latest"
on:
tags: false
branch: master
condition: $TRAVIS_OS_NAME = linux
- provider: script
cleanup: false
script: >-
curl -sL https://git.io/goreleaser | bash -s -- --rm-dist &&
bash ./scripts/bump-app-version.sh publish
on:
tags: true
condition: $TRAVIS_OS_NAME = linux