Skip to content

Commit

Permalink
MINOR: Update TravisCI environment. Add Goreleaser configuration.
Browse files Browse the repository at this point in the history
* Use 2.1.0 dataplane for testing, pull binaries with curl and adapt for
  Goreleaser-based dataplane releases. Use HAProxy 2.1 when testing.
  Make sure to have enough time (600s) when doing Go tests.

* Add Goreleaser configuration that will build multiarch (386, amd64,
  arm and arm64) Linux builds. Add checksums and changelog to releases
  as well.
  • Loading branch information
dkorunic committed Oct 8, 2020
1 parent de98750 commit 8e6b384
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 16 deletions.
27 changes: 27 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- 386
- amd64
- arm
- arm64
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
21 changes: 6 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@ go:
- 1.x
sudo: false
before_script:
- sudo wget https://github.com/haproxytech/dataplaneapi/releases/download/v1.2.5/dataplaneapi -O /usr/local/bin/dataplaneapi
- sudo curl -sfSL https://github.com/haproxytech/dataplaneapi/releases/download/v2.1.0/dataplaneapi_2.1.0_Linux_x86_64.tar.gz -o dataplane.tar.gz
- sudo mkdir /tmp/dataplane
- sudo tar -xzf dataplane.tar.gz -C /tmp/dataplane --strip-components=1
- sudo mv /tmp/dataplane/dataplaneapi /usr/local/bin/dataplaneapi
- sudo chmod +x /usr/local/bin/dataplaneapi
- sudo apt-get install -y software-properties-common
- sudo add-apt-repository -y ppa:vbernat/haproxy-2.0
- sudo add-apt-repository -y ppa:vbernat/haproxy-2.1
- sudo apt-get update
- sudo apt-get install -y haproxy=2.0.\*
- sudo apt-get install -y haproxy=2.1.\*
- haproxy -vv
script: make travis
addons:
Expand All @@ -18,15 +21,3 @@ addons:
- libssl-dev
- zlib1g-dev
- libpcre3-dev
before_deploy:
- echo "Deploying $TRAVIS_TAG to GitHub releases"
- tar czf haproxy-connect.tar.gz haproxy-connect
deploy:
provider: releases
api_key:
secure: TcgCsEiX4V4mnkvogsYD1T9MtZETtugNk06rtRWxNxUChBmndyYk6fGE0dZRfZcBKY4Li9MsT3p9/Km8B36wBcu7w+t8hOC+qKZMfsXeFHtcOYETuRa1JhzUpeTisTgLd+JmYPUnffL7mxocWWCnenQkZW6+pLpYA3pE4JC7LmBr4UyuARC3u8zyXQ3q4FTUL2tzvA9BPRiZNDnIAapcA5h9cqMH0u7CwFbRnhGL6BbAav5SEALymlmQ48dqK2dhcbqgdxlxaf/9segEKJSEdSnUiHtlTKVCTd+o5gBF3qmF/EcpiO6Oy4RlGAqRtOsVl6x3/renRbJ3phys8ySYVb90/jsYAL2IsAuUDrW4lVLp7cwt7VckLhi2TzLjWOlZWg1MJti4sbfZ4b9EKGy3x2hnJz9xBSzDpi/VRWgIrmEOea2Agi4dVsBXppcB9AOsk9a/QK52AI3p5S+9wJteDVa6DuhY3vCK8Gm9Yir9evdOZpXXTd29J9uQxtlEqOHqFY0np3pu1yokpUVmKjIrgLHJ9dL0okLoPvcUpP2nrFFzzEYBe80TVCVo2mzek1nU0+NgVBpFzR54D/cN91lBcGMZLAiNALyqv49t4Wm5sm9dKHB0BnBxTY+MXWKsjq1ZvVABYrXTsB+p4xgNUhUGW9h1MW0d8I7W4ZC9F5JSktk=
file: haproxy-connect.tar.gz
skip_cleanup: true
on:
repo: criteo/haproxy-consul-connect
tags: true
2 changes: 1 addition & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $(BIN): $(SOURCES)
bin: $(BIN)

test:
go test -timeout 30s ${gobuild_args} ./...
go test -timeout 600s ${gobuild_args} ./...
check:
go fmt ./...
go vet ./...
Expand Down

0 comments on commit 8e6b384

Please sign in to comment.