File tree 6 files changed +70
-9
lines changed
6 files changed +70
-9
lines changed Original file line number Diff line number Diff line change 55
55
run : |
56
56
tag="${{ github.ref_name }}"
57
57
BASE_REF="${{ github.event.base_ref }}"
58
- BRANCH="${BASE_REF#refs/heads/}"
58
+ if [ -n "$BASE_REF" ]; then
59
+ BRANCH="${BASE_REF#refs/heads/}"
60
+ else
61
+ BRANCH="$(nix-shell --pure --run "./scripts/helm/find-released-branch.sh "$tag"" ./scripts/helm/shell.nix)"
62
+ fi
63
+ echo "BASE_BRANCH=$BRANCH" >> $GITHUB_ENV
64
+
59
65
nix-shell --pure --run "./scripts/helm/publish-chart-yaml.sh --released "$tag" --released-branch "$BRANCH"" ./scripts/helm/shell.nix
60
66
nix-shell --pure --run "SKIP_GIT=1 ./scripts/helm/generate-readme.sh" ./scripts/helm/shell.nix
61
67
- name : Create Pull Request
73
79
signoff : true
74
80
delete-branch : true
75
81
branch-suffix : " random"
76
- base : ${{ github.event.base_ref }}
82
+ base : ${{ env.BASE_BRANCH }}
77
83
token : ${{ secrets.ORG_CI_GITHUB }}
78
84
- name : Approve Pull Request by CI Bot
79
85
if : ${{ steps.cpr.outputs.pull-request-number }}
Original file line number Diff line number Diff line change @@ -16,17 +16,17 @@ type: application
16
16
# This is the chart version. This version number should be incremented each time you make changes
17
17
# to the chart and its templates, including the app version.
18
18
# Versions are expected to follow Semantic Versioning (https://semver.org/)
19
- version : 2.7.2
19
+ version : 2.7.3
20
20
21
21
# This is the version number of the application being deployed. This version number should be
22
22
# incremented each time you make changes to the application. Versions are not expected to
23
23
# follow Semantic Versioning. They should reflect the version the application is using.
24
24
# It is recommended to use it with quotes.
25
- appVersion : " 2.7.2 "
25
+ appVersion : " 2.7.3 "
26
26
27
27
dependencies :
28
28
- name : crds
29
- version : 2.7.2
29
+ version : 2.7.3
30
30
condition : crds.enabled
31
31
- name : etcd
32
32
repository : https://charts.bitnami.com/bitnami
Original file line number Diff line number Diff line change 2
2
3
3
Mayastor Helm chart for Kubernetes
4
4
5
- ![ Version: 2.7.2 ] ( https://img.shields.io/badge/Version-2.7.2 -informational?style=flat-square ) ![ Type: application] ( https://img.shields.io/badge/Type-application-informational?style=flat-square ) ![ AppVersion: 2.7.2 ] ( https://img.shields.io/badge/AppVersion-2.7.2 -informational?style=flat-square )
5
+ ![ Version: 2.7.3 ] ( https://img.shields.io/badge/Version-2.7.3 -informational?style=flat-square ) ![ Type: application] ( https://img.shields.io/badge/Type-application-informational?style=flat-square ) ![ AppVersion: 2.7.3 ] ( https://img.shields.io/badge/AppVersion-2.7.3 -informational?style=flat-square )
6
6
7
7
## Installation Guide
8
8
@@ -54,7 +54,7 @@ This removes all the Kubernetes components associated with the chart and deletes
54
54
55
55
| Repository | Name | Version |
56
56
| ------------| ------| ---------|
57
- | | crds | 2.7.2 |
57
+ | | crds | 2.7.3 |
58
58
| https://charts.bitnami.com/bitnami | etcd | 8.6.0 |
59
59
| https://grafana.github.io/helm-charts | loki-stack | 2.9.11 |
60
60
| https://jaegertracing.github.io/helm-charts | jaeger-operator | 2.50.1 |
Original file line number Diff line number Diff line change 1
1
apiVersion : v2
2
2
name : crds
3
- version : 2.7.2
3
+ version : 2.7.3
4
4
description : |
5
5
A Helm chart that collects CustomResourceDefinitions (CRDs) from Mayastor.
6
6
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ repository:
8
8
name : mayastor
9
9
chart :
10
10
name : mayastor
11
- version : 2.7.2
11
+ version : 2.7.3
12
12
values : " -- generate from values file --"
13
13
valuesExample : " -- generate from values file --"
14
14
prerequisites :
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ SCRIPTDIR=" $( dirname " $( realpath " ${BASH_SOURCE[0]:- " $0 " } " ) " ) "
4
+ ROOTDIR=" $SCRIPTDIR /../.."
5
+
6
+ source " $ROOTDIR /scripts/utils/log.sh"
7
+
8
+ set -euo pipefail
9
+
10
+ # Check if the given branch matches the tag
11
+ # Example:
12
+ # release/2.7 matches tag v2.7.2, v2.7.2-rc.4, etc..
13
+ # release/2.7 does not match tag v2.6.0, etc...
14
+ tag_matches_branch () {
15
+ local tag=" ${1# v} "
16
+ local release_branch=" $2 "
17
+
18
+ branch_version=" ${release_branch# release/ } "
19
+ if ! [[ " $branch_version " =~ ^[0-9]+.[0-9]+$ ]]; then
20
+ return 1
21
+ fi
22
+
23
+ if ! [[ " $tag " = " $branch_version " * ]]; then
24
+ return 1
25
+ fi
26
+ }
27
+
28
+ # For the given tag, find the branch which is compatible
29
+ # See tag_matches_branch for more information.
30
+ find_released_branch () {
31
+ local tag=" $1 "
32
+ local branches=$( git branch -r --contains " $TAG " --points-at " $TAG " --format " %(refname:short)" 2> /dev/null)
33
+ local branch=" "
34
+
35
+ for release_branch in $branches ; do
36
+ release_branch=${release_branch# origin/ }
37
+ if tag_matches_branch " $TAG " " $release_branch " ; then
38
+ if [ -n " $branch " ]; then
39
+ log_fatal " Multiple branches matched!"
40
+ fi
41
+ branch=" $release_branch "
42
+ fi
43
+ done
44
+
45
+ echo " $branch "
46
+ }
47
+
48
+ TAG=" $1 "
49
+ BRANCH=" $( find_released_branch " $TAG " ) "
50
+
51
+ if [ -z " $BRANCH " ]; then
52
+ log_fatal " Failed to find matching released branch for tag '$TAG '"
53
+ fi
54
+
55
+ echo " $BRANCH "
You can’t perform that action at this time.
0 commit comments