You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ROX-30269: ensure that the full release name is maximum 51 chars long (#238)
## Changes
* Enforce maximum length of 51 characters for release names to allow for
12 chars `-rerun-abcde` suffix from Konflux
* Switch to consistent `stage` name for pre-prod releases.
Generated release files after this PR will be named like
`20251104-stage-b6926eb.yaml` (no more dashes in the date & `stage`
suffix)
----------
Co-authored-by: Misha Sugakov <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# ACS Operator Index
2
2
3
-
This repository is for building and releasing the ACS operator indexes on Konflux.
3
+
This repository is for building and releasing the ACS operator indexes on Konflux.\
4
4
It's for updating Operator Catalogs, i.e., so OpenShift clusters can see new versions of ACS operator in their
5
5
OperatorHub.
6
6
@@ -17,7 +17,7 @@ Do the following changes in the `catalog-template.yaml` file.
17
17
18
18
1. Add bundle image.
19
19
1. Find entries with `schema: olm.bundle` towards the end of the file.
20
-
2. Add a new entry for your bundle image.
20
+
2. Add a new entry for your bundle image.\
21
21
It should look something like this:
22
22
```yaml
23
23
- schema: olm.bundle
@@ -28,7 +28,7 @@ Do the following changes in the `catalog-template.yaml` file.
28
28
* Keep entries sorted according to version.
29
29
* Add a comment stating the version, see how it's done for other items there.
30
30
* You may add bundle images from `quay.io`, `brew.registry.redhat.io` and so on (provided they exist and are
31
-
pullable) during development and/or when preparing to release.
31
+
pullable) during development and/or when preparing to release.\
32
32
Ultimately, all released bundle images must come from
33
33
`registry.redhat.io/advanced-cluster-security/rhacs-operator-bundle`repo because this is where customers expect
34
34
to find them. There's a CI check which prevents pushing to `master` if there's any bundle from
@@ -56,8 +56,8 @@ Do the following changes in the `catalog-template.yaml` file.
56
56
after `4.8.1`, that'd be `8` and `1`; when you add `4.9.0` after `4.8.3`, that'd be `8` and `3`),
57
57
* `(Y-1)` with the value of `Y` minus 1 (e.g., when you add `4.8.2`, that'd be `7`).
58
58
3. If the item you added is not the last one in the `entries` list, i.e., not the highest version, adjust the next
59
-
item in the `entries` list.
60
-
Set its `replaces:` to be `rhacs-operator.v4.Y.Z`.
59
+
item in the `entries` list.\
60
+
Set its `replaces:` to be `rhacs-operator.v4.Y.Z`.\
61
61
For example:
62
62
```yaml
63
63
- &bundle-4-7-4 # <-------- this was already there
@@ -132,16 +132,16 @@ See [konflux docs](https://github.com/konflux-ci/build-definitions/blob/c93ea73d
132
132
133
133
1. Make sure you [logged in](https://spaces.redhat.com/pages/viewpage.action?pageId=407312060#HowtoeverythingKonfluxforRHACS-GettingocCLItoworkwithKonflux) to the Konflux cluster.
134
134
2. Make sure you checked out the latest master branch: `git checkout master && git pull`
135
-
3. Generate Release and Snapshot CRs by running `./scripts/generate-releases.sh <staging|prod>`. Use `staging` for test release and `prod` for production one.
136
-
4. (Skip for `staging` release.) Create a PR which adds the file created by the script, get the PR reviewed and merged.
137
-
5. (Skip for `staging` release.) Go to the [#acs-operator-index-release](https://redhat.enterprise.slack.com/archives/C096WU0GZUG) channel, and:
135
+
3. Generate Release and Snapshot CRs by running `./scripts/generate-releases.sh <stage|prod>`. Use `stage` for test release and `prod` for production one.
136
+
4. (Skip for `stage` release.) Create a PR which adds the file created by the script, get the PR reviewed and merged.
137
+
5. (Skip for `stage` release.) Go to the [#acs-operator-index-release](https://redhat.enterprise.slack.com/archives/C096WU0GZUG) channel, and:
138
138
1. make sure the previous operator index release is complete (has a green check mark emoticon)
139
139
2. if not, coordinate with the person conducting that release
140
140
3. once that release is complete, start a new thread for your release
141
-
6. Apply generated CRs to the cluster: `oc create -f release-history/<YYYY-MM-DD>-<SHA>-<staging|prod>.yaml`
141
+
6. Apply generated CRs to the cluster: `oc create -f release-history/<YYYYMMDD>-<stage|prod>-<SHA>.yaml`
142
142
7. Monitor release [using monitor release script](#monitoring-release). Each supported OCP version has its own `Release`. Successfully finished `Release` has `Succeeded` status.
143
143
8. Follow [the restarting release step below](#restarting-konflux-release) if any of the `Release`s fails for any OCP version.
144
-
9. (Skip for `staging` release.) Once done, go back to the Slack thread you started earlier, add a message that your release is done and add a green check mark emoticon on the initial message of the thread.
144
+
9. (Skip for `stage` release.) Once done, go back to the Slack thread you started earlier, add a message that your release is done and add a green check mark emoticon on the initial message of the thread.
145
145
10. Once releases for all OCP versions successfully finish, then the operator catalog release is done. If you perform it as part of a bigger release procedure, you should go back to that procedure and continue with further steps.
echo"COMMIT - a SHA of the commit to pull Snapshots only with this commit label for the Release.">&2
44
44
echo"If provided commit SHA is less than 40 characters then it will be expanded to a full 40-characters long SHA. Default: currently checked out commit">&2
45
45
echo"BRANCH - an optional parameter to specify git branch name for filtering snapshots by having branch name in annotations. Default: currently checked out branch">&2
@@ -49,12 +49,12 @@ usage() {
49
49
fi
50
50
}
51
51
52
-
# Validate environment input and ensure it is either 'staging' or 'prod' (for master branch only).
52
+
# Validate environment input and ensure it is either 'stage' or 'prod' (for master branch only).
53
53
validate_environment() {
54
54
local -r environment="$1"
55
55
local -r branch="$2"
56
-
if [[ "${environment}"!="staging"&&"${environment}"!="prod" ]];then
57
-
echo"ERROR: ENVIRONMENT input must either be 'staging' or 'prod'.">&2
56
+
if [[ "${environment}"!="stage"&&"${environment}"!="prod" ]];then
57
+
echo"ERROR: ENVIRONMENT input must either be 'stage' or 'prod'.">&2
58
58
return 1
59
59
fi
60
60
if [[ "${environment}"=="prod"&&"${branch}"!="master" ]];then
snapshot_copy="${snapshot%-*}-${release_name}"# replace random suffix with release name
116
+
snapshot_copy_name="$(echo "${snapshot%-*}-${release_name_suffix}"| cut -c -63)"# Replace random suffix with release name and crop to 63 characters to avoid running over the Kubernetes limit.
126
117
echo"---"
127
118
kubectl -n rh-acs-tenant get snapshot.appstudio.redhat.com "${snapshot}" -o yaml | \
128
119
"${YQ}" -P 'load("'"${whitelist_file}"'") as $whitelisted
0 commit comments