diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml deleted file mode 100644 index 4a8b14a5..00000000 --- a/.github/dependabot.yaml +++ /dev/null @@ -1,11 +0,0 @@ -version: 2 -updates: -- package-ecosystem: gomod - directory: "/" - schedule: - interval: daily - open-pull-requests-limit: 10 -- package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "daily" diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index a736c07d..efa79468 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -58,7 +58,7 @@ jobs: name: Set up Go uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 with: - go-version: "1.20" + go-version: "1.21" - name: Build Harp run: | diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index b2f13a1e..e8bc701b 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -72,8 +72,8 @@ jobs: fail-fast: true matrix: go-version: - - "1.19" - "1.20" + - "1.21" permissions: actions: write runs-on: ubuntu-latest @@ -151,7 +151,7 @@ jobs: name: Install Go uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 with: - go-version: '1.20' + go-version: '1.21' - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - @@ -192,7 +192,7 @@ jobs: name: Install Go uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 with: - go-version: '1.20' # test only the latest go version to speed up CI + go-version: '1.21' # test only the latest go version to speed up CI - name: Cache Go modules uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 @@ -208,7 +208,7 @@ jobs: name: Setup gotestsum uses: autero1/action-gotestsum@7263b9d73912eec65f46337689e59fac865c425f # v2.0.0 with: - gotestsum_version: '1.9.0' + gotestsum_version: '1.10.1' - name: Run tests run: gotestsum --format short-verbose ./pkg/... @@ -237,7 +237,7 @@ jobs: name: Install Go uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 with: - go-version: '1.20' # test only the latest go version to speed up CI + go-version: '1.21' # test only the latest go version to speed up CI - name: Cache Go modules uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 @@ -253,7 +253,7 @@ jobs: name: Setup gotestsum uses: autero1/action-gotestsum@7263b9d73912eec65f46337689e59fac865c425f # v2.0.0 with: - gotestsum_version: '1.9.0' + gotestsum_version: '1.10.1' - name: Run tests run: gotestsum --format short-verbose ./pkg/... @@ -282,7 +282,7 @@ jobs: name: Install Go uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 with: - go-version: '1.20' # test only the latest go version to speed up CI + go-version: '1.21' # test only the latest go version to speed up CI - name: Cache Go modules uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 @@ -298,7 +298,7 @@ jobs: name: Setup gotestsum uses: autero1/action-gotestsum@7263b9d73912eec65f46337689e59fac865c425f # v2.0.0 with: - gotestsum_version: '1.9.0' + gotestsum_version: '1.10.1' - name: Run tests run: gotestsum --format short-verbose ./pkg/... diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index f3bc5d47..c5c80b79 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -39,7 +39,7 @@ jobs: name: Set up Go uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 with: - go-version: '1.20' + go-version: '1.21' check-latest: true - name: Cache Go modules diff --git a/CHANGELOG.md b/CHANGELOG.md index 09b79b9b..dc314f50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## 2.1.4 + +### 2022-08-11 + +DIST: + +* CI + * Build with Golang 1.21 + * Dependency updates + ## 2.1.3 ### 2022-07-26 diff --git a/README.md b/README.md index 35cddaaa..ecaa1b4c 100644 --- a/README.md +++ b/README.md @@ -232,7 +232,7 @@ $ nix develop ```sh $ go version -go version go1.19.4 linux/amd64 +go version go1.21 linux/amd64 ``` > Simple go version manager - diff --git a/api/gen/go/cso/v1/secret.pb.go b/api/gen/go/cso/v1/secret.pb.go index e6c274f9..6c6dd748 100644 --- a/api/gen/go/cso/v1/secret.pb.go +++ b/api/gen/go/cso/v1/secret.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0 +// protoc-gen-go v1.31.0 // protoc (unknown) // source: cso/v1/secret.proto diff --git a/api/gen/go/cso/v1/validator_api.pb.go b/api/gen/go/cso/v1/validator_api.pb.go index 9e4f7838..eb4642b3 100644 --- a/api/gen/go/cso/v1/validator_api.pb.go +++ b/api/gen/go/cso/v1/validator_api.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0 +// protoc-gen-go v1.31.0 // protoc (unknown) // source: cso/v1/validator_api.proto diff --git a/api/gen/go/harp/bundle/v1/bundle.pb.go b/api/gen/go/harp/bundle/v1/bundle.pb.go index 67db3ae6..3a43b95a 100644 --- a/api/gen/go/harp/bundle/v1/bundle.pb.go +++ b/api/gen/go/harp/bundle/v1/bundle.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0 +// protoc-gen-go v1.31.0 // protoc (unknown) // source: harp/bundle/v1/bundle.proto diff --git a/api/gen/go/harp/bundle/v1/bundle_api.pb.go b/api/gen/go/harp/bundle/v1/bundle_api.pb.go index 02ad8319..6ac4fafc 100644 --- a/api/gen/go/harp/bundle/v1/bundle_api.pb.go +++ b/api/gen/go/harp/bundle/v1/bundle_api.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0 +// protoc-gen-go v1.31.0 // protoc (unknown) // source: harp/bundle/v1/bundle_api.proto diff --git a/api/gen/go/harp/bundle/v1/patch.pb.go b/api/gen/go/harp/bundle/v1/patch.pb.go index 533ade27..8af833c0 100644 --- a/api/gen/go/harp/bundle/v1/patch.pb.go +++ b/api/gen/go/harp/bundle/v1/patch.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0 +// protoc-gen-go v1.31.0 // protoc (unknown) // source: harp/bundle/v1/patch.proto diff --git a/api/gen/go/harp/bundle/v1/ruleset.pb.go b/api/gen/go/harp/bundle/v1/ruleset.pb.go index 5320022e..0eb24018 100644 --- a/api/gen/go/harp/bundle/v1/ruleset.pb.go +++ b/api/gen/go/harp/bundle/v1/ruleset.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0 +// protoc-gen-go v1.31.0 // protoc (unknown) // source: harp/bundle/v1/ruleset.proto diff --git a/api/gen/go/harp/bundle/v1/template.pb.go b/api/gen/go/harp/bundle/v1/template.pb.go index 7dbb0d15..fc9a29e9 100644 --- a/api/gen/go/harp/bundle/v1/template.pb.go +++ b/api/gen/go/harp/bundle/v1/template.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0 +// protoc-gen-go v1.31.0 // protoc (unknown) // source: harp/bundle/v1/template.proto diff --git a/api/gen/go/harp/container/v1/container.pb.go b/api/gen/go/harp/container/v1/container.pb.go index 4c88e3ac..610a206f 100644 --- a/api/gen/go/harp/container/v1/container.pb.go +++ b/api/gen/go/harp/container/v1/container.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0 +// protoc-gen-go v1.31.0 // protoc (unknown) // source: harp/container/v1/container.proto diff --git a/build/mage/docker/const.go b/build/mage/docker/const.go index ea313757..8ecdf38a 100644 --- a/build/mage/docker/const.go +++ b/build/mage/docker/const.go @@ -7,8 +7,7 @@ package docker const ( // Standard build mode. - golangImage = "golang:1.18" - golangVersion = "1.18.4" - goBoringVersion = "1.18.4b7" - toolImage = "elastic/harp-tools:latest" + golangImage = "golang:1.21" + golangVersion = "1.21" + toolImage = "elastic/harp-tools:latest" ) diff --git a/build/mage/docker/tools.go b/build/mage/docker/tools.go index 14911876..6124da79 100644 --- a/build/mage/docker/tools.go +++ b/build/mage/docker/tools.go @@ -56,13 +56,6 @@ LABEL \ org.opencontainers.image.version=$VERSION \ org.opencontainers.image.licences="ASL2" -{{ if .OverrideGoBoringVersion }} -# Override goboring version -RUN wget https://storage.googleapis.com/go-boringcrypto/go{{ .GoBoringVersion }}.linux-amd64.tar.gz \ - && rm -rf /usr/local/go && tar -C /usr/local -xzf go{{ .GoBoringVersion }}.linux-amd64.tar.gz \ - && rm go{{ .GoBoringVersion }}.linux-amd64.tar.gz -{{ end }} - # hadolint ignore=DL3008 RUN set -eux; \ apt-get update -y && \ @@ -144,26 +137,18 @@ func Tools() error { if os.Getenv("GOLANG_VERSION") != "" { golangVersion = os.Getenv("GOLANG_VERSION") } - goBoringVersion := goBoringVersion - overrideGoBoringVersion := false - if os.Getenv("GOBORING_VERSION") != "" { - goBoringVersion = os.Getenv("GOBORING_VERSION") - overrideGoBoringVersion = true - } fipsMode := "0" if os.Getenv("FIPS_MODE") == "1" { fipsMode = os.Getenv("FIPS_MODE") } buf, err := merge(dockerToolTemplate, map[string]interface{}{ - "BuildDate": time.Now().Format(time.RFC3339), - "Version": git.Tag, - "VcsRef": git.Revision, - "GolangImage": golangBaseImage, - "GolangVersion": golangVersion, - "OverrideGoBoringVersion": overrideGoBoringVersion, - "GoBoringVersion": goBoringVersion, - "FIPSMode": fipsMode, + "BuildDate": time.Now().Format(time.RFC3339), + "Version": git.Tag, + "VcsRef": git.Revision, + "GolangImage": golangBaseImage, + "GolangVersion": golangVersion, + "FIPSMode": fipsMode, }) if err != nil { return err diff --git a/build/mage/golang/build.go b/build/mage/golang/build.go index a82b076e..ee429666 100644 --- a/build/mage/golang/build.go +++ b/build/mage/golang/build.go @@ -111,7 +111,7 @@ func Build(name, packageName, version string, opts ...BuildOption) func() error if os.Getenv("HARP_BUILD_FIPS_MODE") == "1" { artifactName = fmt.Sprintf("%s-fips", artifactName) compilationFlags = append(compilationFlags, "fips") - buildTags = "-tags=fips" + buildTags = "-tags=fips,goexperiment.boringcrypto" } // Check if CGO is enabled diff --git a/build/mage/golang/init.go b/build/mage/golang/init.go index 389633bb..48f426f7 100644 --- a/build/mage/golang/init.go +++ b/build/mage/golang/init.go @@ -15,8 +15,8 @@ import ( // Keep only last 2 versions. var goVersions = []string{ + "~1.21", "~1.20", - "~1.19", } func init() { diff --git a/default.nix b/default.nix index b3e80f33..f1b12d0d 100644 --- a/default.nix +++ b/default.nix @@ -6,7 +6,7 @@ buildGoModule rec { src = lib.cleanSource ./.; subPackages = [ "cmd/harp" ]; - vendorSha256 = "sha256-9D3JLNkXoQL+oa+P+i3uCI+wmpStLX5uWtHnZZrpRAc="; + vendorSha256 = "sha256-nCLwRCpdbcam1OA82fEyfGPTc7yShJC2ug8NPV0vUBQ="; ldflags = [ "-s" "-w" "-buildid=" "-X zntr.io/harp/v2/build/version.Name=harp" diff --git a/flake.lock b/flake.lock index 7dc254da..4cee76b9 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1690266062, - "narHash": "sha256-ExihC8Pxu4iRZAKhiL6rxWrRCAmW9KXju1xCV50gzeU=", + "lastModified": 1691683125, + "narHash": "sha256-FMU62G57HDbJwU+9V3q7I0mBaQYTYQdtPNlJt2t5/A4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d0991cc3e51b8dbd3a7a3d8b22d43b125cdba588", + "rev": "4d2389b927696ef8da4ef76b03f2d306faf87929", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index becd7abf..a7da9e87 100644 --- a/flake.nix +++ b/flake.nix @@ -37,16 +37,16 @@ devtools = { gci = pkgs.buildGoModule rec { pname = "gci"; - version = "b9a2597d93b0cfa2267fb682665be8ef86863dee"; + version = "52e43a48497695a73d350b04a7e03423e3dd4909"; src = pkgs.fetchFromGitHub { owner = "daixiang0"; repo = "gci"; rev = "${version}"; - sha256 = "sha256-qWEEcIbTgYmGVnnTW+hM8e8nw5VLWN1TwzdUIZrxF3s="; + sha256 = "sha256-EBklnsZR8VwM89BztligZBDapmgyKuI9Ns8EFFo3ai8="; }; - vendorSha256 = "sha256-dlt+i/pEP3RzW4JwndKTU7my2Nn7/2rLFlk8n1sFR60="; + vendorSha256 = "sha256-g7htGfU6C2rzfu8hAn6SGr0ZRwB8ZzSf9CgHYmdupE8="; nativeBuildInputs = [ pkgs.installShellFiles ]; };