Skip to content

Commit

Permalink
Merge pull request #352 from mhkarimi1383/add-controller-tools-nix
Browse files Browse the repository at this point in the history
feat(chores): Add missing tools to nix-shell
  • Loading branch information
dsharma-dc authored Dec 16, 2024
2 parents 0bb55b4 + 0313fa2 commit 5c68557
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 4 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use nix
4 changes: 3 additions & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ jobs:

- uses: cachix/install-nix-action@v22
- uses: rrbutani/[email protected]
env:
HOME: /home/runner
with:
file: shell.nix
file: shell.nix

- name: Check if the chart follows a valid semver version
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tags
*.swn
*.idea
*.test
coverage.txt
2 changes: 1 addition & 1 deletion docs/developer-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ git remote -v
```
Install the build dependencies.
* Run `make bootstrap` to install the required Go tools
* Run `make bootstrap` to install the required Go tools, Nix users can run `nix-shell`, it will bring up a shell with required tools installed
## Git Development Workflow
Expand Down
2 changes: 2 additions & 0 deletions nix/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.go/
.tmp/
21 changes: 19 additions & 2 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,25 @@ in
pkgs.mkShell {
name = "scripts-shell";
buildInputs = with pkgs; [
chart-testing
ginkgo
git
go_1_19
golint
kubectl
kubernetes-helm
gnumake
minikube
semver-tool
yq-go
chart-testing
];
}
shellHook = ''
export HOME=${builtins.getEnv "HOME"}
export GOPATH=$(pwd)/nix/.go
export GOCACHE=$(pwd)/nix/.go/cache
export TMPDIR=$(pwd)/nix/.tmp
export PATH=$GOPATH/bin:$PATH
mkdir -p "$TMPDIR"
make bootstrap
'';
}

0 comments on commit 5c68557

Please sign in to comment.