2018-01-11 17:43:06 +00:00
|
|
|
---
|
2017-06-19 21:17:52 +00:00
|
|
|
language: go
|
2018-01-11 17:43:06 +00:00
|
|
|
|
2018-05-11 18:49:11 +00:00
|
|
|
services:
|
2020-01-06 09:18:25 +00:00
|
|
|
- docker
|
2018-05-11 18:49:11 +00:00
|
|
|
|
2018-01-11 17:43:06 +00:00
|
|
|
notifications:
|
|
|
|
email: false
|
|
|
|
|
|
|
|
before_install:
|
|
|
|
- sudo apt-get -qq update
|
|
|
|
- sudo apt-get install -y rpm
|
2020-01-06 09:18:25 +00:00
|
|
|
- pip install --user yamllint==1.18.0
|
2020-07-29 13:40:59 +00:00
|
|
|
- gem install --no-document fpm
|
2019-07-16 18:11:51 +00:00
|
|
|
- go get -t -v ./...
|
2020-10-01 15:37:38 +00:00
|
|
|
- |
|
|
|
|
if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then
|
|
|
|
echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
|
|
|
|
fi
|
2018-01-11 17:43:06 +00:00
|
|
|
|
2017-06-19 21:14:29 +00:00
|
|
|
script:
|
2020-01-06 09:18:25 +00:00
|
|
|
- yamllint -c ./.yamllint.yaml .
|
2020-09-14 06:26:29 +00:00
|
|
|
|
|
|
|
# Run unit and integration tests
|
|
|
|
- make tests
|
|
|
|
- make integration-tests
|
|
|
|
|
|
|
|
# Build a local container image to test that the install sub-command works
|
2019-11-26 16:20:05 +00:00
|
|
|
- IMAGE_NAME=kube-bench make build-docker
|
2020-01-06 09:18:25 +00:00
|
|
|
- docker run -v `pwd`:/host kube-bench install
|
2018-05-11 18:49:11 +00:00
|
|
|
- test -d cfg
|
|
|
|
- test -f kube-bench
|
2020-09-14 06:26:29 +00:00
|
|
|
# Build and push the multi-arch Docker image
|
2020-10-01 15:37:38 +00:00
|
|
|
- |
|
|
|
|
if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then
|
|
|
|
make docker
|
|
|
|
fi
|
2020-01-06 09:18:25 +00:00
|
|
|
|
2018-01-11 17:43:06 +00:00
|
|
|
after_success:
|
2019-07-16 18:11:51 +00:00
|
|
|
- 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"
|
2018-01-26 19:43:20 +00:00
|
|
|
|
2018-01-14 23:24:42 +00:00
|
|
|
env:
|
|
|
|
global:
|
|
|
|
secure: mb8AYZKDo6hkKN+2F9ldXcw27Yn2AfxpXvKlD8GD7NdGOI+TaiSFbE0I+qqTa/1DqcRekCQwqN7OG/17s9JDkgzUXYuYUGlVUOM4WbeJoSlzJFIOh9r9R/JddluYJohypgkE20IBHIrEHq5sY0Nn1Pl9WgSQFaVcQjxkX009AOuVjN0o5HcoXsb5hAzvHrpoSPkcSSqq7VWab60TgUttVaRlZSGwGdSYQEqk5TdO0hWHuXyxaaEPybgFIyZLLbxPS4JmMz8n3Sngetpw9Jgc+V9Fc7wKXpjvZZ33SpArG5p5ZFFu2YQOXFLZth9qtQOjduQ2gU1kHN6WjWnJ8QX2s8vmU38Tk19kd5i+mz9dvc87IdBvmTIqVYSpM6AAYa2osBGP3f97Rj2S68lTad4ecSVyHdsjz56vdE3ZH4wskswmogbKkVdvO4biPHxT6odszBxYLEJuRJyZ7ckXd52MCzqAUPrw7YUuH8N1mLIlf7V5bW5R+q4DlKw774zxnHiWrymXGvlINSrB0qxBn8Fii6ib+Pacl3PuqSumCcgIHlVjqrzIXaqcTMn2/ABZYC99mralGvwA/EgNa8CBKB5evMCEwWa5Ntvcs2I2DFcO5Q2WzN4H0YScyAzzCzK7/3hWJE/rUIJntwiSXkV3MSa1yxWSGGH8F1lcz+lzgTBm/MU=
|
2019-07-16 18:11:51 +00:00
|
|
|
matrix:
|
|
|
|
- GO111MODULE=on
|