-
Notifications
You must be signed in to change notification settings - Fork 35
/
.travis.yml
83 lines (76 loc) · 1.98 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
sudo: false
dist: xenial
language: go
go:
- "1.15.3"
before_install:
- curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
stages:
- test
- build
- deploy
jobs:
include:
- stage: test
name: "Verify"
script:
- make checkfmt
- make fmt
- make vet
- make race
- make gocyclo
- make lint
- make ineffassign
- make misspell
- make helm_lint
- name: "Unit Test"
script:
- make test
- make benchmark
- make coverage
#- bash <(curl -s https://codecov.io/bash)
- name: "Compile"
stage: build
script:
- make
- stage: deploy
name: "GitHub Releases"
script:
- GOOS=linux GOARCH=amd64 BUILDPATH=./bin/node-cert-exporter-linux-amd64 make
- GOOS=linux GOARCH=arm BUILDPATH=./bin/node-cert-exporter-linux-arm make
- GOOS=linux GOARCH=arm64 BUILDPATH=./bin/node-cert-exporter-linux-arm64 make
- GOOS=windows GOARCH=amd64 BUILDPATH=./bin/node-cert-exporter-windows-amd64.exe make
- GOOS=darwin GOARCH=amd64 BUILDPATH=./bin/node-cert-exporter-darwin-amd64 make
deploy:
provider: releases
api_key: ${GITHUB_API_KEY}
file:
- bin/node-cert-exporter-linux-amd64
- bin/node-cert-exporter-linux-arm
- bin/node-cert-exporter-linux-arm64
- bin/node-cert-exporter-windows-amd64.exe
- bin/node-cert-exporter-darwin-amd64
skip_cleanup: true
draft: true
overwrite: true
on:
tags: true
- stage: deploy
name: "GitHub Pages - Helm Chart"
script:
- mkdir files-to-gh-pages
- helm package charts/node-cert-exporter -d files-to-gh-pages
- cp charts/node-cert-exporter/README.md files-to-gh-pages
- cd files-to-gh-pages
- helm repo index .
- ls -ltr
- cat index.yaml
deploy:
provider: pages
github_token: ${GITHUB_API_KEY}
local_dir: files-to-gh-pages
target_branch: gh-pages
skip_cleanup: true
keep_history: true
on:
tags: true