Skip to content

Commit

Permalink
Add update-security-insights directive (kubernetes-sigs#2684)
Browse files Browse the repository at this point in the history
* Add update-security-insights directive

* Use GIT_TAG instead of RELEASE_VERSION
  • Loading branch information
IrvingMg authored and kannon92 committed Nov 19, 2024
1 parent af088b5 commit dd8bf1d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/NEW_RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Please do not remove items from the checklist
- Release notes in the `CHANGELOG`
- `version` in `site/hugo.toml`
- `appVersion` in `charts/kueue/Chart.yaml`
- `last-updated`, `last-reviewed`, `commit-hash`, `project-release`, `distribution-points` and `sbom-file` in `SECURITY-INSIGHTS.yaml`
- `SECURITY-INSIGHTS.yaml` values by running `make update-security-insights GIT_TAG=$VERSION`
- [ ] For a major or minor release, prepare the repo for the next version:
- [ ] create an unannotated _devel_ tag in the
`main` branch, on the first commit that gets merged after the release
Expand Down
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,15 @@ prepare-release-branch: yq kustomize ## Prepare the release branch with the rele
$(YQ) e '.appVersion = "$(RELEASE_VERSION)"' -i charts/kueue/Chart.yaml
@$(call clean-manifests)

.PHONY: update-security-insights
update-security-insights: yq
$(YQ) e '.header.last-updated = "$(shell git log -1 --date=short --format=%cd $(GIT_TAG))"' -i SECURITY-INSIGHTS.yaml
$(YQ) e '.header.last-reviewed = "$(shell git log -1 --date=short --format=%cd $(GIT_TAG))"' -i SECURITY-INSIGHTS.yaml
$(YQ) e '.header.commit-hash = "$(shell git rev-list -1 $(GIT_TAG))"' -i SECURITY-INSIGHTS.yaml
$(YQ) e '.header.project-release = "$(shell echo "$(GIT_TAG)" | $(SED) 's/v//g')"' -i SECURITY-INSIGHTS.yaml
$(YQ) e '.distribution-points[0] = "https://github.com/kubernetes-sigs/kueue/releases/download/$(GIT_TAG)/manifests.yaml"' -i SECURITY-INSIGHTS.yaml
$(YQ) e '.dependencies.sbom[0].sbom-file = "https://github.com/kubernetes-sigs/kueue/releases/download/$(GIT_TAG)/kueue-$(GIT_TAG).spdx.json"' -i SECURITY-INSIGHTS.yaml

##@ Debug

# Build an image that can be used with kubectl debug
Expand Down

0 comments on commit dd8bf1d

Please sign in to comment.