forked from edgexfoundry/security-secret-store
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (37 loc) · 1.18 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# SPDX-License-Identifier: Apache-2.0'
.PHONY: prepare build clean docker run
GO=CGO_ENABLED=0 GO111MODULE=on GOOS=linux go
DOCKERS=docker_vault docker_vault_worker
PKISETUP=pkisetup
VAULTWORKER=edgex-vault-worker
.PHONY: $(DOCKERS)
VERSION=$(shell cat ./VERSION)
GIT_SHA=$(shell git rev-parse HEAD)
prepare:
clean:
cd core && rm -f $(VAULTWORKER)
cd pkisetup && rm -f $(PKISETUP)
build: build_pki build_worker
build_pki:
cd pkisetup && $(GO) build -a -ldflags="-s -w" -o $(PKISETUP) .
build_worker:
cd core && $(GO) build -a -o $(VAULTWORKER) .
docker: $(DOCKERS)
docker_vault: build_pki
docker build \
--no-cache=true --rm=true \
-f Dockerfile.vault \
--label "git_sha=$(GIT_SHA)" \
-t edgexfoundry/docker-edgex-vault:$(GIT_SHA) \
-t edgexfoundry/docker-edgex-vault:$(VERSION)-dev \
-t edgexfoundry/docker-edgex-vault:latest \
.
docker_vault_worker: build_worker
docker build \
--no-cache=true --rm=true \
-f Dockerfile.vault-worker \
--label "git_sha=$(GIT_SHA)" \
-t edgexfoundry/docker-edgex-vault-worker-go:$(GIT_SHA) \
-t edgexfoundry/docker-edgex-vault-worker-go:$(VERSION)-dev \
-t edgexfoundry/docker-edgex-vault-worker-go:latest \
.