Skip to content

Commit

Permalink
Charts release validation (#4424)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasSUSE authored Sep 12, 2024
1 parent f1158fc commit 4a19238
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 3 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/charts-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Charts-Release-Validations

on:
pull_request:
branches:
- release-v*

jobs:
build:
name: Checkpoint 0 - release.yaml validation
runs-on: ubuntu-latest
steps:
- name: Checkout base branch
uses: actions/checkout@v4

- name: Checkout PR
run: gh pr checkout ${{ github.event.pull_request.number }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout into branch
run: git checkout -b staging-pr-workflow

- name: Pull scripts
run: sudo make pull-scripts

- name: Validate Charts Release
run: sudo make validate-release-charts BRANCH=${{ github.event.pull_request.base.ref }} GH_TOKEN=${{ secrets.GITHUB_TOKEN }} PR_NUMBER=${{ github.event.pull_request.number }}
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ validate:
@./scripts/pull-scripts
@./bin/charts-build-scripts validate $(if $(filter true,$(remote)),--remote) $(if $(filter true,$(local)),--local)

TARGETS := prepare patch clean clean-cache charts list index unzip zip standardize template regsync check-images check-rc enforce-lifecycle lifecycle-status auto-forward-port
TARGETS := prepare patch clean clean-cache charts list index unzip zip standardize template regsync check-images check-rc enforce-lifecycle lifecycle-status auto-forward-port validate-release-charts

$(TARGETS):
@./scripts/pull-scripts
@./bin/charts-build-scripts $@

.PHONY: $(TARGETS)
.PHONY: $(TARGETS)
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.9.8}"
CHARTS_BUILD_SCRIPT_VERSION="${CHARTS_BUILD_SCRIPT_VERSION:-v0.9.9}"
29 changes: 29 additions & 0 deletions version_rules.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"prod-branch-prefix": "release-v",
"dev-branch-prefix": "dev-v",
"rules": {
"2.10": {
"min": "105.0.0",
"max": "106.0.0"
},
"2.9": {
"min": "104.0.0",
"max": "105.0.0"
},
"2.8": {
"min": "103.0.0",
"max": "104.0.0"
},
"2.7": {
"min": "101.0.0",
"max": "103.0.0"
},
"2.6": {
"min": "100.0.0",
"max": "101.0.0"
},
"2.5": {
"max": "100.0.0"
}
}
}

0 comments on commit 4a19238

Please sign in to comment.