Skip to content

Commit

Permalink
move lambda and web to separate repos
Browse files Browse the repository at this point in the history
  • Loading branch information
Larry Hitchon committed Apr 13, 2018
1 parent 6fb7f8f commit 32ad08c
Show file tree
Hide file tree
Showing 14 changed files with 6 additions and 11,265 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
coverage.out
*/coverage.out
web/assets.go
.release/
vendor/
dist/
dist/
21 changes: 0 additions & 21 deletions Dockerfile-web

This file was deleted.

104 changes: 3 additions & 101 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@
# unused-packages = true


[[constraint]]
name = "github.com/aws/aws-lambda-go"
version = "1.1.0"

[[constraint]]
name = "github.com/aws/aws-sdk-go"
version = "1.13.32"
Expand All @@ -37,10 +33,6 @@
name = "github.com/ghodss/yaml"
version = "1.0.0"

[[constraint]]
name = "github.com/gin-gonic/gin"
version = "1.2.0"

[[constraint]]
branch = "master"
name = "github.com/hashicorp/hcl"
Expand Down
21 changes: 2 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = $(shell git tag -l --sort=creatordate | grep "^v[0-9]*.[0-9]*.[0-9]*$$" | tail -1)
VERSION := $(shell git tag -l --sort=creatordate | grep "^v[0-9]*.[0-9]*.[0-9]*$$" | tail -1)
MAJOR_VERSION := $(word 1, $(subst ., ,$(VERSION)))
MINOR_VERSION := $(word 2, $(subst ., ,$(VERSION)))
PATCH_VERSION := $(word 3, $(subst ., ,$(VERSION)))
Expand All @@ -8,8 +8,6 @@ BUILD_DIR = .release
GOLDFLAGS = "-X main.version=$(NEXT_VERSION)"

CLI_FILES = $(shell find cli linter assertion -name \*.go)
LAMBDA_FILES = $(shell find lambda assertion -name \*.go)
WEB_FILES = $(shell find web linter assertion -name \*.go)

default: all

Expand Down Expand Up @@ -43,22 +41,7 @@ $(BUILD_DIR)/config-lint: $(CLI_FILES)
mkdir -p $(BUILD_DIR)
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -ldflags=$(GOLDFLAGS) -o $(BUILD_DIR)/config-lint cli/*.go

$(BUILD_DIR)/lambda: $(LAMBDA_FILES)
@echo "=== building lambda - $@ ==="
mkdir -p $(BUILD_DIR)
GOOS=linux GOARCH=amd64 go build -ldflags=$(GOLDFLAGS) -o $(BUILD_DIR)/lambda lambda/*.go
cd $(BUILD_DIR) && zip lambda.zip lambda

lambda-deploy: $(BUILD_DIR)/lambda
aws lambda update-function-code --region us-east-1 --function-name config-go --zip-file fileb://$(BUILD_DIR)/lambda.zip

$(BUILD_DIR)/webserver: gen $(WEB_FILES)
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -ldflags=$(GOLDFLAGS) -o $(BUILD_DIR)/webserver web/*.go

webserver-docker:
docker build -t lhitchon/config-lint-web -f Dockerfile-web .

build: $(BUILD_DIR)/config-lint $(BUILD_DIR)/lambda $(BUILD_DIR)/webserver
build: $(BUILD_DIR)/config-lint

all: clean deps test build

Expand Down
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ A command line tool to validate configurations using rules specified in a YAML f
The data being validated can come from template files, such as a Terraform file.
There is also an example of a Linter that runs agains data returned from an AWS API call.

There is also the ability to deploy an AWS Lambda that can be used as a custom rule
AWS Config. The compliance tests are written in YAML, using the same format. This
YAML is stored in an S3 object, and the bucket and key of the object are passed as
parameters to the AWS Config fule


# Installation
You can use [Homebrew](https://brew.sh/) to install the latest version:

Expand Down
Loading

0 comments on commit 32ad08c

Please sign in to comment.