Skip to content

Commit

Permalink
chore(deps): Update dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Rene Leonhardt <[email protected]>
  • Loading branch information
reneleonhardt committed Jun 12, 2024
1 parent 0da6be8 commit 227b53b
Show file tree
Hide file tree
Showing 9 changed files with 87 additions and 78 deletions.
12 changes: 11 additions & 1 deletion .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2

updates:
- package-ecosystem: "docker"
directory: "/"
directory: "/.release"
labels: ["dependencies"]
schedule:
# By default, this will be on a Monday.
Expand Down Expand Up @@ -39,3 +39,13 @@ updates:
go:
patterns:
- "*"

- package-ecosystem: "cargo"
directory: "/functional-tests"
labels: ["area/CI"]
schedule:
interval: "weekly"
groups:
ci:
patterns:
- "*"
29 changes: 15 additions & 14 deletions .github/workflows/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,25 @@ permissions:

jobs:
build:
name: Build and test ${{ matrix.os }} ${{ matrix.arch }}
name: Build and test ${{ matrix.go-version }} ${{ matrix.os }} ${{ matrix.arch }}
runs-on: ubuntu-latest
strategy:
matrix:
os: [linux, darwin, windows]
arch: [amd64, arm64]
go-version: ['1.21', '1.22']
exclude:
- os: windows
arch: arm64
env:
VAULT_VERSION: "1.1.3"
VAULT_VERSION: "1.14.0"
VAULT_TOKEN: "root"
VAULT_ADDR: "http://127.0.0.1:8200"
steps:
- name: Set up Go 1.21
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version: '1.21'
go-version: ${{ matrix.go-version }}
id: go

- name: Check out code into the Go module directory
Expand All @@ -51,11 +52,11 @@ jobs:

