forked from public/stack
add sops binary target
This commit is contained in:
parent
6ed53333da
commit
1a9e368399
18
Makefile
18
Makefile
|
@ -89,6 +89,9 @@ $(CACHE_DIR)/secrets:
|
|||
$(FETCH_DIR)/terraform:
|
||||
$(call git_clone,$@,$(TERRAFORM_REPO),$(TERRAFORM_REF))
|
||||
|
||||
$(FETCH_DIR)/sops:
|
||||
$(call git_clone,$@,$(SOPS_REPO),$(SOPS_REF))
|
||||
|
||||
$(OUT_DIR)/terraform: $(FETCH_DIR)/terraform
|
||||
$(call toolchain," \
|
||||
cd $(FETCH_DIR)/terraform && \
|
||||
|
@ -102,3 +105,18 @@ $(OUT_DIR)/terraform: $(FETCH_DIR)/terraform
|
|||
-ldflags='-w -extldflags=-static' \
|
||||
-o /home/build/$@ \
|
||||
")
|
||||
|
||||
$(OUT_DIR)/sops: $(FETCH_DIR)/sops
|
||||
$(call toolchain," \
|
||||
cd $(FETCH_DIR)/sops && \
|
||||
export SSL_CERT_DIR=/etc/ssl/certs && \
|
||||
export GOCACHE=/home/build/$(CACHE_DIR) && \
|
||||
export GOPATH=/home/build/$(CACHE_DIR) && \
|
||||
export CGO_ENABLED=0 && \
|
||||
go build \
|
||||
-v \
|
||||
-trimpath \
|
||||
-ldflags='-w -extldflags=-static' \
|
||||
-o /home/build/$@ \
|
||||
go.mozilla.org/sops/v3/cmd/sops \
|
||||
")
|
||||
|
|
|
@ -10,6 +10,5 @@ For the purpose of transparency, we include our infrastructure configuration rig
|
|||
## Usage
|
||||
|
||||
```shell
|
||||
$ sops exec-env secrets/production.enc.env $(getent passwd $UID | cut -d: -f7)
|
||||
$ make
|
||||
```
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
DEBIAN_HASH=f9e970d357981f7f5055f89365af980534ce742fc11480c51f929da83aa15980
|
||||
TERRAFORM_REF=db6079cfe269803701be9e1a89aeaf9a93714e86
|
||||
TERRAFORM_REPO=https://github.com/hashicorp/terraform
|
||||
SOPS_REF=e1edc059487ddd14236dfe47267b05052f6c20b4
|
||||
SOPS_REPO=https://github.com/mozilla/sops
|
||||
|
|
Loading…
Reference in New Issue