Skip to content

Commit

Permalink
[dev-v2.9] Lifecycle assets propagation (#3964)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasSUSE authored May 24, 2024
1 parent 5469097 commit 2288f8a
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 9 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ forward-port:
check-release-yaml:
./scripts/check-release-yaml

TARGETS := prepare patch clean clean-cache charts list index unzip zip standardize validate template regsync check-images check-rc icon
lifecycle-assets:
@./scripts/pull-scripts
@./bin/charts-build-scripts lifecycle-assets --branch-version=$(BRANCH_VERSION) --debugFlag=$(DEBUG) --chart=$(CHART)

TARGETS := prepare patch clean clean-cache charts list index unzip zip standardize validate template regsync check-images check-rc

$(TARGETS):
@./scripts/pull-scripts
Expand Down
2 changes: 1 addition & 1 deletion configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ helmRepo:

validate:
url: https://github.com/rancher/charts.git
branch: release-v2.9
branch: prod-v2.9
4 changes: 3 additions & 1 deletion docs/makefile.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,6 @@ Please see [`docs/validation.md`](validation.md) for more information on how CI

`make standardize`: Takes an arbitrary Helm repository (defined as any repository with a set of Helm charts under `charts/`) and standardizes it to the expected repository structure of these scripts.

`make clean-cache`: Deletes `.charts-build-scripts/.cache`. Only used if `export USE_CACHE=1` is set, which indicates that you are using the experimental caching feature introduced in v0.3.0 of the scripts. Please see [`docs/experimental.md`](experimental.md) for more information.
`make clean-cache`: Deletes `.charts-build-scripts/.cache`. Only used if `export USE_CACHE=1` is set, which indicates that you are using the experimental caching feature introduced in v0.3.0 of the scripts. Please see [`docs/experimental.md`](experimental.md) for more information.

`make lifecycle-assets BRANCH_VERSION=<2.X> DEBUG="<true || false>"`: Lists all assets versions and then starts to remove older versions with `make remove` enforcing the rules defined at: [New Assets Lifecycle](../README.md#new-assets-lifecycle).
2 changes: 1 addition & 1 deletion scripts/release-validation/pr-review-template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Charts Checklist (built for v0.3.x charts-build-scripts)
## Charts Checklist (built for v0.7.x charts-build-scripts)

### Checkpoint 0: Validate `release.yaml`

Expand Down
11 changes: 7 additions & 4 deletions scripts/remove-asset
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@ fi

# Prune empty directories
set +e
rmdir charts/${CHART} >/dev/null 2>&1
rmdir charts >/dev/null 2>&1
rmdir assets/${CHART} >/dev/null 2>&1
rmdir assets >/dev/null 2>&1
rmdir charts/${CHART} >/dev/null 2>&1
rmdir charts >/dev/null 2>&1
rmdir assets/${CHART} >/dev/null 2>&1
rmdir assets >/dev/null 2>&1
set -e

touch release.yaml
yq e -i ".${CHART} = ((.${CHART} + [\"${VERSION}\"]) | unique)" release.yaml

make index
2 changes: 1 addition & 1 deletion scripts/version
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
set -e

CHARTS_BUILD_SCRIPTS_REPO=https://github.com/rancher/charts-build-scripts.git
CHARTS_BUILD_SCRIPT_VERSION="${CHARTS_BUILD_SCRIPT_VERSION:-v0.5.5}"
CHARTS_BUILD_SCRIPT_VERSION="${CHARTS_BUILD_SCRIPT_VERSION:-v0.7.0}"

0 comments on commit 2288f8a

Please sign in to comment.