Skip to content

Commit

Permalink
implement dependency auditing
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravi committed Sep 29, 2020
1 parent 6f9bc2f commit 6b63a22
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,31 @@ BIN_DIR?=.
export GOOS?=$(shell go env GOOS)
export GOARCH?=$(shell go env GOARCH)

.PHONY: all
all: audit test build

.PHONY: audit
audit:
nancy go.sum

.PHONY: build
build:
@mkdir -p $(BUILD_ARCH)/$(BIN_DIR)
go build -o $(BUILD_ARCH)/$(BIN_DIR)/$(MAIN) cmd/dp-search-query/main.go

.PHONY: debug
debug: build
HUMAN_LOG=1 go run -race cmd/dp-search-query/main.go

.PHONY: acceptance-publishing
acceptance-publishing: build
HUMAN_LOG=1 go run cmd/dp-search-query/main.go

.PHONY: acceptance-web
acceptance-web: build
HUMAN_LOG=1 go run cmd/dp-search-query/main.go

.PHONY: test
test:
go test -v -cover $(shell go list ./... | grep -v /vendor/)

Expand Down
15 changes: 15 additions & 0 deletions ci/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
platform: linux

image_resource:
type: docker-image
source:
repository: onsdigital/dp-concourse-tools-nancy
tag: latest

inputs:
- name: dp-search-query
path: dp-search-query

run:
path: dp-search-query/ci/scripts/audit.sh
7 changes: 7 additions & 0 deletions ci/scripts/audit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash -eux

export cwd=$(pwd)

pushd $cwd/dp-search-query
make audit
popd

0 comments on commit 6b63a22

Please sign in to comment.