-
Notifications
You must be signed in to change notification settings - Fork 886
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature/testsSholdNotFailFast
- Loading branch information
Showing
13 changed files
with
218 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
FROM golang:1.15 | ||
FROM golang:1.17 | ||
|
||
COPY . /go/src/go.mozilla.org/sops | ||
WORKDIR /go/src/go.mozilla.org/sops | ||
|
||
RUN CGO_ENABLED=1 make install | ||
RUN apt-get update | ||
RUN apt-get install -y vim python-pip emacs | ||
RUN apt-get install -y vim python3-pip emacs | ||
RUN pip install awscli | ||
ENV EDITOR vim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
PROJECT := go.mozilla.org/sops/v3 | ||
GO := GO15VENDOREXPERIMENT=1 GO111MODULE=on GOPROXY=https://proxy.golang.org go | ||
GO := GOPROXY=https://proxy.golang.org go | ||
GOLINT := golint | ||
|
||
all: test vet generate install functional-tests | ||
|
@@ -48,31 +48,47 @@ functional-tests-all: | |
$(GO) build -o functional-tests/sops go.mozilla.org/sops/v3/cmd/sops | ||
cd functional-tests && cargo test && cargo test -- --ignored | ||
|
||
deb-pkg: vendor | ||
# Creates variables during target re-definition. Basically this block allows the particular variables to be used in the final target | ||
build-deb-%: OS = $(word 1,$(subst -, ,$*)) | ||
build-deb-%: ARCH = $(word 2,$(subst -, ,$*)) | ||
build-deb-%: FPM_ARCH = $(word 3,$(subst -, ,$*)) | ||
# Poor-mans function with parameters being split out from the variable part of it's name | ||
build-deb-%: | ||
rm -rf tmppkg | ||
mkdir -p tmppkg/usr/local/bin | ||
GOOS=linux CGO_ENABLED=0 go build -mod vendor -o tmppkg/usr/local/bin/sops go.mozilla.org/sops/v3/cmd/sops | ||
GOOS=$(OS) GOARCH="$(ARCH)" CGO_ENABLED=0 go build -mod vendor -o tmppkg/usr/local/bin/sops go.mozilla.org/sops/v3/cmd/sops | ||
fpm -C tmppkg -n sops --license MPL2.0 --vendor mozilla \ | ||
--description "Sops is an editor of encrypted files that supports YAML, JSON and BINARY formats and encrypts with AWS KMS and PGP." \ | ||
-m "AJ Bahnken <[email protected]>" \ | ||
--url https://go.mozilla.org/sops \ | ||
--architecture x86_64 \ | ||
--architecture $(FPM_ARCH) \ | ||
-v "$$(grep '^const Version' version/version.go |cut -d \" -f 2)" \ | ||
-s dir -t deb . | ||
|
||
rpm-pkg: vendor | ||
# Create .deb packages for multiple architectures | ||
deb-pkg: vendor build-deb-linux-amd64-x86_64 build-deb-linux-arm64-arm64 | ||
|
||
# Creates variables during target re-definition. Basically this block allows the particular variables to be used in the final target | ||
build-rpm-%: OS = $(word 1,$(subst -, ,$*)) | ||
build-rpm-%: ARCH = $(word 2,$(subst -, ,$*)) | ||
build-rpm-%: FPM_ARCH = $(word 3,$(subst -, ,$*)) | ||
# Poor-mans function with parameters being split out from the variable part of it's name | ||
build-rpm-%: | ||
rm -rf tmppkg | ||
mkdir -p tmppkg/usr/local/bin | ||
GOOS=linux CGO_ENABLED=0 go build -mod vendor -o tmppkg/usr/local/bin/sops go.mozilla.org/sops/v3/cmd/sops | ||
GOOS=$(OS) GOARCH="$(ARCH)" CGO_ENABLED=0 go build -mod vendor -o tmppkg/usr/local/bin/sops go.mozilla.org/sops/v3/cmd/sops | ||
fpm -C tmppkg -n sops --license MPL2.0 --vendor mozilla \ | ||
--description "Sops is an editor of encrypted files that supports YAML, JSON and BINARY formats and encrypts with AWS KMS and PGP." \ | ||
-m "AJ Bahnken <[email protected]>" \ | ||
--url https://go.mozilla.org/sops \ | ||
--architecture x86_64 \ | ||
--rpm-os linux \ | ||
--architecture $(FPM_ARCH) \ | ||
--rpm-os $(OS) \ | ||
-v "$$(grep '^const Version' version/version.go |cut -d \" -f 2)" \ | ||
-s dir -t rpm . | ||
|
||
# Create .rpm packages for multiple architectures | ||
rpm-pkg: vendor build-rpm-linux-amd64-x86_64 build-rpm-linux-arm64-arm64 | ||
|
||
dmg-pkg: install | ||
ifneq ($(OS),darwin) | ||
echo 'you must be on MacOS and set OS=darwin on the make command line to build an OSX package' | ||
|
@@ -82,7 +98,7 @@ else | |
cp $$GOPATH/bin/sops tmppkg/usr/local/bin/ | ||
fpm -C tmppkg -n sops --license MPL2.0 --vendor mozilla \ | ||
--description "Sops is an editor of encrypted files that supports YAML, JSON and BINARY formats and encrypts with AWS KMS and PGP." \ | ||
-m "Julien Vehent <jvehent+sops@mozilla.com>" \ | ||
-m "Mozilla Security <security@mozilla.org>" \ | ||
--url https://go.mozilla.org/sops \ | ||
--architecture x86_64 \ | ||
-v "$$(grep '^const Version' version/version.go |cut -d \" -f 2)" \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.