Skip to content

Commit

Permalink
Merge pull request #8 from AtomiCloud/new/infrautils
Browse files Browse the repository at this point in the history
new(infra): infralint and infrautils, bundling of infra related tools
  • Loading branch information
kirinnee authored Jan 29, 2025
2 parents 9d111b4 + 5793d50 commit a99f1cc
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ jobs:
.#cyanprint
.#atomiutils
.#gardenio
.#infrautils
.#infralint
-c bash -c '
sg --version &&
upstash --version &&
Expand Down
14 changes: 14 additions & 0 deletions binWrapper/infralint.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{ nixpkgs }:
let pkgs = nixpkgs; in

pkgs.runCommand "infralint"
{
buildInputs = [
pkgs.hadolint
pkgs.helm-docs
];
} ''
mkdir -p $out/bin
cp ${pkgs.hadolint}/bin/* $out/bin/
cp ${pkgs.helm-docs}/bin/* $out/bin/
''
26 changes: 26 additions & 0 deletions binWrapper/infrautils.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{ nixpkgs, gardenio, mirrord }:
let pkgs = nixpkgs; in

pkgs.runCommand "infrautils"
{
buildInputs = [
pkgs.kubernetes-helm
pkgs.kubectl
pkgs.k3d

pkgs.docker
pkgs.tilt

gardenio
mirrord
];
} ''
mkdir -p $out/bin
cp ${pkgs.kubernetes-helm}/bin/* $out/bin/
cp ${pkgs.kubectl}/bin/* $out/bin/
cp ${pkgs.k3d}/bin/* $out/bin/
cp ${pkgs.docker}/bin/* $out/bin/
cp ${pkgs.tilt}/bin/* $out/bin/
cp ${gardenio}/bin/* $out/bin/
cp ${mirrord}/bin/* $out/bin/
''
5 changes: 4 additions & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ let
dotnet = import ./nuget/default.nix { inherit nixpkgs; };

# bin wrapper
bin = {
bin = rec {
mirrord = import ./binWrapper/mirrord.nix { inherit nixpkgs; };
atomiutils = import ./binWrapper/atomiutils.nix { inherit nixpkgs; };
infrautils = import ./binWrapper/infrautils.nix { inherit nixpkgs gardenio mirrord; };
infralint = import ./binWrapper/infralint.nix { inherit nixpkgs; };
gardenio = import ./binWrapper/gardenio.nix { inherit nixpkgs; };

};

rust = import ./rust/default.nix { inherit nixpkgs fenix; };
Expand Down

0 comments on commit a99f1cc

Please sign in to comment.