-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alex Muravya
committed
Apr 9, 2021
1 parent
213d36a
commit 4a7720b
Showing
3 changed files
with
60 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,56 @@ | ||
# Matrix build runs 4 parallel builds | ||
matrix: | ||
include: | ||
- language: go # Build and Test | ||
sudo: required | ||
services: | ||
- docker | ||
script: | ||
- export GO111MODULE=on | ||
- go mod vendor # Download dependencies | ||
- make build # Build application | ||
- test -f bin/linux_amd64/honeypot # Test for presence of binary built in previous step | ||
- make all-container # Make all Docker containers | ||
- docker images | grep "^docker.pkg.github.com/kyberorg/honeypot/honeypot.*__linux_amd64" # Check presence of created images | ||
- make test # Runs tests inside test image | ||
|
||
- language: go # SonarCloud | ||
addons: | ||
sonarcloud: | ||
organization: kyberorg | ||
token: | ||
secure: "<token-here>" | ||
before_script: | ||
- ./reports.sh # Creates directories and files for reports | ||
- export GO111MODULE=on | ||
- go mod vendor # Download dependencies | ||
- make ci # Run tests and generate reports (See `ci` step in Makefile) | ||
script: | ||
- sonar-scanner # Run analysis using SonarCloud scanner plugin | ||
|
||
- language: go # CodeClimate | ||
before_script: | ||
- ./reports.sh # Create directories and files for reports | ||
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter # Download CodeClimate test reporter | ||
- chmod +x ./cc-test-reporter # Make it executable | ||
- ./cc-test-reporter before-build # Notify CodeClimate of pending report | ||
script: | ||
- export GO111MODULE=on | ||
- go mod vendor # Download dependencies | ||
- make ci # Run tests and generate reports (See `ci` step in Makefile) | ||
after_script: | ||
- ./cc-test-reporter after-build -t gocov --exit-code $TRAVIS_TEST_RESULT # Send report to CodeClimate or notify it of failing build based on exit code | ||
|
||
- language: go # Push if on trunk | ||
services: | ||
- docker | ||
if: branch = trunk | ||
script: | ||
- export GO111MODULE=on | ||
- go mod vendor # Download dependencies | ||
- echo "$DOCKER_PASSWORD" | docker login docker.pkg.github.com -u "$DOCKER_USERNAME" --password-stdin # Login to GitHub Registry using Travis environment variables | ||
- make container # Create dirty and latest images | ||
- make push # Push image to registry | ||
|
||
- language: go | ||
sudo: required | ||
services: | ||
- docker | ||
script: | ||
- export GO111MODULE=on | ||
- go mod vendor | ||
- make build | ||
- test -f bin/linux_amd64/honeypot | ||
- make all-container | ||
- docker images | grep "^docker.pkg.github.com/kyberorg/honeypot/honeypot.*__linux_amd64" | ||
- make test | ||
- language: go | ||
addons: | ||
sonarcloud: | ||
organization: kyberorg | ||
token: | ||
secure: fV8p83gaDNUamGYZZOmJiIenRo/1sTBxQs/6dkzauBIn6YI5v7xZJqI4j1ibID12TXaQQoHIlGDsoaNQbJQXHINaIah5C4BIK6GORbM1ElJpzPaa87zkC9Fpm68DVigJSthFz6IwYxQn2zlxYeN6xkcxBo/9OlnPKDJ06QpqQYdkyPvI5nYAcM0wQ0Yrw04mONFjQnQcMDuo4O+F/SZsRYFmda5p4waPbFSKOExmGmQS/vftCeaXge0u6fm7LpW87ixdYWYMgkjXu5D8NuqA/9WdLSVLi/YpnnU7J/DOtNeh2UFf4F7X4cB3mwULu88GuJocHbruC9vt2t0BbWy0rGBmjVrze7EjWKSzs5ASbsj6qflGtt13OxGTzJAEP0FV1Ikcr3xikUG6798IBDk2HGnggtPE2US9EpUI3QsfGrOzRIfv3l67SHUv8Wc1ks8HT9tXoX9blJN2mP7CPDjaNEvkHzkGviJPg381mT5QYbSx5bqYUkGdUxGRNk/YtP1J+i8N895N8NQpjy7uTGILafCR0ahEYb3ZQg96UU/l9IvriaxM/pZPlj0ADHry6dDbWHguS4txp+7AmxMFOq77ez76f82OFZ9iDl0dwFeQEun10zH9IL0LqrXeno+Fz0dg+ykOlSUcnlUDSNIsBRjB4UgY+umtqyNlxR84FDACpXY= | ||
before_script: | ||
- "./reports.sh" | ||
- export GO111MODULE=on | ||
- go mod vendor | ||
- make ci | ||
script: | ||
- sonar-scanner | ||
- language: go | ||
before_script: | ||
- "./reports.sh" | ||
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 | ||
> ./cc-test-reporter | ||
- chmod +x ./cc-test-reporter | ||
- "./cc-test-reporter before-build" | ||
script: | ||
- export GO111MODULE=on | ||
- go mod vendor | ||
- make ci | ||
after_script: | ||
- "./cc-test-reporter after-build -t gocov --exit-code $TRAVIS_TEST_RESULT" | ||
- language: go | ||
services: | ||
- docker | ||
if: branch = trunk | ||
script: | ||
- export GO111MODULE=on | ||
- go mod vendor | ||
- echo "$DOCKER_PASSWORD" | docker login docker.pkg.github.com -u "$DOCKER_USERNAME" | ||
--password-stdin | ||
- make container | ||
- make push | ||
notifications: | ||
email: false | ||
env: | ||
global: | ||
secure: fV8p83gaDNUamGYZZOmJiIenRo/1sTBxQs/6dkzauBIn6YI5v7xZJqI4j1ibID12TXaQQoHIlGDsoaNQbJQXHINaIah5C4BIK6GORbM1ElJpzPaa87zkC9Fpm68DVigJSthFz6IwYxQn2zlxYeN6xkcxBo/9OlnPKDJ06QpqQYdkyPvI5nYAcM0wQ0Yrw04mONFjQnQcMDuo4O+F/SZsRYFmda5p4waPbFSKOExmGmQS/vftCeaXge0u6fm7LpW87ixdYWYMgkjXu5D8NuqA/9WdLSVLi/YpnnU7J/DOtNeh2UFf4F7X4cB3mwULu88GuJocHbruC9vt2t0BbWy0rGBmjVrze7EjWKSzs5ASbsj6qflGtt13OxGTzJAEP0FV1Ikcr3xikUG6798IBDk2HGnggtPE2US9EpUI3QsfGrOzRIfv3l67SHUv8Wc1ks8HT9tXoX9blJN2mP7CPDjaNEvkHzkGviJPg381mT5QYbSx5bqYUkGdUxGRNk/YtP1J+i8N895N8NQpjy7uTGILafCR0ahEYb3ZQg96UU/l9IvriaxM/pZPlj0ADHry6dDbWHguS4txp+7AmxMFOq77ez76f82OFZ9iDl0dwFeQEun10zH9IL0LqrXeno+Fz0dg+ykOlSUcnlUDSNIsBRjB4UgY+umtqyNlxR84FDACpXY= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters