diff --git a/.circleci/config.yml b/.circleci/config.yml index e9d9588..1dbf9cd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,12 +3,10 @@ version: 2.1 executors: golang: docker: - - image: circleci/golang:1.11 - working_directory: /go/src/github.com/Financial-Times/dyn-cli-utils + - image: circleci/golang:1.12 golang-node: docker: - - image: circleci/golang:1.11-node - working_directory: /go/src/github.com/Financial-Times/dyn-cli-utils + - image: circleci/golang:1.12-node jobs: install: @@ -17,19 +15,16 @@ jobs: - checkout - restore_cache: - key: v1-gopkg-{{ checksum "Gopkg.lock" }} + key: v1-gomod-{{ checksum "go.sum" }} - run: name: Install dependencies - command: | - if [ ! -d /go/src/github.com/Financial-Times/dyn-cli-utils/vendor ]; then - dep ensure - fi + command: go mod download - save_cache: - key: v1-gopkg-{{ checksum "Gopkg.lock" }} + key: v1-gomod-{{ checksum "go.sum" }} paths: - - /go/src/github.com/Financial-Times/dyn-cli-utils/vendor + - /go/pkg/mod - persist_to_workspace: root: . @@ -40,7 +35,7 @@ jobs: executor: golang-node steps: - attach_workspace: - at: /go/src/github.com/Financial-Times/dyn-cli-utils + at: ~/project - run: name: Check the style @@ -58,11 +53,12 @@ jobs: executor: golang-node steps: - attach_workspace: - at: /go/src/github.com/Financial-Times/dyn-cli-utils + at: ~/project - run: name: Update snyk monitoring command: make security-monitor + workflows: version: 2.1 build-and-deploy: diff --git a/Makefile b/Makefile index d175033..9118430 100644 --- a/Makefile +++ b/Makefile @@ -33,15 +33,17 @@ vet: ## Examine the Go source code. .PHONY: security security: _security-login ## Scan dependencies for security vulnerabilities. - @printf '%b\n' ">> $(TEAL)scanning dependencies for vulnerabilities" - npx snyk test --org=reliability-engineering - @$(DONE) + # TODO: enable once snyk support go modules https://github.com/snyk/snyk/issues/354 + # @printf '%b\n' ">> $(TEAL)scanning dependencies for vulnerabilities" + # npx snyk test --org=reliability-engineering + # @$(DONE) _security-login: _security-login-web: ## Login to snyk if not on CI. - @printf '%b\n' ">> $(TEAL)Not on CI, logging into Snyk" - npx snyk auth + # TODO: enable once snyk support go modules https://github.com/snyk/snyk/issues/354 + # @printf '%b\n' ">> $(TEAL)Not on CI, logging into Snyk" + # npx snyk auth ifeq ($(CI),) _security-login: _security-login-web @@ -49,9 +51,10 @@ endif .PHONY: security-monitor security-monitor: ## Update latest monitored dependencies in snyk. Needs to be run in an environment with the snyk CLI tool. - @printf '%b\n' ">> $(TEAL)updating snyk dependencies" - npx snyk monitor --org=reliability-engineering - @$(DONE) + # TODO: enable once snyk support go modules https://github.com/snyk/snyk/issues/354 + # @printf '%b\n' ">> $(TEAL)updating snyk dependencies" + # npx snyk monitor --org=reliability-engineering + # @$(DONE) .PHONY: help help: ## Show this help message.