Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/.devenv/
/.direnv/
/.github/
/bin/
/build/
Expand Down
4 changes: 0 additions & 4 deletions .envrc

This file was deleted.

16 changes: 0 additions & 16 deletions .github/renovate.json

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ jobs:
retention-days: 5

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@0499de31b99561a6d14a36a5f662c2a54f91beee # v3.29.5
uses: github/codeql-action/upload-sarif@e12f0178983d466f2f6028f5cc7a6d786fd97f4b # v3.29.5
with:
sarif_file: trivy-results.sarif

Expand Down Expand Up @@ -323,6 +323,6 @@ jobs:
retention-days: 5

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@0499de31b99561a6d14a36a5f662c2a54f91beee # v3.29.5
uses: github/codeql-action/upload-sarif@e12f0178983d466f2f6028f5cc7a6d786fd97f4b # v3.29.5
with:
sarif_file: trivy-results.sarif
102 changes: 41 additions & 61 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0

- name: Set up Nix
uses: cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # v27
- name: Set up Go
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
go-version-file: '.go-version'

- name: Set up Go cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
Expand All @@ -37,11 +36,8 @@ jobs:
restore-keys: |
${{ github.job }}-${{ runner.os }}-go-

- name: Prepare Nix shell
run: nix develop --impure .#ci

- name: Build
run: nix develop --impure .#ci -c make build
run: make build

test:
name: Test
Expand All @@ -51,11 +47,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Set up Nix
uses: cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # v27
- name: Set up Go
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
go-version-file: '.go-version'

- name: Set up Go cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
Expand All @@ -67,11 +62,8 @@ jobs:
restore-keys: |
${{ github.job }}-${{ runner.os }}-go-

- name: Prepare Nix shell
run: nix develop --impure .#ci

- name: Test
run: nix develop --impure .#ci -c make test
run: make test

lint:
name: Lint
Expand All @@ -81,11 +73,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Set up Nix
uses: cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # v27
- name: Set up Go
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
go-version-file: '.go-version'

- name: Set up Go cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
Expand All @@ -97,11 +88,25 @@ jobs:
restore-keys: |
${{ github.job }}-${{ runner.os }}-go-

- name: Prepare Nix shell
run: nix develop --impure .#ci
- name: Make deps
run: make deps

- name: Lint
run: nix develop --impure .#ci -c make lint -j
- name: Lint Go code
run: make lint-go

- name: Lint Helm charts
run: make lint-helm

- name: Run Hadolint
uses: hadolint/hadolint-action@v3.3.0
with:
dockerfile: Dockerfile
config: .hadolint.yaml

- name: Run Yamllint
run: |
pip install --user yamllint
yamllint .

license-check:
name: License check
Expand All @@ -111,11 +116,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Set up Nix
uses: cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # v27
- name: Set up Go
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
go-version-file: '.go-version'

- name: Set up Go cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
Expand All @@ -137,39 +141,19 @@ jobs:
licensei-v1-main
licensei-v1

- name: Prepare Nix shell
run: nix develop --impure .#ci
- name: Make deps
run: make deps

- name: Populate license cache
run: nix develop --impure .#ci -c licensei cache
run: make license-cache
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Check licenses
run: nix develop --impure .#ci -c make license-check
run: make license-check
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

dev:
name: Developer environment
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Set up Nix
uses: cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # v27
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}

- name: Check
run: nix flake check --impure

- name: Dev shell
run: nix develop --impure

artifacts:
name: Artifacts
uses: ./.github/workflows/artifacts.yaml
Expand Down Expand Up @@ -207,14 +191,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Set up Nix
uses: cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # v27
- name: Set up Go
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}

- name: Prepare Nix shell
run: nix develop --impure .#ci
go-version-file: '.go-version'

- name: Download docker image
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
Expand All @@ -227,7 +207,7 @@ jobs:
name: "[helm-chart] package"

- name: Test
run: nix develop --impure .#ci -c make test-e2e
run: make test-e2e
env:
KIND_K8S_VERSION: ${{ matrix.k8s_version }}
LOAD_IMAGE_ARCHIVE: ${{ github.workspace }}/docker.tar
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/.devenv/
/.direnv/
/.pre-commit-config.yaml
/bin/
/build/
/tmp/
1 change: 1 addition & 0 deletions .go-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.24.1
2 changes: 1 addition & 1 deletion .licensei.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ignored = [

[header]
authors = ["Cisco", "Bank-Vaults Maintainers"]
ignorePaths = [".direnv", ".devenv", "vendor"]
ignorePaths = ["vendor"]
ignoreFiles = ["zz_generated.*.go"]
template = """// Copyright © :YEAR: :AUTHOR:
//
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ lint-yaml:
fmt: ## Run go fmt against code
$(GOLANGCI_LINT_BIN) run --fix

.PHONY: license-cache
license-cache: ## Populate license cache
$(LICENSEI_BIN) cache

.PHONY: license-check
license-check: ## Run license check
$(LICENSEI_BIN) check
Expand Down
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,8 @@ file](https://github.com/bank-vaults/vault-secrets-reloader/blob/main/e2e/deploy

## Development

**For an optimal developer experience, it is recommended to install [Nix](https://nixos.org/download.html) and
[direnv](https://direnv.net/docs/installation.html).**

_Alternatively, install [Go](https://go.dev/dl/) on your computer then run `make deps` to install the rest of the
dependencies._
Install [Go](https://go.dev/dl/) on your computer then run `make deps` to install the rest of the
dependencies.

Make sure Docker is installed with Compose and Buildx.

Expand Down
Loading
Loading