-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
45 lines (41 loc) · 2.75 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
language: go
go:
- 1.15.x
env:
global:
- secure: ZkXULu7D0WlqpR9H/Uh4W4vZH38R3tA1lpTgfZTfiN+DdIJFljYI5mxjgYOttrfUTMdJJClRyx2zne1T7P6EhkUCEd/vjxNQszcho21YZ78JmbBOpVtKKWxseav0Yq1TJ3Y0YH2P7dv0HtgTnCC2CKsruy8fuZeK4jhx7m/YZ6lvtDmQ+L4IS59T6ZegcReqksRnV+mzQQVRswVzWekYnc6cB7xR3Sb+PmhdeJB8fWj4TOtwcF3xBw1kcPKmtkpKdDaVqnjLyMaQ60dQxyj114jJBAFJ19A7JM3+rI8WkhNygaMq5Q4KJsa0jNRICGDVAWkeLBOD2z7cUC+sXim7MuI36Wm+Ava0lY0AnjZttR1u2kKcuKUQ9NwaT+dvpH63naPj0OvEDuCVnrY8nxF6indF7urmzWrmz1RwfYVeFQIQsght/wue8ISGqLRX9qZnuopi9antAEGGNWhLLeUHZQMH/kG3JYv+QzRhxQygHyVaLzV6dcqh8+dmlPBjRh3II/HZBbERfxsa+z2oEPXXLC+ovUE4hHRjufzoxo8qAyz8tiU/3zpKViWpgciqe2T72NkAfs7mZ2hw1yGB3EJLla4jRQ/zzCEOWzXry7RrJJLdt4HGkMSthM8dwB1ufJOIEdmJuzAIeYxLfFWtSgXxjiEmsTHM4+i4IGf138LS2q8=
# build matrix doesn not play well with github releases deployment
# jobs:
# - GOARCH=amd64 GOOS=linux
# - GOARCH=amd64 GOOS=darwin
# - GOARCH=arm64 GOOS=linux
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- "./cc-test-reporter before-build"
script:
# - export JOB_GOOS=$(go env GOOS)
# - export JOB_GOARCH=$(go env GOARCH)
# - go build -o "consul_members_exporter-${JOB_GOOS}-${JOB_GOARCH}"
- go test -coverprofile c.out ${gobuild_args}
# instead of parallel execution of jobs (each producing an exectuable),
# running single one producing all files, in order to prevent racing conditions and work with github releases
- GOARCH=amd64 GOOS=linux go build -o "consul_members_exporter-linux-amd64"
- GOARCH=amd64 GOOS=darwin go build -o "consul_members_exporter-darwin-amd64"
- GOARCH=arm64 GOOS=linux go build -o "consul_members_exporter-linux-arm64"
after_script:
- "./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT -p $(go list -m)"
deploy:
before_deploy:
# - export JOB_GOOS=$(go env GOOS)
# - export JOB_GOARCH=$(go env GOARCH)
provider: releases
api_key:
secure: d+H8h1O36KqlJ4T30P/Ozvbj1NhIpvof0gWfpej1kxDOVr6ouCcTs3hPIsiCrNHwQ21yqqQPBc8BnQiUKlsWQ0LdnAi+gpBfPQNA5hHv1fYs93CBR85/SzCU/ECVF74uG/bXGJR02zo+orLfVmQ2WbIWeh/kPetB1Nak8z11HW/efLd4jsB6rGHen8O/J2/IjbmltSAC8BD0sMB5qvlIKfvNBvmoBnx1FcvUou1d5gKKC+4up4MMrsR3m4fnUpfyv8QBQNjAagsUkrhbK5CAPgot9tgzIGgtmyoOoYxwFGSQu6OGgzg05crVuQJGben2oL5SBld9w0JPGd4pQLOgZnmaDZwuR5roqmU8Om0YJJ+pqq93p8aeOrNxnM+B1Jw96jv/ahwN1dskglK8yhXIcwUrVl6p24hbhAJ6lYZaSuRqX824h+ZWH3fk29xrlwx3ONzCFU9gmRfQpA1zDWXk5lprmaC5F2PiqmWZeCfd9uii/aRNRJSmJKmxSC7qrDJCHI5x2LvEQ00TbP4gOSnSw6seF7Rx5nIhL2EerLS/Ds9MVnQlXjN5DJGuM8bMY+1H+TEk8LEbkYhUiX/JLvynMNQM689mtylkGBvQxofmnfqzqbsO2KvvV+KVX9oiCX87Ec0NUiGcXZKvdVITSq3oQ0T848YmHlkCOmdrWUlb3fc=
file_glob: true
# file: consul_members_exporter-${JOB_GOOS}-${JOB_GOARCH}
file: consul_members_exporter-*
skip_cleanup: true
overwrite: true
on:
tags: true