Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GT-478 Migration to CircleCI #1421

Merged
merged 7 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 106 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
version: 2.1
orbs:
slack: circleci/[email protected]

executors:
golang-executor:
docker:
- image: gcr.io/gcr-for-testing/golang:1.20.7
machine-executor:
machine:
image: ubuntu-2204:current
docker_layer_caching: true

aliases:
- &notify_slack_on_fail
slack/notify:
channel: 'C056RL4BXG9' #status-go channel
event: fail
template: basic_fail_1

jobs:
check-code:
executor: golang-executor
steps:
- setup_remote_docker:
docker_layer_caching: true
- checkout
- run:
name: Install deps
command: |
if [ -z "$CIRCLE_PULL_REQUEST" ]; then
make vendor
make tools-min
exit 0
fi
apt-get update
apt-get install -y unzip
make init
- run:
name: License check
command: |
if [ -z "$CIRCLE_PULL_REQUEST" ]; then
echo "This is not a pull request. Skipping..."
exit 0
fi
make license-verify license-range-verify
- run: make fmt-verify
- run: make linter
# - run:
# name: vulncheck
# command: |
# if [ -z "$CIRCLE_PULL_REQUEST" ]; then
# echo "This is not a pull request. Skipping..."
# exit 0
# fi
# make vulncheck
- run:
name: Unit tests
command: |
if [ -z "$CIRCLE_PULL_REQUEST" ]; then
echo "This is not a pull request. Skipping..."
exit 0
fi
make run-unit-tests
- run:
name: make bin
command: |
if [ -z "$CIRCLE_PULL_REQUEST" ]; then
echo "This is not a pull request. Skipping..."
exit 0
fi
make bin
environment:
GO111MODULES: off

vulncheck:
executor: golang-executor
steps:
- setup_remote_docker:
docker_layer_caching: true
- checkout
- run: make tools
- run: make vulncheck
- *notify_slack_on_fail

workflows:
version: 2

# Default workflow
run_tests:
jobs:
- check-code

# Monthly vulnerability check
monthly_vulncheck:
jobs:
- vulncheck:
context:
- slack
triggers:
- schedule:
# 8:00 at 1st day of month
cron: 0 8 1 * *
filters:
branches:
only: master
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

2 changes: 2 additions & 0 deletions docs/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This team will own the entire repository
* @arangodb/team-golang