Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate adding new operands and generating documentation #2156

Merged
merged 2 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .github/workflows/add_operand.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Add Operand

on:
workflow_call:
inputs:
image:
description: "The FQN of the Operand image"
required: true
type: string
version:
description: "The upstream-version of the Operand"
required: true
type: string
ref:
description: "The git reference to checkout"
required: false
default: main
type: string
repository:
description: "The git repository to checkout"
required: false
type: string

workflow_dispatch:
inputs:
image:
description: "The FQN of the Operand image"
required: true
type: string
version:
description: "The upstream-version of the Operand"
required: true
type: string
ref:
description: "The git reference to checkout"
required: false
default: main
type: string
repository:
description: "The git repository to checkout"
required: false
type: string

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
repository: ${{ inputs.repository }}

- name: Add Operand
run: ./scripts/ci/add_operand.sh
env:
IMAGE: ${{ inputs.image }}
VERSION: ${{ inputs.version }}

- name: Commit changes and create tag
run: |
git config user.email "infinispan@infinispan.org"
git config user.name "Infinispan"
git add config/manager/manager.yaml documentation/asciidoc/topics/attributes/community-attributes.adoc documentation/asciidoc/topics/supported_operands/
git commit -m "Add Operand ${{ inputs.version }}"

- name: Push Git changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ inputs.ref }}
repository: ${{ inputs.repository }}
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,29 +86,29 @@ The bundle image can be created and pushed to a repository with:
make bundle-build bundle-push VERSION=<latest-version> IMG=<operator-image> BUNDLE_IMG=<bundle-image>
```

# Operator Version
The next version of the Operator to be released is stored in the `./version.txt` at the root of the project. The content
of this file are used to control the generation of documentation and other resources. This file must be updated after an
Operator release.

# Add a new Infinispan Operand
1. Call the "Add Operand" GitHub Action

# Release
To create an Operator release perform the following:

1. Update Operand references:
- `SERVER_TAGS` in `scripts/ci/kind.sh` to include the image tage all supported Operands
- `INFINISPAN_OPERAND_VERSIONS` json in `config/manager/manager.yaml` includes the latest Infinispan Server releases. Do not use the floating tags for an Operand image, e.g. `13.0`.
- `server_image_version` in `documentation/asciidoc/topics/attributes/community-attributes.adoc` to point to the latest Operand version
- `test/e2e/utils/common.go` VersionManager JSON to include the latest Operand
- `documentation/asciidoc/topics/ref_supported_versions.adoc` to include all supported Operands
- `documentation/asciidoc/topics/community-attributes.adoc` to use the latest supported Operand
2. Commit changes with appropriate commit message, e.g "Releasing Operator <x.y.z>.Final"
3. Tag the release `git tag <x.y.z>` and push to GitHub
4. Create and push the multi-arch image using the created tag via the "Image Release" GitHub Action
5. Remove the old bundle from local `rm -rf bundle`
6. Create OLM bundle `make bundle VERSION=<x.y.z> CHANNELS=stable DEFAULT_CHANNEL=stable IMG=quay.io/infinispan/operator:<x.y.z>.Final`
7. Copy contents of `bundle/` and issue PRs to:
1. Tag the release `git tag <x.y.z>` and push to GitHub
2. Create and push the multi-arch image using the created tag via the "Image Release" GitHub Action
3. Remove the old bundle from local `rm -rf bundle`
4. Create OLM bundle `make bundle VERSION=<x.y.z> CHANNELS=stable DEFAULT_CHANNEL=stable IMG=quay.io/infinispan/operator:<x.y.z>.Final`
5. Copy contents of `bundle/` and issue PRs to:
- https://github.com/k8s-operatorhub/community-operators
- https://github.com/redhat-openshift-ecosystem/community-operators-prod
8. Once PR in 5 has been merged and Operator has been released to OperatorHub, update the "replaces" field in `config/manifests/bases/infinispan-operator.clusterserviceversion.yaml`
6. Once PR in 5 has been merged and Operator has been released to OperatorHub, update the "replaces" field in `config/manifests/bases/infinispan-operator.clusterserviceversion.yaml`
to `replaces: infinispan-operator.v<x.y.z>`
9. Update `scripts/ci/install-catalog-source.sh` `VERSION` field to the next release version
10. Update `scripts/create-olm-catalog.sh` to include the just released version in `BUNDLE_IMGS` and the next release version in the update graph
11. Commit changes with appropriate commit message, e.g "Next Version <x.y.z>"
7. Update the `version.text` file to the next release version
ryanemerson marked this conversation as resolved.
Show resolved Hide resolved
8. Update `scripts/ci/install-catalog-source.sh` `VERSION` field to the next release version
9. Update `scripts/create-olm-catalog.sh` to include the just released version in `BUNDLE_IMGS` and the next release version in the update graph
10. Commit changes with appropriate commit message, e.g "Next Version <x.y.z>"

# Testing

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
:lib_path: /opt/infinispan/server/lib
:backup_path: /opt/infinispan/backups
:server_image: quay.io/infinispan/server
:server_image_version: 15.0.8
:operand_version: 15.0.8
:server_image_version: 16.0.1
:operand_version: 16.0.1

:ispn_operator: Infinispan Operator
:ispn_operator_version: 2.4
Expand Down
97 changes: 1 addition & 96 deletions documentation/asciidoc/topics/ref_supported_versions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,99 +5,4 @@
Since version 2.3.0 {ispn_operator} supports multiple {brandname} Server versions.
You can upgrade the version of your cluster between supported {brandname} versions:

[%header,cols=2*]
|===
| {ispn_operator} version
| {brandname} Server versions

| 2.3.7
|
13.0.10
14.0.1
14.0.6
14.0.9
14.0.13
14.0.17
14.0.19
14.0.20
14.0.21
14.0.24
14.0.27
| 2.4.0
|
13.0.10
14.0.1
14.0.6
14.0.9
14.0.13
14.0.17
14.0.19
14.0.20
14.0.21
14.0.24
14.0.27
15.0.0
| 2.4.1
|
13.0.10
14.0.1
14.0.6
14.0.9
14.0.13
14.0.17
14.0.19
14.0.20
14.0.21
14.0.24
14.0.27
15.0.0
| 2.4.2
|
13.0.10
14.0.1
14.0.6
14.0.9
14.0.13
14.0.17
14.0.19
14.0.20
14.0.21
14.0.24
14.0.27
15.0.0
15.0.3
15.0.4
| 2.4.3
|
14.0.1
14.0.6
14.0.9
14.0.13
14.0.17
14.0.19
14.0.20
14.0.21
14.0.24
14.0.27
15.0.0
15.0.3
15.0.4
15.0.5
| 2.4.4
|
14.0.1
14.0.6
14.0.9
14.0.13
14.0.17
14.0.19
14.0.20
14.0.21
14.0.24
14.0.27
14.0.32
15.0.0
15.0.3
15.0.4
15.0.8
|===
include::supported_operands/operand_table.adoc[]
15 changes: 15 additions & 0 deletions documentation/asciidoc/topics/supported_operands/2_3_7.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
////
Auto-generated file, do not update this manually.
To add additional Operands to this file, update the `INFINISPAN_OPERAND_VERSIONS` array in `config/manager/manager.yaml`.
////
13.0.10
14.0.1
14.0.6
14.0.9
14.0.13
14.0.17
14.0.19
14.0.20
14.0.21
14.0.24
14.0.27
16 changes: 16 additions & 0 deletions documentation/asciidoc/topics/supported_operands/2_4_0.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
////
Auto-generated file, do not update this manually.
To add additional Operands to this file, update the `INFINISPAN_OPERAND_VERSIONS` array in `config/manager/manager.yaml`.
////
13.0.10
14.0.1
14.0.6
14.0.9
14.0.13
14.0.17
14.0.19
14.0.20
14.0.21
14.0.24
14.0.27
15.0.0
16 changes: 16 additions & 0 deletions documentation/asciidoc/topics/supported_operands/2_4_1.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
////
Auto-generated file, do not update this manually.
To add additional Operands to this file, update the `INFINISPAN_OPERAND_VERSIONS` array in `config/manager/manager.yaml`.
////
13.0.10
14.0.1
14.0.6
14.0.9
14.0.13
14.0.17
14.0.19
14.0.20
14.0.21
14.0.24
14.0.27
= 15.0.0
18 changes: 18 additions & 0 deletions documentation/asciidoc/topics/supported_operands/2_4_2.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
////
Auto-generated file, do not update this manually.
To add additional Operands to this file, update the `INFINISPAN_OPERAND_VERSIONS` array in `config/manager/manager.yaml`.
////
13.0.10
14.0.1
14.0.6
14.0.9
14.0.13
14.0.17
14.0.19
14.0.20
14.0.21
14.0.24
14.0.27
15.0.0
15.0.3
15.0.4
18 changes: 18 additions & 0 deletions documentation/asciidoc/topics/supported_operands/2_4_3.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
////
Auto-generated file, do not update this manually.
To add additional Operands to this file, update the `INFINISPAN_OPERAND_VERSIONS` array in `config/manager/manager.yaml`.
////
14.0.1
14.0.6
14.0.9
14.0.13
14.0.17
14.0.19
14.0.20
14.0.21
14.0.24
14.0.27
15.0.0
15.0.3
15.0.4
15.0.5
19 changes: 19 additions & 0 deletions documentation/asciidoc/topics/supported_operands/2_4_4.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
////
Auto-generated file, do not update this manually.
To add additional Operands to this file, update the `INFINISPAN_OPERAND_VERSIONS` array in `config/manager/manager.yaml`.
////
14.0.1
14.0.6
14.0.9
14.0.13
14.0.17
14.0.19
14.0.20
14.0.21
14.0.24
14.0.27
14.0.32
15.0.0
15.0.3
15.0.4
15.0.8
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
////
Auto-generated file, do not update this manually, instead update `scripts/ci/docs_generate_operator_operand_table.sh`
////
[%header,cols=2*]
|===
| {ispn_operator} version
| {brandname} Server versions
|
2.3.7
|
include::2_3_7.adoc[]
|
2.4.0
|
include::2_4_0.adoc[]
|
2.4.1
|
include::2_4_1.adoc[]
|
2.4.2
|
include::2_4_2.adoc[]
|
2.4.3
|
include::2_4_3.adoc[]
|
2.4.4
|
include::2_4_4.adoc[]
|===
Loading
Loading