Skip to content
This repository was archived by the owner on Apr 29, 2020. It is now read-only.

Commit 0a50641

Browse files
author
Charlie Briggs
committed
Update build for go modules
1 parent c2dc4fe commit 0a50641

File tree

2 files changed

+20
-21
lines changed

2 files changed

+20
-21
lines changed

.circleci/config.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@ version: 2.1
33
executors:
44
golang:
55
docker:
6-
- image: circleci/golang:1.11
7-
working_directory: /go/src/github.com/Financial-Times/dyn-cli-utils
6+
- image: circleci/golang:1.12
87
golang-node:
98
docker:
10-
- image: circleci/golang:1.11-node
11-
working_directory: /go/src/github.com/Financial-Times/dyn-cli-utils
9+
- image: circleci/golang:1.12-node
1210

1311
jobs:
1412
install:
@@ -17,19 +15,16 @@ jobs:
1715
- checkout
1816

1917
- restore_cache:
20-
key: v1-gopkg-{{ checksum "Gopkg.lock" }}
18+
key: v1-gomod-{{ checksum "go.sum" }}
2119

2220
- run:
2321
name: Install dependencies
24-
command: |
25-
if [ ! -d /go/src/github.com/Financial-Times/dyn-cli-utils/vendor ]; then
26-
dep ensure
27-
fi
22+
command: go mod download
2823

2924
- save_cache:
30-
key: v1-gopkg-{{ checksum "Gopkg.lock" }}
25+
key: v1-gomod-{{ checksum "go.sum" }}
3126
paths:
32-
- /go/src/github.com/Financial-Times/dyn-cli-utils/vendor
27+
- /go/pkg/mod
3328

3429
- persist_to_workspace:
3530
root: .
@@ -40,7 +35,7 @@ jobs:
4035
executor: golang-node
4136
steps:
4237
- attach_workspace:
43-
at: /go/src/github.com/Financial-Times/dyn-cli-utils
38+
at: ~/project
4439

4540
- run:
4641
name: Check the style
@@ -58,11 +53,12 @@ jobs:
5853
executor: golang-node
5954
steps:
6055
- attach_workspace:
61-
at: /go/src/github.com/Financial-Times/dyn-cli-utils
56+
at: ~/project
6257

6358
- run:
6459
name: Update snyk monitoring
6560
command: make security-monitor
61+
6662
workflows:
6763
version: 2.1
6864
build-and-deploy:

Makefile

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,28 @@ vet: ## Examine the Go source code.
3333

3434
.PHONY: security
3535
security: _security-login ## Scan dependencies for security vulnerabilities.
36-
@printf '%b\n' ">> $(TEAL)scanning dependencies for vulnerabilities"
37-
npx snyk test --org=reliability-engineering
38-
@$(DONE)
36+
# TODO: enable once snyk support go modules https://github.com/snyk/snyk/issues/354
37+
# @printf '%b\n' ">> $(TEAL)scanning dependencies for vulnerabilities"
38+
# npx snyk test --org=reliability-engineering
39+
# @$(DONE)
3940

4041
_security-login:
4142

4243
_security-login-web: ## Login to snyk if not on CI.
43-
@printf '%b\n' ">> $(TEAL)Not on CI, logging into Snyk"
44-
npx snyk auth
44+
# TODO: enable once snyk support go modules https://github.com/snyk/snyk/issues/354
45+
# @printf '%b\n' ">> $(TEAL)Not on CI, logging into Snyk"
46+
# npx snyk auth
4547

4648
ifeq ($(CI),)
4749
_security-login: _security-login-web
4850
endif
4951

5052
.PHONY: security-monitor
5153
security-monitor: ## Update latest monitored dependencies in snyk. Needs to be run in an environment with the snyk CLI tool.
52-
@printf '%b\n' ">> $(TEAL)updating snyk dependencies"
53-
npx snyk monitor --org=reliability-engineering
54-
@$(DONE)
54+
# TODO: enable once snyk support go modules https://github.com/snyk/snyk/issues/354
55+
# @printf '%b\n' ">> $(TEAL)updating snyk dependencies"
56+
# npx snyk monitor --org=reliability-engineering
57+
# @$(DONE)
5558

5659
.PHONY: help
5760
help: ## Show this help message.

0 commit comments

Comments
 (0)