Skip to content

Commit 5a9742a

Browse files
committed
Update stackable helper to set the operator version too
1 parent 758b3c9 commit 5a9742a

6 files changed

Lines changed: 21 additions & 18 deletions

File tree

antora-playbook.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ antora:
3030
- require: '@sntke/antora-mermaid-extension'
3131
mermaid_library_url: https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs
3232
script_stem: mermaid-scripts
33-
- ./supplemental-ui/lib/stackable-operator-branch.js
33+
- ./supplemental-ui/lib/stackable-operator-helpers.js
3434
content:
3535
sources:
3636
- url: .

local-antora-playbook.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ antora:
1515
- require: '@sntke/antora-mermaid-extension'
1616
mermaid_library_url: https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs
1717
script_stem: mermaid-scripts
18-
- ./supplemental-ui/lib/stackable-operator-branch.js
18+
- ./supplemental-ui/lib/stackable-operator-helpers.js
1919
content:
2020
sources:
2121
- url: ./

modules/guides/pages/deploy-operators-and-csi-drivers-separately.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
:commons-operator-values: https://github.com/stackabletech/commons-operator/blob/{stackable-operator-branch}/deploy/helm/commons-operator/values.yaml
66
:nifi-operator-values: https://github.com/stackabletech/nifi-operator/blob/{stackable-operator-branch}/deploy/helm/nifi-operator/values.yaml
77
// TODO: Is there a way to make the links above go to the right place?
8-
// Eg: we can search/replace "0.0.0-dev" with the release, but in the above case we would need to replace "main".
8+
// Eg: we can search/replace "{stackable-operator-version}" with the release, but in the above case we would need to replace "main".
99

1010
Operators can be installed on nodes separate from where the workloads will run.
1111
There is a caveat when it comes to two operators: Secret Operator and Listener Operator.
@@ -160,10 +160,10 @@ Secret Operator::
160160
--
161161
NOTE: This operator uses a specific values file.
162162
163-
[source,bash]
163+
[source,bash,subs="attributes"]
164164
----
165165
helm install secret-operator \
166-
--version=0.0.0-dev \
166+
--version={stackable-operator-version} \
167167
--values=stackable-secret-operator.yaml \
168168
oci://oci.stackable.tech/sdp-charts/secret-operator
169169
----
@@ -175,10 +175,10 @@ Listener Operator::
175175
--
176176
NOTE: This operator uses a specific values file.
177177
178-
[source,bash]
178+
[source,bash,subs="attributes"]
179179
----
180180
helm install listener-operator \
181-
--version=0.0.0-dev \
181+
--version={stackable-operator-version} \
182182
--values=stackable-listener-operator.yaml \
183183
oci://oci.stackable.tech/sdp-charts/listener-operator
184184
----
@@ -190,15 +190,15 @@ Remaining operators::
190190
--
191191
NOTE: These operators use the same values file.
192192
193-
[source,bash]
193+
[source,bash,subs="attributes"]
194194
----
195195
helm install commons-operator \
196-
--version=0.0.0-dev \
196+
--version={stackable-operator-version} \
197197
--values=stackable-operators.yaml \
198198
oci://oci.stackable.tech/sdp-charts/commons-operator
199199
200200
helm install nifi-operator \
201-
--version=0.0.0-dev \
201+
--version={stackable-operator-version} \
202202
--values=stackable-operators.yaml \
203203
oci://oci.stackable.tech/sdp-charts/nifi-operator
204204
----

only-dev-antora-playbook.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ antora:
1515
- require: '@sntke/antora-mermaid-extension'
1616
mermaid_library_url: https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs
1717
script_stem: mermaid-scripts
18-
- ./supplemental-ui/lib/stackable-operator-branch.js
18+
- ./supplemental-ui/lib/stackable-operator-helpers.js
1919
content:
2020
sources:
2121
- url: ./

supplemental-ui/lib/stackable-operator-branch.js renamed to supplemental-ui/lib/stackable-operator-helpers.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// This is so we can map `nightly` (from the release dropdown) to the `main`
2-
// branch, and `YY.M` -> `release-YY.M`.
2+
// branch and 0.0.0-dev version, and `YY.M` to the `release-YY.M` branch and
3+
// YY.M.0 version.
34
//
4-
// In adocs, you can access it via {stackable-operator-branch}.
5+
// In adocs, you can access it via {stackable-operator-branch} and {stackable-operator-version}.
56
//
67
// Useful links:
78
// Extensions: https://docs.antora.org/antora/latest/extend/extensions/
@@ -10,17 +11,19 @@ module.exports.register = function () {
1011
this.once('contentClassified', ({ playbook, contentCatalog }) => {
1112
contentCatalog.getComponents().forEach((component) => {
1213
component.versions.forEach((componentVersion) => {
13-
const operatorBranch = componentVersion.version === 'nightly'
14-
? 'main'
15-
: `release-${componentVersion.version}`
14+
const operatorInfo = componentVersion.version === 'nightly'
15+
? { branch: 'main', version: '0.0.0-dev' }
16+
// TODO: Be clever about the patch level (eg: pull from the release repo: https://github.com/stackabletech/release/blob/main/releases.yaml)
17+
: { branch: `release-${componentVersion.version}`, version: `${componentVersion.version}.0` }
1618

1719
// Not sure why we need a new object, but _they_ do it.
1820
// See: https://github.com/couchbase/docs-site/blob/b7db9602fc035945ace72e3152e9fb83ef7cba51/lib/antora-component-version-rank.js
1921
componentVersion.asciidoc = {
2022
...componentVersion.asciidoc,
2123
attributes: {
2224
...componentVersion.asciidoc.attributes,
23-
'stackable-operator-branch': operatorBranch
25+
'stackable-operator-branch': operatorInfo.branch,
26+
'stackable-operator-version': operatorInfo.version,
2427
}
2528
}
2629
})

truly-local-playbook.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ antora:
1515
- require: '@sntke/antora-mermaid-extension'
1616
mermaid_library_url: https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs
1717
script_stem: mermaid-scripts
18-
- ./supplemental-ui/lib/stackable-operator-branch.js
18+
- ./supplemental-ui/lib/stackable-operator-helpers.js
1919
content:
2020
sources:
2121
- url: ./

0 commit comments

Comments
 (0)