- 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
run: GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -o sops-${{ matrix.go-version }}-${{ 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
run: GOOS=${{ matrix.os }} go build -o sops-${{ matrix.go-version }}-${{ 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
Expand All @@ -67,36 +68,36 @@ jobs:
if: matrix.os != 'windows'
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: sops-${{ matrix.os }}-${{ matrix.arch }}-${{ github.sha }}
path: sops-${{ matrix.os }}-${{ matrix.arch }}-${{ github.sha }}
name: sops-${{ matrix.go-version }}-${{ matrix.os }}-${{ matrix.arch }}-${{ github.sha }}
path: sops-${{ matrix.go-version }}-${{ matrix.os }}-${{ matrix.arch }}-${{ github.sha }}

- name: Upload artifact for Windows
if: matrix.os == 'windows'
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: sops-${{ matrix.os }}-${{ github.sha }}
path: sops-${{ matrix.os }}-${{ github.sha }}
name: sops-${{ matrix.go-version }}-${{ matrix.os }}-${{ github.sha }}
path: sops-${{ matrix.go-version }}-${{ matrix.os }}-${{ github.sha }}
test:
name: Functional tests
runs-on: ubuntu-latest
needs: [build]
env:
VAULT_VERSION: "1.1.3"
VAULT_VERSION: "1.14.0"
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.70.0
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y --default-toolchain 1.78.0

- name: Check out code
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: sops-linux-amd64-${{ github.sha }}
name: sops-1.22-linux-amd64-${{ github.sha }}

- name: Move SOPS binary
run: mv sops-linux-amd64-${{ github.sha }} ./functional-tests/sops
run: mv sops-1.22-linux-amd64-${{ github.sha }} ./functional-tests/sops

- name: Make SOPS binary executable
run: chmod +x ./functional-tests/sops
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v4.0.1
with:
go-version: 1.21.x
go-version: 1.22.x
cache: false

- name: Setup Syft
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
id: goreleaser
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
with:
version: 1.21.x
version: 1.22.x
args: release --clean --timeout 1h
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .release/alpine.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.18
FROM alpine:3.20

RUN apk --no-cache add \
ca-certificates \
Expand Down
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ GITHUB_REPOSITORY ?= github.com/getsops/sops
STATICCHECK := $(BIN_DIR)/staticcheck
STATICCHECK_VERSION := latest

SYFT := $(BIN_DIR)/syft
SYFT_VERSION ?= v0.87.0
SYFT_VERSION ?= v1.6.0

GORELEASER := $(BIN_DIR)/goreleaser
GORELEASER_VERSION ?= v1.20.0
GORELEASER_VERSION ?= v2.0.1

RSTCHECK := $(shell command -v rstcheck)
MARKDOWNLINT := $(shell command -v mdl)
Expand Down Expand Up @@ -106,11 +105,11 @@ install-staticcheck:

.PHONY: install-goreleaser
install-goreleaser:
$(call go-install-tool,$(GORELEASER),github.com/goreleaser/goreleaser@$(GORELEASER_VERSION),$(GORELEASER_VERSION))
$(call go-install-tool,$(GORELEASER),github.com/goreleaser/goreleaser/v2@$(GORELEASER_VERSION),$(GORELEASER_VERSION))

.PHONY: install-syft
install-syft:
$(call go-install-tool,$(SYFT),github.com/anchore/syft/cmd/syft@$(SYFT_VERSION),$(SYFT_VERSION))
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- $(SYFT_VERSION)

# go-install-tool will 'go install' any package $2 and install it to $1.
define go-install-tool
Expand Down
8 changes: 4 additions & 4 deletions functional-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ edition = "2021"
authors = ["Adrian Utrilla <[email protected]>"]

[dependencies]
tempdir = "0.3.5"
tempfile = "3"
serde = "1.0"
serde_json = "1.0.99"
serde_yaml = "0.9.22"
serde_json = "1.0"
serde_yaml = "0.9"
serde_derive = "1.0"
lazy_static = "1.4.0"
lazy_static = "1.4"
19 changes: 9 additions & 10 deletions functional-tests/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
extern crate serde;
extern crate serde_json;
extern crate serde_yaml;
extern crate tempdir;
#[macro_use]
extern crate tempfile;
#[cfg_attr(test, macro_use)]
extern crate lazy_static;
#[macro_use]
extern crate serde_derive;

#[cfg(test)]
mod tests {
Expand All @@ -19,7 +17,8 @@ mod tests {
use std::io::{Read, Write};
use std::path::Path;
use std::process::Command;
use tempdir::TempDir;
use tempfile::Builder;
use tempfile::TempDir;
const SOPS_BINARY_PATH: &'static str = "./sops";
const KMS_KEY: &'static str = "FUNCTIONAL_TEST_KMS_ARN";

Expand All @@ -37,7 +36,7 @@ mod tests {

lazy_static! {
static ref TMP_DIR: TempDir =
TempDir::new("sops-functional-tests").expect("Unable to create temporary directory");
Builder::new().prefix("sops-functional-tests").tempdir().expect("Unable to create temporary directory");
}

fn prepare_temp_file(name: &str, contents: &[u8]) -> String {
Expand Down Expand Up @@ -584,7 +583,7 @@ b: ba"#
let file_path = "res/comments.yaml";
let output = Command::new(SOPS_BINARY_PATH)
.arg("encrypt")
.arg(file_path.clone())
.arg(file_path)
.output()
.expect("Error running sops");
assert!(output.status.success(), "SOPS didn't return successfully");
Expand All @@ -603,7 +602,7 @@ b: ba"#
let file_path = "res/comments_list.yaml";
let output = Command::new(SOPS_BINARY_PATH)
.arg("encrypt")
.arg(file_path.clone())
.arg(file_path)
.output()
.expect("Error running sops");
assert!(output.status.success(), "SOPS didn't return successfully");
Expand All @@ -622,7 +621,7 @@ b: ba"#
let file_path = "res/comments.enc.yaml";
let output = Command::new(SOPS_BINARY_PATH)
.arg("decrypt")
.arg(file_path.clone())
.arg(file_path)
.output()
.expect("Error running sops");
assert!(output.status.success(), "SOPS didn't return successfully");
Expand All @@ -641,7 +640,7 @@ b: ba"#
let file_path = "res/comments_unencrypted_comments.yaml";
let output = Command::new(SOPS_BINARY_PATH)
.arg("decrypt")
.arg(file_path.clone())
.arg(file_path)
.output()
.expect("Error running sops");
assert!(output.status.success(), "SOPS didn't return successfully");
Expand Down
26 changes: 13 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ go 1.21

require (
cloud.google.com/go/kms v1.17.1
cloud.google.com/go/storage v1.39.1
cloud.google.com/go/storage v1.42.0
filippo.io/age v1.1.1
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.12.0
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.6.0
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.1.0
github.com/ProtonMail/go-crypto v1.1.0-alpha.2
github.com/ProtonMail/go-crypto v1.1.0-alpha.2-proton
github.com/aws/aws-sdk-go-v2 v1.27.2
github.com/aws/aws-sdk-go-v2/config v1.27.18
github.com/aws/aws-sdk-go-v2/credentials v1.17.18
Expand All @@ -19,7 +19,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/sts v1.28.12
github.com/blang/semver v3.5.1+incompatible
github.com/fatih/color v1.17.0
github.com/getsops/gopgagent v0.0.0-20170926210634-4d7ea76ff71a
github.com/getsops/gopgagent v0.0.0-20240527072608-0c14999532fe
github.com/golang/protobuf v1.5.4
github.com/google/go-cmp v0.6.0
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
Expand All @@ -37,17 +37,17 @@ require (
golang.org/x/net v0.26.0
golang.org/x/sys v0.21.0
golang.org/x/term v0.21.0
google.golang.org/api v0.180.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20240509183442-62759503f434
google.golang.org/grpc v1.63.2
google.golang.org/protobuf v1.34.1
google.golang.org/api v0.183.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20240610135401-a8a62080eff3
google.golang.org/grpc v1.64.0
google.golang.org/protobuf v1.34.2
gopkg.in/ini.v1 v1.67.0
gopkg.in/yaml.v3 v3.0.1
)

require (
cloud.google.com/go v0.112.2 // indirect
cloud.google.com/go/auth v0.4.1 // indirect
cloud.google.com/go v0.114.0 // indirect
cloud.google.com/go/auth v0.5.1 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect
cloud.google.com/go/compute/metadata v0.3.0 // indirect
cloud.google.com/go/iam v1.1.8 // indirect
Expand Down Expand Up @@ -125,12 +125,12 @@ require (
go.opentelemetry.io/otel/trace v1.24.0 // indirect
golang.org/x/crypto v0.24.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/oauth2 v0.20.0 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240513163218-0867130af1f8 // indirect
google.golang.org/genproto v0.0.0-20240528184218-531527333157 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
Loading

0 comments on commit 227b53b

Please sign in to comment.