forked from kelseyhightower/confd
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
80 lines (79 loc) · 3.76 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
language: go
go:
- '1.12'
# - tip
# go_import_path: github.com/kelseyhightower/confd
env:
#- GO111MODULE=on VAULT_ADDR='http://127.0.0.1:8200' CONSUL_VERSION=0.9.3 ETCD_VERSION=3.4.3 DYNAMODB_VERSION=2017-02-16 VAULT_VERSION=0.10.1 ZOOKEEPER_VERSION=3.4.10 RANCHER_VERSION=0.6.0
- GO111MODULE=on
# services:
# - redis
#before_install:
# # install consul
# - wget https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_linux_amd64.zip
# - unzip consul_${CONSUL_VERSION}_linux_amd64.zip
# - sudo mv consul /bin/
# - consul agent -server -bootstrap-expect 1 -data-dir /tmp/consul -bind 127.0.0.1 &
# # install etcd
# - wget https://github.com/coreos/etcd/releases/download/v${ETCD_VERSION}/etcd-v${ETCD_VERSION}-linux-amd64.tar.gz
# - tar xzf etcd-v${ETCD_VERSION}-linux-amd64.tar.gz
# - sudo mv etcd-v${ETCD_VERSION}-linux-amd64/etcd /bin/
# - sudo mv etcd-v${ETCD_VERSION}-linux-amd64/etcdctl /bin/
# - unset ETCD_VERSION
# - etcd &
# # install DynamoDB
# - sudo pip install awscli
# - mkdir /tmp/dynamodb
# - wget -O - https://s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_${DYNAMODB_VERSION}.tar.gz | tar xz --directory /tmp/dynamodb
# - java -Djava.library.path=/tmp/dynamodb/DynamoDBLocal_lib -jar /tmp/dynamodb/DynamoDBLocal.jar -inMemory &
# # Install rancher metadata
# - wget https://github.com/rancher/rancher-metadata/releases/download/v${RANCHER_VERSION}/rancher-metadata.tar.gz
# - mkdir -p ./rancher-metadata
# - tar xzf rancher-metadata.tar.gz --strip-components=1 -C ./rancher-metadata
# - sudo mv ./rancher-metadata/bin/rancher-metadata /bin/
# # Install vault
# - wget https://releases.hashicorp.com/vault/${VAULT_VERSION}/vault_${VAULT_VERSION}_linux_amd64.zip
# - unzip vault_${VAULT_VERSION}_linux_amd64.zip
# - sudo mv vault /bin/
# - vault server -dev &
# # Install zookeeper
# - wget http://www.eu.apache.org/dist/zookeeper/zookeeper-${ZOOKEEPER_VERSION}/zookeeper-${ZOOKEEPER_VERSION}.tar.gz
# - tar xzf zookeeper-${ZOOKEEPER_VERSION}.tar.gz
# - mkdir /tmp/zookeeper && cp integration/zookeeper/zoo.cfg zookeeper-${ZOOKEEPER_VERSION}/conf/zoo.cfg
# - zookeeper-${ZOOKEEPER_VERSION}/bin/zkServer.sh start
# # Run AWS SSM mocking server
# - go run ./integration/ssm/main.go &
install:
- make build
- sudo make install
script:
- make test
- make integration
before_deploy:
- |
for PLATFORM in windows linux darwin; do
EXTENSION=""
if [[ $PLATFORM = 'windows' ]]; then
EXTENSION=".exe"
fi
export GOOS=$PLATFORM
export GOARCH=amd64
export CGO_ENABLED=0
OUT_FILE="$GOPATH/bin/confd-$PLATFORM$EXTENSION"
echo "Creating $OUT_FILE ($TRAVIS_TAG)"
go build -ldflags "-X main.Version=$TRAVIS_TAG" -o $OUT_FILE
done
ls -lrt $GOPATH/bin
deploy:
provider: releases
# travis encrypt -r pastdev/confd <YOUR_API_KEY> --add deploy.api-key
api-key:
secure: ODPCQhHMrf57l5I/B5xmeGQdhQc51Csv9Ap9NZfZcquwELxN49wZenkA9KezJXLBn5/4SLbBkIooin5xgLF2xTSNtQlGcvWdE0dMBGOxJTTG/chqQqJORSrqIXXEwmry0Rr7tHyOCYwexdyhFtJWzutupU2KgY0nJJ++HeDHiauFuREPnqzxdo+fCbeOyXezbBJcPHwoJmT/Q5orFWJGqVZPr67+aG7Rp70o65PNOXiDuMPJaosOeKR/XI82AdA0mj+6bnNox4900cOlApJGP7NeC/vuRE10Wku9u5u8ZhbG4Cr9DZwLu8WjwMFsmOxh1ZKKh2p4owysTAk5KSdw2L+Q0N4O2GcKL/DGiTA7p4+e7MZITX3uTdJ1vYIuISdTxsNdFyy23LX/cJ4dHhUD/MbiEIbS5l9PhMa7kNUD3bpz+bTYxBRXt9xYelgOjE4Zp4yGSnUdpFJtRbQF0s88tQdF1gf3NfKs7VceCgBRW4sa5PYbtl38oz+1OxK1DB4Q5HsXjEHR+xrYuxLRFPWTms4M4SRds0wI/YlF1xhuLyy1sZ2SF8tqpNbn8j2UhY9NR8ztYl8twJpJKkrwsDqZ3AeKHD6FgcZFJ0kZsTeXgNNygD759nRxws5+ml6IwTjSn6SIIHZFiT7tz9iXOmTUiBXWvrtbCYHFJBF7V5QBJ7Q=
file:
- "$GOPATH/bin/confd-linux"
- "$GOPATH/bin/confd-darwin"
- "$GOPATH/bin/confd-windows.exe"
skip_cleanup: true
on:
condition: $TRAVIS_GO_VERSION = "1.12"
tags: true