Skip to content

Commit

Permalink
Merge pull request #279 from accurics/terrascan-v1.0
Browse files Browse the repository at this point in the history
Initial Terrascan v1.0 codebase
  • Loading branch information
Cesar Rodriguez authored Aug 14, 2020
2 parents 9e1eb31 + 5896ffc commit 165d1cb
Show file tree
Hide file tree
Showing 606 changed files with 13,467 additions and 4,923 deletions.
11 changes: 11 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
comment:
layout: "reach, diff, flags, files"
behavior: default
require_changes: false # if true: only post the comment if coverage changes
require_base: no # [yes :: must have a base report to post]
require_head: yes # [yes :: must have a head report to post]

coverage:
status:
project: off
patch: off
6 changes: 5 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ root = true

[*]
indent_style = space
indent_size = 4
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
end_of_line = lf

[*.go]
indent_style = tab
indent_size = 4

[*.bat]
indent_style = tab
end_of_line = crlf
Expand Down
69 changes: 0 additions & 69 deletions .github/workflows/docker.yml

This file was deleted.

55 changes: 55 additions & 0 deletions .github/workflows/gobuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: build
on:
push:
pull_request:
jobs:
validate:
runs-on: ubuntu-latest
env:
GO111MODULE: on
GOPATH: /home/runner/work/terrascan
GOBIN: /home/runner/work/terrascan/bin
steps:
- name: Checkout Terrascan
uses: actions/checkout@v1

- name: Setup Go
uses: actions/setup-go@v1
with:
go-version: 1.14

- name: Install golint
run: go get -u golang.org/x/lint/golint

- name: Go validations
run: make validate

- name: Build Terrascan
run: make build

- name: Run unit tests
run: make unit-tests

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1

# push image to Docker Hub
push:
# Ensure "validate" job passes before pushing image.
needs: validate

runs-on: ubuntu-latest
if: github.event_name == 'push'

steps:
- name: Checkout Terrascan
uses: actions/checkout@v1

- name: Build Terrascan docker image
run: make docker-build

- name: Login to docker hub
run: echo "${{ secrets.DOCKER_HUB_TOKEN }}" | docker login -u accurics --password-stdin

- name: Push Terrascan docker image
run: make docker-push
34 changes: 0 additions & 34 deletions .github/workflows/pythonpackage.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/pythonpublish.yml

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: release

on:
push:
tags:
- '*'

jobs:
release:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.14
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
110 changes: 17 additions & 93 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,107 +1,31 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/

# Translations
*.mo
*.pot
# Test binary, built with `go test -c`
*.test

# Django stuff:
*.log
local_settings.py
# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy
# Dependency directories (remove the comment below to include it)
# vendor/

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

#vscode
.vscode/

/updatedFiles
/updatedFiles

# Go binar
/bin

.DS_Store
Loading

0 comments on commit 165d1cb

Please sign in to comment.