From 27a0d33d07ebaed87fb83c5044d7612931e23024 Mon Sep 17 00:00:00 2001 From: yoavrotems Date: Thu, 9 Jan 2020 16:25:56 +0000 Subject: [PATCH] chore: Configure goreleaser (#59) --- .gitignore | 1 + .goreleaser.yml | 28 ++++++++++++++++++++++++++++ .travis.yml | 8 ++++++++ 3 files changed, 37 insertions(+) create mode 100644 .goreleaser.yml diff --git a/.gitignore b/.gitignore index 8fc0fb6..93ca763 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.swp docker-bench coverage.txt +dist diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..f8d7bfe --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,28 @@ +env: + - GO111MODULE=on + - LINUXBENCH_CFG=/etc/docker-bench/cfg +builds: + - main: . + binary: docker-bench + goos: + - linux + goarch: + - amd64 + ldflags: + - "-X github.com/aquasecurity/docker-bench/root.cfgDir={{.Env.LINUXBENCH_CFG}}" +# Archive customization +archives: + - id: compress + format: tar.gz + files: + - "cfg/**/*" +nfpms: + - vendor: Aqua Security + description: "Checks whether Docker is deployed according to security best practices as defined in the CIS Docker Benchmark" + license: Apache-2.0 + homepage: https://github.com/aquasecurity/docker-bench + files: + "cfg/**/*": "/etc/docker-bench/cfg" + formats: + - deb + - rpm \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index c6723b8..ad8f014 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,14 @@ script: after_success: - bash <(curl -s https://codecov.io/bash) +deploy: + - provider: script + skip_cleanup: true + script: curl -sL https://git.io/goreleaser | bash + on: + tags: true + condition: "$TRAVIS_OS_NAME = linux" + env: matrix: - GO111MODULE=on