Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull in 4 years of changes from upstream repo #1

Open
wants to merge 529 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
529 commits
Select commit Hold shift + click to select a range
ebf0705
vault kv version and mount names in publish config (#513)
ajvb Aug 30, 2019
f103af7
Add an --exec flag to pass decrypted secrets via environment variable…
ancat Sep 9, 2019
2fed7a5
3.3.1 (develop -> master) (#478) (#521)
ajvb Sep 11, 2019
045a876
Bump version and CHANGELOG for 3.4.0
ajvb Sep 11, 2019
a04e15a
Merged develop into off-master branch
ajvb Sep 11, 2019
81a98ab
Fixed exec env/file in changelog
ajvb Sep 11, 2019
4b36f15
Merge branch 'develop' into develop-to-master-for-3.4.0
ajvb Sep 11, 2019
f092864
remove duplicate functional test
ajvb Sep 11, 2019
eed77eb
Fixed typo related to MACs (#524)
AntoineRondelet Sep 11, 2019
2544b3c
Merge pull request #522 from mozilla/develop-to-master-for-3.4.0
ajvb Sep 12, 2019
9b76a76
Add GO111MODULE=on to release builds
ajvb Sep 12, 2019
e8969af
Merge branch 'master' into develop
ajvb Sep 12, 2019
14b3816
Merge pull request #525 from mozilla/develop
ajvb Sep 12, 2019
e527e06
Revert "Add an --exec flag to pass decrypted secrets via environment …
ajvb Sep 12, 2019
5e02dac
Remove exec-env/exec-file from 3.4.0 changelog
ajvb Sep 12, 2019
14a22d7
Merge pull request #526 from mozilla/revert-exec-command
ajvb Sep 12, 2019
ddaa006
fix --encrypted-regex example
Sep 20, 2019
19cc1bc
Merge pull request #530 from oskarkook/patch-1
autrilla Sep 20, 2019
5663d27
exec-file and exec-env subcommands, take two (#532)
ancat Sep 24, 2019
c670107
Document how to operate on stdin
PyvesB Oct 4, 2019
4b5b7ae
Merge pull request #544 from PyvesB/stdin-docs
autrilla Oct 4, 2019
dad8100
fix for #548
dnozay Oct 15, 2019
a40c6a2
use map
dnozay Oct 17, 2019
5207171
document updatekeys command
Oct 18, 2019
9abdff7
Merge pull request #552 from davidovich/document-updatekeys
autrilla Oct 21, 2019
a03712f
use enum
dnozay Oct 22, 2019
559b27c
mv formats around
dnozay Oct 22, 2019
4376ac9
add formats
dnozay Oct 22, 2019
d98bff6
Merge pull request #549 from dnozay/pr-548
autrilla Oct 26, 2019
6e283a8
Sanitize hostname used for AWS STS role session name (#558)
imsky Nov 1, 2019
18d2867
correct azure key environment in readme
leitu Nov 5, 2019
200322d
Merge pull request #564 from leitu/corret_readme
autrilla Nov 5, 2019
00ded41
Update aws-sdk-go to v1.23.13 (#573)
jessebye Nov 15, 2019
8e21de8
Upgrade sops to go 1.13 (#566)
ajvb Nov 18, 2019
6a1fe99
Run go fmt on project (#577)
ajvb Nov 21, 2019
c19d258
Merged master into develop
ajvb Nov 21, 2019
bc4b747
prepare 3.5.0 release (#578)
ajvb Nov 21, 2019
afd073a
Merge pull request #579 from mozilla/develop
ajvb Nov 21, 2019
8302b6a
fix go mod path in go build commands
ajvb Nov 21, 2019
6475600
Merge branch 'develop'
ajvb Nov 21, 2019
6ec0e6a
Fix fpm commands and PROJECT var in Makefile
ajvb Dec 2, 2019
4a7892c
Merge branch 'master' into develop
ajvb Dec 2, 2019
83a354e
Merge pull request #584 from mozilla/develop
ajvb Dec 2, 2019
e99a5ff
Update the PGP Key for all Examples
apeschel Dec 10, 2019
6788bf8
Update sops format version for example files
apeschel Dec 10, 2019
53c6470
Merge pull request #591 from apeschel/topic/apeschel/updatekeys_on_ex…
ajvb Dec 12, 2019
8a216e9
Add `-recurse` option for publish subcommand
Jan 9, 2020
ef68940
Add `-omit-extensions` option for publish subcommand
Jan 9, 2020
10ef21c
Skip publish to Vault if secret is up-to-date
Jan 9, 2020
4254322
update docs
Jan 9, 2020
3ab2d41
fix filepath.Walk abuse; rename recursive flag; minor fixes
Jan 10, 2020
02b0437
Merge pull request #1 from mmorev/fix-recursive
mmorev Jan 10, 2020
01b5fb6
Dont fail Vault publish with write-only access; improve vault publish…
Jan 11, 2020
ed31727
Merge pull request #2 from mmorev/fix-recursive
mmorev Jan 11, 2020
3ccc7e4
Fix destination path on single file publish
Jan 13, 2020
67f1654
Merge pull request #3 from mmorev/fix-singlefile
mmorev Jan 13, 2020
3db9c71
Update cmd/sops/main.go
mmorev Jan 13, 2020
0c6558b
Recursive publish - use relative paths
Jan 14, 2020
0c26330
Merge pull request #4 from mmorev/fix-relativepaths
mmorev Jan 14, 2020
df39dca
Merge pull request #602 from mmorev/develop
ajvb Jan 14, 2020
b113ebc
Added version to docker tag #542, using existing tag scheme
eddiewebb Jan 15, 2020
f65e55e
Use simple cut command for version
eddiewebb Jan 18, 2020
75b8701
change local reference to dpeloy script
eddiewebb Jan 18, 2020
19e44ab
removed duplicate error message
eddiewebb Jan 18, 2020
db9c552
Merge pull request #607 from eddiewebb/circleci-tag
ajvb Jan 23, 2020
1634350
Fix newline encoding for dotenv store (#612)
scjudd Jan 24, 2020
f7e880b
Alpine-based docker image (#609)
ikedam Jan 30, 2020
e4660eb
f
Jan 31, 2020
94a04e2
Merge pull request #616 from joshua-rutherford/aws
ajvb Feb 10, 2020
0e1eb95
Revert "update aws-sdk-go dependency"
ajvb Feb 10, 2020
4bc27f6
Merge pull request #625 from mozilla/revert-616-aws
ajvb Feb 10, 2020
69ecd18
fixes #626
alx13 Feb 10, 2020
7f350d8
Merge pull request #627 from alx13/develop
ajvb Feb 11, 2020
4507019
Add standard newline/quoting behavior to dotenv store (#622)
scjudd Mar 20, 2020
84816c3
Add support for decoding JSON arrays of arrays (#642)
nilium Mar 20, 2020
273e4bf
Update authors
jvehent Mar 30, 2020
1aa3647
Update base container to Go 1.14
jvehent Apr 3, 2020
007c9b0
Merge pull request #645 from mozilla/jvehent-patch-2
ajvb Apr 9, 2020
1f37a83
Readme small tweak
max-sixty Apr 12, 2020
45b67e7
Merge pull request #649 from mozilla/jvehent-patch-3
ajvb Apr 16, 2020
8b14d4e
Merge pull request #651 from max-sixty/patch-1
ajvb Apr 16, 2020
89d77b2
Fix #611 - Dont break when config file exists but CreationRules are e…
Kamahl19 Apr 24, 2020
8f93ee3
#664 remove outdated contact info (#668)
Kamahl19 Apr 28, 2020
e4abd87
Add HashiCorp Vault support (#655)
vnzongzna May 4, 2020
99adfae
Rename LoadForFile to LoadCreationRuleForFile (#663)
Kamahl19 May 4, 2020
a7b6c55
Fix #671: `updatekeys` checks for config file flag (#672)
TuhinNair May 8, 2020
94b5021
(docs): fixed small typo error (#670)
0xflotus May 27, 2020
bc1567b
Fixed aws config file issue
gl-ahiggins Jun 10, 2020
63b22a2
updatekeys: Make file path absolute
mhyllander Jun 17, 2020
f3c5d80
Merge pull request #682 from mhyllander/updatekeys-abspath
ajvb Jun 17, 2020
7ae1968
Merge pull request #680 from gl-ahiggins/develop
ajvb Jun 18, 2020
260ca36
Update CHANGLOG and version for 3.6.0
ajvb Jul 14, 2020
4f06780
Fix endless loop in x/crypto/openpgp func ReadMessage (#690)
uwehdaub Jul 14, 2020
09d511f
Close tmpfile after writing (#685)
lbonanomi Jul 14, 2020
6b9e168
Update CHANGELOG for additional code for 3.6
ajvb Jul 14, 2020
5f7d324
Merge pull request #693 from mozilla/develop
ajvb Jul 15, 2020
5d32d9a
Revert "Add standard newline/quoting behavior to dotenv store (#622)"…
autrilla Jul 27, 2020
f78682c
Support --input-type for exec-file (#699)
lbonanomi Jul 28, 2020
4bd640e
chore(gomod): Bumping AWS SDK version (#714)
sc250024 Aug 6, 2020
8aca3cb
Add support for --unencrypted-regex (#715)
renehernandez Sep 2, 2020
0ed7e37
Fix vault tests
ajvb Sep 2, 2020
bdd23ef
Merge pull request #731 from mozilla/ajvb/fix-tests
ajvb Sep 2, 2020
8a09f05
Switch gpg.mozilla.org out for keys.openpgp.org
ajvb Sep 2, 2020
1927e18
Merge pull request #732 from mozilla/ajvb/gpg-key-fetching
ajvb Sep 2, 2020
cba61b6
Update README.rst
ninacfgarcia Sep 8, 2020
225ac82
Bump version and add changelog for 3.6.1
ajvb Sep 9, 2020
dc66e9f
Merge pull request #735 from mozilla/prep-for-3.6.1
ajvb Sep 14, 2020
334be56
Merge branch 'master' into develop
ajvb Sep 14, 2020
38b25bd
Merge pull request #737 from mozilla/develop
ajvb Sep 14, 2020
e8d0004
Add support for age.
jimmycuadra Jul 4, 2020
9ca46d0
Use idiomatic style for assignment and error handling.
jimmycuadra Jul 11, 2020
9e4cbc9
Allow age key dir to be set with SOPS_AGE_KEY_DIR and add tests.
jimmycuadra Jul 18, 2020
2741ab5
Use user config dir instead of home dir as the root for age keys.
jimmycuadra Jul 27, 2020
d9b196c
Determine age package path using current file rather than pwd.
jimmycuadra Jul 28, 2020
5c171c8
Don't swallow potential errors from os.Stat.
jimmycuadra Jul 28, 2020
617db43
Use a single keys.txt file for age private keys.
jimmycuadra Aug 3, 2020
7f7ecbc
Try decrypting with all possible keys in the keyfile.
jimmycuadra Aug 3, 2020
ade5692
Document age usage.
jimmycuadra Aug 3, 2020
a66a0a8
Reorder README sections and fix RST link.
jimmycuadra Aug 3, 2020
6a6a936
Use more concise style for constructing map.
jimmycuadra Aug 9, 2020
1dbea5d
Fix whitespace errors.
jimmycuadra Aug 9, 2020
6068838
Update go.mod/go.sum.
jimmycuadra Aug 9, 2020
50a89c8
age: .sops.yaml support
colemickens Aug 7, 2020
8f6271f
age: MasterKeysFromRecipients: gracefully handle empty string
colemickens Aug 16, 2020
e9acafc
Update to age 1.0.0-beta5.
jimmycuadra Sep 21, 2020
799f39c
Merge pull request #733 from ninacfgarcia/patch-1
ajvb Sep 22, 2020
682bff4
Merge pull request #688 from jimmycuadra/age
ajvb Sep 23, 2020
8acbe73
typo fix for deprecation warning in getKeyFromKeyServer
ajvb Sep 24, 2020
13d64c9
Bump YAML library version, and add test for YAML library. (#754)
felixfontein Oct 7, 2020
b1d253e
Do not discard comments at beginning of YAML documents (#757)
felixfontein Oct 7, 2020
d8a6428
Fixing a small typo (#759)
Oct 20, 2020
886c1ee
Returning stderr when gpg encrypt fails (#762)
udayruddarraju Oct 29, 2020
85d1216
Correct markdown link in README.rst to a rst link
SKalt Nov 12, 2020
84c8fdc
Move to github actions
autrilla Dec 29, 2020
b3c0ee9
Merge pull request #792 from autrilla/develop
ajvb Jan 6, 2021
88b0565
Remove dead code that fails compiling (#774).
felixfontein Dec 29, 2020
47cf265
Forgot to remove no longer used import.
felixfontein Dec 30, 2020
157e633
Use rustup directly instead of actions-rs
autrilla Jan 6, 2021
a115ce4
Also run unit tests in Github actions
autrilla Jan 7, 2021
779ea58
Merge pull request #796 from autrilla/develop
ajvb Jan 7, 2021
1049773
Merge pull request #793 from felixfontein/remove-dead-broken-code
ajvb Jan 9, 2021
49c2514
add filename to exec-file (#761)
cgroschupp Feb 9, 2021
0f2ebcf
added wrap verb to outputs (#817)
mkatychev Feb 17, 2021
5d1376d
Use age/armor for encrypted data key (#819)
tullo Feb 21, 2021
24636e4
Make sure that binary is built from current checkout, and not from ma…
felixfontein Feb 21, 2021
e2d6d0f
Use yaml.v3 instead of modified yaml.v2 for handling YAML files (#791)
felixfontein Feb 21, 2021
fbc87ae
Update aws-sdk-go to version v1.37.18 (#823)
DavidJacob Feb 25, 2021
f37e612
Fix broken sops config anchor in README
stealthybox Feb 28, 2021
79d5dac
feat: Support more complicated path_regexp (issues/826) (#829)
bcolucci Mar 10, 2021
dd7ce3d
Match file path relative to config file's directory (#827)
paulolieuthier Mar 10, 2021
c178f89
Revert "Match file path relative to config file's directory (#827)"
autrilla Mar 10, 2021
b5e0ffa
Merge pull request #832 from mozilla/revert-827-fix-rule-relative-fil…
ajvb Mar 24, 2021
43eafac
Merge pull request #825 from stealthybox/readme-fixanchor
ajvb Mar 24, 2021
53c5373
Merge pull request #771 from SKalt/patch-1
ajvb Mar 24, 2021
cb4229f
Prep for v3.7.0
ajvb Mar 24, 2021
e807690
Small changelog fix for v3.7
ajvb Mar 24, 2021
66043e7
Merge pull request #838 from mozilla/develop
ajvb Mar 24, 2021
e98451e
Remove unused age code
hiddeco Mar 30, 2021
9cc95d4
Add release workflow
ajvb Mar 25, 2021
dfc7af2
swap to fork of action-automatic-releases
ajvb Mar 30, 2021
fdf4517
Trim space from age keys
johanfleury Apr 4, 2021
1acf4dd
Merge pull request #843 from mozilla/ajvb/release-support
ajvb Apr 5, 2021
1504dbc
Run CI tests against master as well
ajvb Apr 5, 2021
8a2fbc0
Initial patch for advisory
ajvb Mar 22, 2021
450e30e
Merge pull request #848 from mozilla/ajvb/run-ci-against-master-as-well
ajvb Apr 6, 2021
1931931
Merge pull request #846 from johanfleury/fix/trim-age-keys
ajvb Apr 6, 2021
e5bf171
go.sum fix
ajvb Apr 8, 2021
706d0c7
Merge pull request from GHSA-x5c7-x7m2-rhmf
ajvb Apr 8, 2021
8838db6
v3.7.1 prep
ajvb Apr 8, 2021
adfe49c
Merge pull request #852 from mozilla/develop
ajvb Apr 8, 2021
68e2a82
fix release workflow
ajvb Apr 8, 2021
2395f07
small release workflow fix
ajvb Apr 8, 2021
c5b1298
Match file path relative to config file's directory (2) (#853)
paulolieuthier Apr 12, 2021
7626399
fix missing argument in encrypting with age section (#860)
damienleger Apr 20, 2021
3acf53e
Correct path to age keys.txt in documentation (#861)
aodinokov Apr 23, 2021
5af8e63
Prevent comment duplication. (#866)
felixfontein May 8, 2021
688fa22
Remove SOPS_GPG_KEYSERVER reference in README.rst
Enrico204 Jun 2, 2021
75cd389
Add a test to reproduce #907
ikedam Jul 24, 2021
108b211
Allow empty maps for yaml (#907)
ikedam Jul 24, 2021
02d57ca
Tests should not fail fast
ikedam Jul 24, 2021
6130ffe
Use the key of release@mozilla.com for the unit test (#882) (#906)
ikedam Jul 24, 2021
56bbf84
Added support for go 1.16 and darwin-arm64
nklmilojevic Jul 26, 2021
ea8b3bb
support gcp credentials as env var
joshkaplinsky Oct 27, 2021
72c0ab6
fix: typo in an example
Vampouille Aug 17, 2020
f6e9891
fix a typo
brant4test Dec 12, 2021
c0dc484
Update keysource.go
joshkaplinsky Jan 18, 2022
086c11d
Support SOPS_AGE_KEY environment variable
choffmeister Feb 14, 2022
a98768b
Fix flakey test run on OSX
acastle Feb 15, 2022
c310cdd
Merge pull request #967 from brant4test/master
ajvb Feb 23, 2022
649deb1
Merge pull request #1008 from acastle/fix/hc-vault-flake-osx
ajvb Feb 23, 2022
5dfbe1e
Merge pull request #883 from Enrico204/readme-remove-gpg-server-env-var
ajvb Feb 24, 2022
6bfd72d
Merge remote-tracking branch 'origin/develop' into sops-age-key-env
choffmeister Feb 24, 2022
dc2267e
Upgrade to go 1.17
ajvb Feb 24, 2022
076f295
rm extra whitespace in CircleCI config
ajvb Feb 24, 2022
7f503bc
Upgrade release job to go 1.17
ajvb Feb 24, 2022
4bd3e5a
Update pip package name in Dockerfile
ajvb Feb 24, 2022
9a0eb2d
Merge pull request #1012 from mozilla/ajvb/go-upgrade
ajvb Feb 24, 2022
be5a02b
Merge pull request #721 from Vampouille/patch-2
ajvb Feb 24, 2022
624c7d0
Merge pull request #842 from hiddeco/remove-unused-age-code
ajvb Feb 24, 2022
b7c58e4
Move age environment variable names to constants
choffmeister Feb 25, 2022
684d338
Merge branch 'develop' of https://github.com/mozilla/sops into mozill…
nklmilojevic Mar 1, 2022
0cfcae6
Merge branch 'mozilla-develop' into develop
nklmilojevic Mar 1, 2022
e5f3992
Merge pull request #911 from nklmilojevic/develop
ajvb Mar 1, 2022
dff9c31
Merge branch 'develop' into sops-age-key-env
ajvb Mar 1, 2022
8fad347
Merge pull request #1006 from choffmeister/sops-age-key-env
ajvb Mar 1, 2022
c586534
Change labeling and upload linux arm64
ajvb Mar 1, 2022
e926348
Merge pull request #1014 from mozilla/ajvb/new-binary-labeling
ajvb Mar 1, 2022
d6bc216
README and author tweaks
ajvb Mar 3, 2022
d559922
Merge pull request #1016 from mozilla/ajvb/ci-badge
ajvb Mar 3, 2022
822ce48
Add arm64 .deb and .rpm builds
FnTm Jun 22, 2021
9d98a82
Merge pull request #891 from FnTm/develop
ajvb Mar 4, 2022
baec2a5
Merge branch 'develop' into feature/testsSholdNotFailFast
ikedam Mar 5, 2022
63fa89c
Merge remote-tracking branch 'remotes/origin/develop' into feature/90…
ikedam Mar 5, 2022
b926cf9
Build alpine container in CI (#870)
ikedam Jul 22, 2021
e801ca3
Merge pull request #909 from ikedam/feature/testsSholdNotFailFast
ajvb Mar 8, 2022
035672f
prep v3.7.2
ajvb Mar 8, 2022
b67c7a7
Fixed CHANGELOG formatting
ajvb Mar 8, 2022
3370591
Merge pull request #1020 from mozilla/ajvb/prep-v3.7.2
ajvb Mar 8, 2022
86f500d
Merge pull request #1021 from mozilla/develop
ajvb Mar 9, 2022
234bf9f
Upgrade all dependencies
ajvb Mar 9, 2022
6283fbe
Merge pull request #1024 from mozilla/ajvb/upgrade-packages
ajvb Mar 9, 2022
4277de4
Remove duplicated stage from Dockerfile.alpine
shouichi Mar 9, 2022
605fb27
Explicitly build linux amd64 binary
FnTm Mar 10, 2022
7d94fdb
Merge pull request #1026 from FnTm/explicit-linux-build
ajvb Mar 10, 2022
e682723
Merge pull request #1025 from shouichi/remove-duplicated-stage
ajvb Mar 10, 2022
7ebee3d
This fixes a bug with age encryption when specifying multiple age rec…
cedi Mar 20, 2022
b5f5f28
Make `masterKeyFromRecipient` private
cedi Mar 20, 2022
1dc90ad
Add tests for single key
cedi Mar 22, 2022
66090e7
Merge pull request #966 from cedi/fix/sops-multi-recipient
ajvb Mar 22, 2022
e2c0479
Merge pull request #908 from ikedam/feature/907_FixEmptyYaml
ajvb Mar 22, 2022
dea9bf9
Merge pull request #1018 from ikedam/feature/870_EnsureAlpineBuildWithCi
ajvb Mar 22, 2022
3875b00
Use latest dockerd in CI to allow build alpine image (#870)
ikedam Mar 25, 2022
268b5ff
Merge pull request #1032 from ikedam/feature/870_UseLatestDockerd
ajvb Mar 25, 2022
7138185
keyservice: accept KeyServiceServer in LocalClient
hiddeco Mar 31, 2022
1bb30e2
Limit role session name length to 64 characters.
ajvb Apr 4, 2022
0f8c335
Merge pull request #1037 from mozilla/ajvb/limit-role-length
ajvb Apr 4, 2022
f5195eb
Merge pull request #1035 from hiddeco/localclient-server-interface
ajvb Apr 5, 2022
a01208c
Update golang.org/x/crypto
hiddeco Apr 20, 2022
e128fa2
Update keyservice implementation dependencies
hiddeco Apr 20, 2022
220b652
Update golang.org/x/{net,oauth2,sys} dependencies
hiddeco Apr 20, 2022
477b61f
Update remaining dependencies
hiddeco Apr 20, 2022
25817ed
Replace x/crypto/openpgp with ProtonMail/go-crypto
hiddeco Apr 20, 2022
07aea97
Merge remote-tracking branch 'upstream/develop' into develop
joshkaplinsky Apr 25, 2022
9eb7eb8
Merge pull request #1045 from hiddeco/update-deps
ajvb Apr 25, 2022
4ffb54c
Use custom GOOGLE_CREDENTIALS or fallback to default
joshkaplinsky May 3, 2022
17fb03f
Merge remote-tracking branch 'upstream/develop' into develop
joshkaplinsky May 3, 2022
cdad251
Merge pull request #953 from joshkaplinsky/develop
ajvb May 6, 2022
15583bd
prep for v3.7.3
ajvb May 2, 2022
1fb588e
Merge pull request #1053 from mozilla/ajvb/prep-v3.7.3
ajvb May 9, 2022
e1edc05
Merge pull request #1056 from mozilla/develop
ajvb May 9, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
109 changes: 109 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
version: 2.1

workflows:
build-and-deploy:
jobs:
- build
- push:
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
jobs:
build:
working_directory: /go/src/go.mozilla.org/sops
docker:
- image: circleci/golang:1.13
resource_class: large
steps:
- checkout
- setup_remote_docker:
version: 20.10.11
- run:
name: Build containers
command: |
docker build -t mozilla/sops .
docker tag mozilla/sops "mozilla/sops:$CIRCLE_SHA1"
- run:
name: Build containers (alpine)
command: |
# Just to ensure the container can be built.
docker build -f Dockerfile.alpine -t mozilla/sops:alpine .

push:
machine:
image: ubuntu-2004:202111-02
resource_class: large
steps:
- checkout
- run:
name: semver check
command: |
MAJOR=$(echo ${CIRCLE_TAG#v} | cut -d"." -f1)
MINOR=$(echo ${CIRCLE_TAG#v} | cut -d"." -f2)
PATCH=$(echo ${CIRCLE_TAG#v} | cut -d"." -f3)
echo "export MAJOR=${MAJOR}" >> $BASH_ENV
echo "export MINOR=${MINOR}" >> $BASH_ENV
echo "export PATCH=${PATCH}" >> $BASH_ENV

if [ -z $MAJOR ];then
cat \<< EOF
Failure Info:

This job uses the semver from the git TAG as the public version to publish.

- This should only run on workflows triggered by a tag.
- The tag name should be a semver like 'v1.2.3'
- The version should follow conventions documented at https://github.com/fsaintjacques/semver-tool
EOF
exit 1
fi
- run:
name: Build containers
command: |
docker build -t mozilla/sops .
docker build -f Dockerfile.alpine -t mozilla/sops:alpine .
- run:
name: Tag & Push containers
command: |
#latest
bin/ci/deploy_dockerhub.sh "latest"
bin/ci/deploy_dockerhub.sh "alpine"

# by sha
echo "Tag and push mozilla/sops:$CIRCLE_SHA1"
docker tag mozilla/sops "mozilla/sops:$CIRCLE_SHA1"
bin/ci/deploy_dockerhub.sh "$CIRCLE_SHA1"

# no sha for alpine

# by semver
# v1.2.3
if [ ! -z $PATCH ];then
echo "Tag and Push mozilla/sops:v$MAJOR.$MINOR.$PATCH"
docker tag mozilla/sops "mozilla/sops:v$MAJOR.$MINOR.$PATCH"
bin/ci/deploy_dockerhub.sh "v$MAJOR.$MINOR.$PATCH"

echo "Tag and Push mozilla/sops:v$MAJOR.$MINOR.$PATCH-alpine"
docker tag mozilla/sops:alpine "mozilla/sops:v$MAJOR.$MINOR.$PATCH-alpine"
bin/ci/deploy_dockerhub.sh "v$MAJOR.$MINOR.$PATCH-alpine"
fi
# v1.2
if [ ! -z $MINOR ];then
echo "Tag and Push mozilla/sops:v$MAJOR.$MINOR"
docker tag mozilla/sops "mozilla/sops:v$MAJOR.$MINOR"
bin/ci/deploy_dockerhub.sh "v$MAJOR.$MINOR"

echo "Tag and Push mozilla/sops:v$MAJOR.$MINOR-alpine"
docker tag mozilla/sops:alpine "mozilla/sops:v$MAJOR.$MINOR-alpine"
bin/ci/deploy_dockerhub.sh "v$MAJOR.$MINOR-alpine"
fi
# v1
echo "Tag and Push mozilla/sops:v$MAJOR"
docker tag mozilla/sops "mozilla/sops:v$MAJOR"
bin/ci/deploy_dockerhub.sh "v$MAJOR"

echo "Tag and Push mozilla/sops:v$MAJOR-alpine"
docker tag mozilla/sops:alpine "mozilla/sops:v$MAJOR-alpine"
bin/ci/deploy_dockerhub.sh "v$MAJOR-alpine"
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/.git
/Dockerfile
/Dockerfile.alpine
96 changes: 96 additions & 0 deletions .github/workflows/cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: CLI

on:
push:
branches:
- develop
- master
pull_request:
branches:
- develop
- master

jobs:
build:
name: Build and test ${{ matrix.os }} ${{ matrix.arch }}
runs-on: ubuntu-latest
strategy:
matrix:
os: [linux, darwin, windows]
arch: [amd64, arm64]
exclude:
- os: windows
arch: arm64
env:
VAULT_VERSION: "1.1.3"
VAULT_TOKEN: "root"
VAULT_ADDR: "http://127.0.0.1:8200"
steps:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install git -y
- name: Set up Go 1.17
uses: actions/setup-go@v2
with:
go-version: 1.17
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build Linux and Darwin
if: matrix.os != 'windows'
run: GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -o sops-${{ matrix.os }}-${{ matrix.arch }}-${{ github.sha }} -v ./cmd/sops
- name: Build Windows
if: matrix.os == 'windows'
run: GOOS=${{ matrix.os }} go build -o sops-${{ matrix.os }}-${{ github.sha }} -v ./cmd/sops
- name: Import test GPG keys
run: for i in 1 2 3 4 5; do gpg --import pgp/sops_functional_tests_key.asc && break || sleep 15; done
- name: Test
run: make test
- name: Upload artifact for Linux and Darwin
if: matrix.os != 'windows'
uses: actions/upload-artifact@v2
with:
name: sops-${{ matrix.os }}-${{ matrix.arch }}-${{ github.sha }}
path: sops-${{ matrix.os }}-${{ matrix.arch }}-${{ github.sha }}
- name: Upload artifact for Windows
if: matrix.os == 'windows'
uses: actions/upload-artifact@v2
with:
name: sops-${{ matrix.os }}-${{ github.sha }}
path: sops-${{ matrix.os }}-${{ github.sha }}
test:
name: Functional tests
runs-on: ubuntu-latest
needs: [build]
env:
VAULT_VERSION: "1.1.3"
VAULT_TOKEN: "root"
VAULT_ADDR: "http://127.0.0.1:8200"
steps:
- name: Install rustup
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y --default-toolchain 1.47.0
- name: Check out code
uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: sops-linux-amd64-${{ github.sha }}
- name: Move SOPS binary
run: mv sops-linux-amd64-${{ github.sha }} ./functional-tests/sops
- name: Make SOPS binary executable
run: chmod +x ./functional-tests/sops
- name: Download Vault
run: curl -O "https://releases.hashicorp.com/vault/${VAULT_VERSION}/vault_${VAULT_VERSION}_linux_amd64.zip" && sudo unzip vault_${VAULT_VERSION}_linux_amd64.zip -d /usr/local/bin/
- name: Start Vault server
run: vault server -dev -dev-root-token-id="$VAULT_TOKEN" &
- name: Enable Vault KV
run: vault secrets enable -version=1 kv
- name: Import test GPG keys
run: for i in 1 2 3 4 5; do gpg --import pgp/sops_functional_tests_key.asc && break || sleep 15; done
- name: Run tests
run: cargo test
working-directory: ./functional-tests
65 changes: 65 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Release

on:
push:
tags:
- "v*"

jobs:
tagged-release:
name: "Tagged Release"
runs-on: ubuntu-latest

steps:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install git ruby rpm -y
- name: Install fpm
run: gem install fpm || sudo gem install fpm
- name: Set up Go 1.17
uses: actions/setup-go@v2
with:
go-version: 1.17
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Go vendor
run: go mod vendor
- name: Make release directory
run: mkdir dist
- name: Build deb and rpm
run: make deb-pkg rpm-pkg
- name: Move deb and rpm into release directory
run: mv *.deb *.rpm dist/
- name: Set RELEASE_VERSION
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set RELEASE_NUMBER
run: echo "RELEASE_NUMBER=$(echo $RELEASE_VERSION | cut -c2-)" >> $GITHUB_ENV
- name: Build linux amd64 binary
run: GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -mod vendor -o dist/sops-${{ env.RELEASE_VERSION }}.linux.amd64 go.mozilla.org/sops/v3/cmd/sops && cp dist/sops-${{ env.RELEASE_VERSION }}.linux.amd64 dist/sops-${{ env.RELEASE_VERSION }}.linux
- name: Build linux arm64 binary
run: GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -mod vendor -o dist/sops-${{ env.RELEASE_VERSION }}.linux.arm64 go.mozilla.org/sops/v3/cmd/sops
- name: Build darwin amd64 binary
run: GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -mod vendor -o dist/sops-${{ env.RELEASE_VERSION }}.darwin.amd64 go.mozilla.org/sops/v3/cmd/sops
- name: Copy darwin amd64 to have a no-architecture labeled version
run: cp dist/sops-${{ env.RELEASE_VERSION }}.darwin.amd64 dist/sops-${{ env.RELEASE_VERSION }}.darwin
- name: Build darwin arm64 binary
run: GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 go build -mod vendor -o dist/sops-${{ env.RELEASE_VERSION }}.darwin.arm64 go.mozilla.org/sops/v3/cmd/sops
- name: Build windows binary
run: GOOS=windows CGO_ENABLED=0 go build -mod vendor -o dist/sops-${{ env.RELEASE_VERSION }}.exe go.mozilla.org/sops/v3/cmd/sops
- name: Create release
uses: "mozilla/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: true
files: |
dist/sops-${{ env.RELEASE_VERSION }}.exe
dist/sops-${{ env.RELEASE_VERSION }}.darwin.amd64
dist/sops-${{ env.RELEASE_VERSION }}.darwin.arm64
dist/sops-${{ env.RELEASE_VERSION }}.darwin
dist/sops-${{ env.RELEASE_VERSION }}.linux.amd64
dist/sops-${{ env.RELEASE_VERSION }}.linux.arm64
dist/sops-${{ env.RELEASE_VERSION }}.linux
dist/sops_${{ env.RELEASE_NUMBER }}_amd64.deb
dist/sops_${{ env.RELEASE_NUMBER }}_arm64.deb
dist/sops-${{ env.RELEASE_NUMBER }}-1.x86_64.rpm
dist/sops-${{ env.RELEASE_NUMBER }}-1.aarch64.rpm
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
target
Cargo.lock
vendor/
coverage.txt
profile.out
4 changes: 3 additions & 1 deletion .sops.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
creation_rules:
- pgp: 1022470DE3F0BC54BC6AB62DE05550BC07FB1A0A
- pgp: >-
FBC7B9E2A4F9289AC0C1D4843D16CEE4A27381B4,
D7229043384BCC60326C6FB9D8720D957C3D3074
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

Loading