diff options
author | Alyssa Ross <hi@alyssa.is> | 2022-01-03 23:55:00 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2022-02-19 11:03:39 +0000 |
commit | f4cf97a04cd5d0b86aa46baec9fb228a8f671c03 (patch) | |
tree | 28192415ff39a661d0001563bf81cc93fa25d16d /nixpkgs/pkgs/applications/networking/cluster/fluxcd | |
parent | f8422837c9bde058e8f2de37702e7e94b2226040 (diff) | |
parent | 18c84ea816348e2a098390101b92d1e39a9dbd45 (diff) | |
download | nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.tar nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.tar.gz nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.tar.bz2 nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.tar.lz nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.tar.xz nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.tar.zst nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.zip |
Merge commit '18c84ea816348e2a098390101b92d1e39a9dbd45'
Conflicts: nixpkgs/nixos/modules/misc/documentation.nix nixpkgs/pkgs/applications/networking/browsers/firefox/packages.nix nixpkgs/pkgs/applications/window-managers/sway/default.nix nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix nixpkgs/pkgs/development/go-modules/generic/default.nix nixpkgs/pkgs/development/interpreters/ruby/default.nix nixpkgs/pkgs/development/interpreters/ruby/patchsets.nix nixpkgs/pkgs/development/libraries/boehm-gc/7.6.6.nix nixpkgs/pkgs/development/python-modules/django-mailman3/default.nix nixpkgs/pkgs/servers/mail/mailman/web.nix nixpkgs/pkgs/top-level/aliases.nix nixpkgs/pkgs/top-level/all-packages.nix nixpkgs/pkgs/top-level/impure.nix
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/cluster/fluxcd')
3 files changed, 39 insertions, 17 deletions
diff --git a/nixpkgs/pkgs/applications/networking/cluster/fluxcd/default.nix b/nixpkgs/pkgs/applications/networking/cluster/fluxcd/default.nix index a33c261bf245..54eaf06e12fb 100644 --- a/nixpkgs/pkgs/applications/networking/cluster/fluxcd/default.nix +++ b/nixpkgs/pkgs/applications/networking/cluster/fluxcd/default.nix @@ -1,18 +1,18 @@ { lib, buildGoModule, fetchFromGitHub, fetchzip, installShellFiles }: let - version = "0.17.2"; - sha256 = "0kcdx4ldnshk4pqq37a7p08xr5cpsjrbrifk9fc3jbiw39m09mhf"; - manifestsSha256 = "1v6md4xh4sq1vmb5a8qvb66l101fq75lmv2s4j2z3walssb5mmgj"; + version = "0.24.1"; + sha256 = "18jzf5kd06c10f45y4crvaqa5r10dhq2ashlhppzrmhigiyavxac"; + manifestsSha256 = "0qbdik65irnwgw7klj5w0z00jxflm855gikpnqb9gsxd7rbw8ysk"; manifests = fetchzip { - url = "https://github.com/fluxcd/flux2/releases/download/v${version}/manifests.tar.gz"; + url = + "https://github.com/fluxcd/flux2/releases/download/v${version}/manifests.tar.gz"; sha256 = manifestsSha256; stripRoot = false; }; -in -buildGoModule rec { +in buildGoModule rec { pname = "fluxcd"; inherit version; @@ -23,21 +23,23 @@ buildGoModule rec { inherit sha256; }; - vendorSha256 = "sha256-glifJ0V3RwS7E6EWZsCa88m0MK883RhPSXCsAmMggVs="; + vendorSha256 = "sha256-HoAVdY+kZLpUEl3mE7obbTzAJUyt5MBPjGhs6ZDSnzU="; - nativeBuildInputs = [ installShellFiles ]; + postUnpack = '' + cp -r ${manifests} source/cmd/flux/manifests + ''; - subPackages = [ "cmd/flux" ]; + patches = [ ./patches/disable-tests-ssh_key.patch ]; ldflags = [ "-s" "-w" "-X main.VERSION=${version}" ]; - postUnpack = '' - cp -r ${manifests} source/cmd/flux/manifests - ''; + subPackages = [ "cmd/flux" ]; # Required to workaround test error: # panic: mkdir /homeless-shelter: permission denied - HOME="$TMPDIR"; + HOME = "$TMPDIR"; + + nativeBuildInputs = [ installShellFiles ]; doInstallCheck = true; installCheckPhase = '' @@ -54,7 +56,8 @@ buildGoModule rec { passthru.updateScript = ./update.sh; meta = with lib; { - description = "Open and extensible continuous delivery solution for Kubernetes"; + description = + "Open and extensible continuous delivery solution for Kubernetes"; longDescription = '' Flux is a tool for keeping Kubernetes clusters in sync with sources of configuration (like Git repositories), and automating @@ -62,6 +65,6 @@ buildGoModule rec { ''; homepage = "https://fluxcd.io"; license = licenses.asl20; - maintainers = with maintainers; [ jlesquembre superherointj ]; + maintainers = with maintainers; [ jlesquembre bryanasdev000 ]; }; } diff --git a/nixpkgs/pkgs/applications/networking/cluster/fluxcd/patches/disable-tests-ssh_key.patch b/nixpkgs/pkgs/applications/networking/cluster/fluxcd/patches/disable-tests-ssh_key.patch new file mode 100644 index 000000000000..3229cf333b40 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/cluster/fluxcd/patches/disable-tests-ssh_key.patch @@ -0,0 +1,19 @@ +--- flux/cmd/flux/create_secret_git_test.go.orig 2021-12-07 13:46:21.196278468 +0100 ++++ flux/cmd/flux/create_secret_git_test.go 2021-12-07 13:49:51.668566955 +0100 +@@ -20,16 +20,6 @@ + args: "create secret git podinfo-auth --url=https://github.com/stefanprodan/podinfo --username=my-username --password=my-password --namespace=my-namespace --export", + assert: assertGoldenFile("./testdata/create_secret/git/secret-git-basic.yaml"), + }, +- { +- name: "ssh key", +- args: "create secret git podinfo-auth --url=ssh://git@github.com/stefanprodan/podinfo --private-key-file=./testdata/create_secret/git/ecdsa.private --namespace=my-namespace --export", +- assert: assertGoldenFile("testdata/create_secret/git/git-ssh-secret.yaml"), +- }, +- { +- name: "ssh key with password", +- args: "create secret git podinfo-auth --url=ssh://git@github.com/stefanprodan/podinfo --private-key-file=./testdata/create_secret/git/ecdsa-password.private --password=password --namespace=my-namespace --export", +- assert: assertGoldenFile("testdata/create_secret/git/git-ssh-secret-password.yaml"), +- }, + } + + for _, tt := range tests { diff --git a/nixpkgs/pkgs/applications/networking/cluster/fluxcd/update.sh b/nixpkgs/pkgs/applications/networking/cluster/fluxcd/update.sh index 9c211f626aaa..1ded63d4d86c 100755 --- a/nixpkgs/pkgs/applications/networking/cluster/fluxcd/update.sh +++ b/nixpkgs/pkgs/applications/networking/cluster/fluxcd/update.sh @@ -20,11 +20,11 @@ setKV () { setKV version ${VERSION} setKV sha256 ${SHA256} setKV manifestsSha256 ${SPEC_SHA256} -setKV vendorSha256 "" +setKV vendorSha256 "0000000000000000000000000000000000000000000000000000" # The same as lib.fakeSha256 cd ../../../../../ set +e -VENDOR_SHA256=$(nix-build --no-out-link -A fluxcd 2>&1 | grep "got:" | cut -d':' -f2 | sed 's| ||g') +VENDOR_SHA256=$(nix-build --no-out-link -A fluxcd 2>&1 >/dev/null | grep "got:" | cut -d':' -f2 | sed 's| ||g') set -e cd - > /dev/null |