From 8e6b384b9fb9c853bf4e74e4ee94178236346417 Mon Sep 17 00:00:00 2001 From: Dinko Korunic Date: Thu, 8 Oct 2020 14:17:44 +0200 Subject: [PATCH] MINOR: Update TravisCI environment. Add Goreleaser configuration. * 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. --- .goreleaser.yml | 27 +++++++++++++++++++++++++++ .travis.yml | 21 ++++++--------------- GNUmakefile | 2 +- 3 files changed, 34 insertions(+), 16 deletions(-) create mode 100644 .goreleaser.yml diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..6d52942 --- /dev/null +++ b/.goreleaser.yml @@ -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:' diff --git a/.travis.yml b/.travis.yml index ed5c7f1..0866341 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: @@ -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 diff --git a/GNUmakefile b/GNUmakefile index fd0c62c..02e3659 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -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 ./...