-
Notifications
You must be signed in to change notification settings - Fork 3
440 lines (404 loc) · 26 KB
/
ocm.yaml
File metadata and controls
440 lines (404 loc) · 26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
name: Build Platform Mesh OCM Component
on:
workflow_dispatch:
inputs:
force_version_upgrade:
description: 'Force version upgrade even without dependency changes'
required: false
default: false
type: boolean
version_increment:
description: 'Version component to increment (only applies when force_version_upgrade is true)'
required: false
default: 'minor'
type: choice
options:
- minor
- major
- patch
release_type:
description: 'Type of release to create (only applies when force_version_upgrade is true)'
required: false
default: 'build'
type: choice
options:
- build
- rc
- full
schedule:
- cron: '0 * * * *'
push:
branches:
- main
paths:
- '.github/workflows/ocm.yaml'
- 'constructor/component-constructor.yaml'
permissions:
packages: write
contents: read
actions: write
concurrency:
group: ocm-${{ github.ref }}
cancel-in-progress: true
jobs:
ocm:
runs-on: ubuntu-latest
env:
# Third-party dependency versions
CROSSPLANE_VERSION: "1.20.1"
KCP_OPERATOR_CHART_VERSION: "0.3.0"
KCP_OPERATOR_IMAGE_VERSION: "v0.3.0"
KCP_VERSION: "v0.29.0"
GARDENER_ETCD_DRUID_SOURCE_REF: "v0.31.0"
GARDENER_ETCD_DRUID_CHART_VERSION: "0.1.0"
OPENFGA_VERSION: "0.2.38"
GATEWAY_API_VERSION: "v1.4.0"
GATEWAY_API_COMMIT: "5e5891a5adad272363de782eb02a042166f1913c"
TRAEFIK_VERSION: "37.3.0"
TRAEFIK_CRD_VERSION: "1.12.0"
CERT_MANAGER_VERSION: "v1.19.1"
steps:
- name: Setup yq@latest
run: |
if ! command -v yq &>/dev/null
then
mkdir -p /home/runner/.local/bin
wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /home/runner/.local/bin/yq &&\
chmod +x /home/runner/.local/bin/yq
fi
- name: Check out the repo
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: setup OCM CLI
run: |
REPO=${repo:=open-component-model/ocm}
if [ -z "$version" -o "$version" == latest ]; then
version="$(basename "$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/$REPO/releases/latest)")"
echo "Selecting latest version: $version"
fi
VERSION=${version#v}
ARCHIVE_FILE="ocm-${VERSION}-linux-amd64.tar.gz"
URL="https://github.com/$REPO/releases/download/v${VERSION}/$ARCHIVE_FILE"
echo "Installing ocm-cli version $version from $REPO"
curl -LsS -o ocm-cli.tgz "$URL"
tar --overwrite -xvzf ocm-cli.tgz >/dev/null
chmod a+x ocm
- name: Write Credentials file
run: |
cat <<EOF > $HOME/.ocmconfig
type: generic.config.ocm.software/v1
configurations:
- type: credentials.config.ocm.software
consumers:
- identity:
type: OCIRegistry
scheme: https
hostname: ghcr.io
pathprefix: platform-mesh
credentials:
- type: Credentials
properties:
username: github
password: ${{ secrets.GITHUB_TOKEN }}
EOF
- name: Get versions
run: |
set -e
echo ACCOUNT_OPERATOR_VERSION=$(./ocm get componentversions --latest github.com/platform-mesh/account-operator --repo ghcr.io/platform-mesh -o json | jq -r '.items[0].component.version') >> $GITHUB_ENV
echo SECURITY_OPERATOR_VERSION=$(./ocm get componentversions --latest github.com/platform-mesh/security-operator --repo ghcr.io/platform-mesh -o json | jq -r '.items[0].component.version') >> $GITHUB_ENV
echo EXTENSION_MANAGER_OPERATOR_VERSION=$(./ocm get componentversions --latest github.com/platform-mesh/extension-manager-operator --repo ghcr.io/platform-mesh -o json | jq -r '.items[0].component.version') >> $GITHUB_ENV
echo INFRA_VERSION=$(./ocm get componentversions --latest github.com/platform-mesh/infra --repo ghcr.io/platform-mesh -o json | jq -r '.items[0].component.version') >> $GITHUB_ENV
echo REBAC_AUTHZ_WEBHOOK_VERSION=$(./ocm get componentversions --latest github.com/platform-mesh/rebac-authz-webhook --repo ghcr.io/platform-mesh -o json | jq -r '.items[0].component.version') >> $GITHUB_ENV
echo PORTAL_VERSION=$(./ocm get componentversions --latest github.com/platform-mesh/portal --repo ghcr.io/platform-mesh -o json | jq -r '.items[0].component.version') >> $GITHUB_ENV
echo PLATFORM_MESH_OPERATOR_VERSION=$(./ocm get componentversions --latest github.com/platform-mesh/platform-mesh-operator --repo ghcr.io/platform-mesh -o json | jq -r '.items[0].component.version') >> $GITHUB_ENV
echo KEYCLOAK_VERSION=$(./ocm get componentversions --latest github.com/platform-mesh/keycloak --repo ghcr.io/platform-mesh -o json | jq -r '.items[0].component.version') >> $GITHUB_ENV
echo KUBERNETES_GRAPHQL_GATEWAY_VERSION=$(./ocm get componentversions --latest github.com/platform-mesh/kubernetes-graphql-gateway --repo ghcr.io/platform-mesh -o json | jq -r '.items[0].component.version') >> $GITHUB_ENV
echo VIRTUAL_WORKSPACES_VERSION=$(./ocm get componentversions --latest github.com/platform-mesh/virtual-workspaces --repo ghcr.io/platform-mesh -o json | jq -r '.items[0].component.version') >> $GITHUB_ENV
echo PLATFORM_MESH_OPERATOR_COMPONENTS_VERSION=$(./ocm get componentversions --latest github.com/platform-mesh/platform-mesh-operator-components --repo ghcr.io/platform-mesh -o json | jq -r '.items[0].component.version') >> $GITHUB_ENV
echo PLATFORM_MESH_OPERATOR_INFRA_COMPONENTS_VERSION=$(./ocm get componentversions --latest github.com/platform-mesh/platform-mesh-operator-infra-components --repo ghcr.io/platform-mesh -o json | jq -r '.items[0].component.version') >> $GITHUB_ENV
echo EXAMPLE_HTTPBIN_OPERATOR_VERSION=$(./ocm get componentversions --latest github.com/platform-mesh/example-httpbin-operator --repo ghcr.io/platform-mesh -o json | jq -r '.items[0].component.version') >> $GITHUB_ENV
echo IAM_SERVICE_VERSION=$(./ocm get componentversions --latest github.com/platform-mesh/iam-service --repo ghcr.io/platform-mesh -o json | jq -r '.items[0].component.version') >> $GITHUB_ENV
echo IAM_UI_VERSION=$(./ocm get componentversions --latest github.com/platform-mesh/iam-ui --repo ghcr.io/platform-mesh -o json | jq -r '.items[0].component.version') >> $GITHUB_ENV
echo MARKETPLACE_UI_VERSION=$(./ocm get componentversions --latest github.com/platform-mesh/marketplace-ui --repo ghcr.io/platform-mesh -o json | jq -r '.items[0].component.version') >> $GITHUB_ENV
echo ORGANIZATION_IDP_VERSION=$(./ocm get componentversions --latest github.com/platform-mesh/organization-idp --repo ghcr.io/platform-mesh -o json | jq -r '.items[0].component.version') >> $GITHUB_ENV
# Get current platform-mesh version
PM_VERSION=$(./ocm get componentversions --latest github.com/platform-mesh/platform-mesh --repo ghcr.io/platform-mesh -o json | jq -r '.items[0].component.version')
PM_VERSION=${PM_VERSION:-0.0.0}
echo CURRENT_PM_VERSION="$PM_VERSION" >> $GITHUB_ENV
# Calculate next version for potential use with release logic
# Check if force upgrade is requested with specific version increment
if [ "${{ inputs.force_version_upgrade }}" = "true" ]; then
# Check if current version has a prerelease suffix and we want to promote to full release
if [[ "$PM_VERSION" =~ -(build|rc)\.([0-9]+)$ ]] && [ "${{ inputs.release_type }}" = "full" ]; then
# Promote prerelease to full release by stripping suffix
NEXT_VERSION=${PM_VERSION%-*.*}
else
# Strip prerelease suffix if present to get base version for incrementing
BASE_VERSION=${PM_VERSION%-*.*}
IFS='.' read -r major minor patch <<< "$BASE_VERSION"
case "${{ inputs.version_increment }}" in
"major")
major=$((major + 1))
if [ "${{ inputs.release_type }}" = "full" ]; then
NEXT_VERSION="$major.0.0"
elif [ "${{ inputs.release_type }}" = "rc" ]; then
NEXT_VERSION="$major.0.0-rc.1"
else
NEXT_VERSION="$major.0.0-build.1"
fi
;;
"minor")
minor=$((minor + 1))
if [ "${{ inputs.release_type }}" = "full" ]; then
NEXT_VERSION="$major.$minor.0"
elif [ "${{ inputs.release_type }}" = "rc" ]; then
NEXT_VERSION="$major.$minor.0-rc.1"
else
NEXT_VERSION="$major.$minor.0-build.1"
fi
;;
"patch")
patch=$((patch + 1))
if [ "${{ inputs.release_type }}" = "full" ]; then
NEXT_VERSION="$major.$minor.$patch"
elif [ "${{ inputs.release_type }}" = "rc" ]; then
NEXT_VERSION="$major.$minor.$patch-rc.1"
else
NEXT_VERSION="$major.$minor.$patch-build.1"
fi
;;
*)
# Default to minor increment
minor=$((minor + 1))
if [ "${{ inputs.release_type }}" = "full" ]; then
NEXT_VERSION="$major.$minor.0"
elif [ "${{ inputs.release_type }}" = "rc" ]; then
NEXT_VERSION="$major.$minor.0-rc.1"
else
NEXT_VERSION="$major.$minor.0-build.1"
fi
;;
esac
fi
elif [[ "$PM_VERSION" =~ -build\.([0-9]+)$ ]]; then
# Current version is already a build release, increment the build number
BUILD_NUM=${BASH_REMATCH[1]}
NEW_BUILD_NUM=$((BUILD_NUM + 1))
BASE_VERSION=${PM_VERSION%-build.*}
NEXT_VERSION="$BASE_VERSION-build.$NEW_BUILD_NUM"
elif [[ "$PM_VERSION" =~ -rc\.([0-9]+)$ ]]; then
# Current version is already a release candidate, increment the rc number
RC_NUM=${BASH_REMATCH[1]}
NEW_RC_NUM=$((RC_NUM + 1))
BASE_VERSION=${PM_VERSION%-rc.*}
NEXT_VERSION="$BASE_VERSION-rc.$NEW_RC_NUM"
else
# Default behavior: increment minor version and add -build.1
IFS='.' read -r major minor patch <<< "$PM_VERSION"
minor=$((minor + 1))
NEXT_VERSION="$major.$minor.0-build.1"
fi
echo NEXT_VERSION="$NEXT_VERSION" >> $GITHUB_ENV
- name: Check if version update needed
id: version_check
run: |
set -e
# Get the latest platform-mesh component descriptor to compare dependencies
./ocm get componentversions --latest github.com/platform-mesh/platform-mesh --repo ghcr.io/platform-mesh -o yaml > current_pm_component.yaml || echo "No existing platform-mesh component found"
# Extract current dependency versions from the existing component (if it exists)
if [ -f current_pm_component.yaml ] && [ -s current_pm_component.yaml ]; then
CURRENT_ACCOUNT_OPERATOR=$(yq eval '.component.componentReferences[] | select(.name == "account-operator") | .version' current_pm_component.yaml 2>/dev/null || echo "")
CURRENT_SECURITY_OPERATOR=$(yq eval '.component.componentReferences[] | select(.name == "security-operator") | .version' current_pm_component.yaml 2>/dev/null || echo "")
CURRENT_EXTENSION_MANAGER_OPERATOR=$(yq eval '.component.componentReferences[] | select(.name == "extension-manager-operator") | .version' current_pm_component.yaml 2>/dev/null || echo "")
CURRENT_INFRA=$(yq eval '.component.componentReferences[] | select(.name == "infra") | .version' current_pm_component.yaml 2>/dev/null || echo "")
CURRENT_REBAC_AUTHZ_WEBHOOK=$(yq eval '.component.componentReferences[] | select(.name == "rebac-authz-webhook") | .version' current_pm_component.yaml 2>/dev/null || echo "")
CURRENT_PORTAL=$(yq eval '.component.componentReferences[] | select(.name == "portal") | .version' current_pm_component.yaml 2>/dev/null || echo "")
CURRENT_PLATFORM_MESH_OPERATOR=$(yq eval '.component.componentReferences[] | select(.name == "platform-mesh-operator") | .version' current_pm_component.yaml 2>/dev/null || echo "")
CURRENT_KEYCLOAK=$(yq eval '.component.componentReferences[] | select(.name == "keycloak") | .version' current_pm_component.yaml 2>/dev/null || echo "")
CURRENT_KUBERNETES_GRAPHQL_GATEWAY=$(yq eval '.component.componentReferences[] | select(.name == "kubernetes-graphql-gateway") | .version' current_pm_component.yaml 2>/dev/null || echo "")
CURRENT_VIRTUAL_WORKSPACES=$(yq eval '.component.componentReferences[] | select(.name == "virtual-workspaces") | .version' current_pm_component.yaml 2>/dev/null || echo "")
CURRENT_PLATFORM_MESH_OPERATOR_COMPONENTS=$(yq eval '.component.componentReferences[] | select(.name == "platform-mesh-operator-components") | .version' current_pm_component.yaml 2>/dev/null || echo "")
CURRENT_PLATFORM_MESH_OPERATOR_INFRA_COMPONENTS=$(yq eval '.component.componentReferences[] | select(.name == "platform-mesh-operator-infra-components") | .version' current_pm_component.yaml 2>/dev/null || echo "")
CURRENT_EXAMPLE_HTTPBIN_OPERATOR=$(yq eval '.component.componentReferences[] | select(.name == "example-httpbin-operator") | .version' current_pm_component.yaml 2>/dev/null || echo "")
CURRENT_IAM_SERVICE=$(yq eval '.component.componentReferences[] | select(.name == "iam-service") | .version' current_pm_component.yaml 2>/dev/null || echo "")
CURRENT_IAM_UI=$(yq eval '.component.componentReferences[] | select(.name == "iam-ui") | .version' current_pm_component.yaml 2>/dev/null || echo "")
CURRENT_MARKETPLACE_UI=$(yq eval '.component.componentReferences[] | select(.name == "marketplace-ui") | .version' current_pm_component.yaml 2>/dev/null || echo "")
CURRENT_ORGANIZATION_IDP=$(yq eval '.component.componentReferences[] | select(.name == "organization-idp") | .version' current_pm_component.yaml 2>/dev/null || echo "")
# Extract third-party dependency versions
CURRENT_ISTIO=$(yq eval '.component.componentReferences[] | select(.name == "istio-base") | .version' current_pm_component.yaml 2>/dev/null || echo "")
CURRENT_CROSSPLANE=$(yq eval '.component.componentReferences[] | select(.name == "crossplane") | .version' current_pm_component.yaml 2>/dev/null || echo "")
CURRENT_KCP_OPERATOR=$(yq eval '.component.componentReferences[] | select(.name == "kcp-operator") | .version' current_pm_component.yaml 2>/dev/null || echo "")
CURRENT_KCP=$(yq eval '.component.componentReferences[] | select(.name == "kcp") | .version' current_pm_component.yaml 2>/dev/null || echo "")
CURRENT_ETCD_DRUID=$(yq eval '.component.componentReferences[] | select(.name == "etcd-druid") | .version' current_pm_component.yaml 2>/dev/null || echo "")
CURRENT_OPENFGA=$(yq eval '.component.componentReferences[] | select(.name == "openfga") | .version' current_pm_component.yaml 2>/dev/null || echo "")
CURRENT_GATEWAY_API=$(yq eval '.component.componentReferences[] | select(.name == "gateway-api") | .version' current_pm_component.yaml 2>/dev/null || echo "")
CURRENT_TRAEFIK=$(yq eval '.component.componentReferences[] | select(.name == "traefik") | .version' current_pm_component.yaml 2>/dev/null || echo "")
CURRENT_CERT_MANAGER=$(yq eval '.component.componentReferences[] | select(.name == "cert-manager") | .version' current_pm_component.yaml 2>/dev/null || echo "")
else
# No existing component, so we need to create one
echo "No existing platform-mesh component found, creating initial version"
echo "needs_update=true" >> $GITHUB_OUTPUT
echo "VERSION=${{ env.NEXT_VERSION }}" >> $GITHUB_ENV
exit 0
fi
# Check if force upgrade is requested
if [ "${{ inputs.force_version_upgrade }}" = "true" ]; then
echo "Force version upgrade requested, creating new version"
echo "Previous platform-mesh version: ${{ env.CURRENT_PM_VERSION }}"
echo "New platform-mesh version: ${{ env.NEXT_VERSION }}"
echo "needs_update=true" >> $GITHUB_OUTPUT
echo "VERSION=${{ env.NEXT_VERSION }}" >> $GITHUB_ENV
exit 0
fi
# Compare versions to detect changes
NEEDS_UPDATE=false
if [ "$CURRENT_ACCOUNT_OPERATOR" != "${{ env.ACCOUNT_OPERATOR_VERSION }}" ]; then
echo "Account operator: $CURRENT_ACCOUNT_OPERATOR -> ${{ env.ACCOUNT_OPERATOR_VERSION }}"
NEEDS_UPDATE=true
fi
if [ "$CURRENT_SECURITY_OPERATOR" != "${{ env.SECURITY_OPERATOR_VERSION }}" ]; then
echo "Security operator: $CURRENT_SECURITY_OPERATOR -> ${{ env.SECURITY_OPERATOR_VERSION }}"
NEEDS_UPDATE=true
fi
if [ "$CURRENT_EXTENSION_MANAGER_OPERATOR" != "${{ env.EXTENSION_MANAGER_OPERATOR_VERSION }}" ]; then
echo "Extension manager operator: $CURRENT_EXTENSION_MANAGER_OPERATOR -> ${{ env.EXTENSION_MANAGER_OPERATOR_VERSION }}"
NEEDS_UPDATE=true
fi
if [ "$CURRENT_INFRA" != "${{ env.INFRA_VERSION }}" ]; then
echo "Infra: $CURRENT_INFRA -> ${{ env.INFRA_VERSION }}"
NEEDS_UPDATE=true
fi
if [ "$CURRENT_REBAC_AUTHZ_WEBHOOK" != "${{ env.REBAC_AUTHZ_WEBHOOK_VERSION }}" ]; then
echo "Rebac authz webhook: $CURRENT_REBAC_AUTHZ_WEBHOOK -> ${{ env.REBAC_AUTHZ_WEBHOOK_VERSION }}"
NEEDS_UPDATE=true
fi
if [ "$CURRENT_PORTAL" != "${{ env.PORTAL_VERSION }}" ]; then
echo "Portal: $CURRENT_PORTAL -> ${{ env.PORTAL_VERSION }}"
NEEDS_UPDATE=true
fi
if [ "$CURRENT_PLATFORM_MESH_OPERATOR" != "${{ env.PLATFORM_MESH_OPERATOR_VERSION }}" ]; then
echo "Platform mesh operator: $CURRENT_PLATFORM_MESH_OPERATOR -> ${{ env.PLATFORM_MESH_OPERATOR_VERSION }}"
NEEDS_UPDATE=true
fi
if [ "$CURRENT_KEYCLOAK" != "${{ env.KEYCLOAK_VERSION }}" ]; then
echo "Keycloak: $CURRENT_KEYCLOAK -> ${{ env.KEYCLOAK_VERSION }}"
NEEDS_UPDATE=true
fi
if [ "$CURRENT_KUBERNETES_GRAPHQL_GATEWAY" != "${{ env.KUBERNETES_GRAPHQL_GATEWAY_VERSION }}" ]; then
echo "Kubernetes GraphQL gateway: $CURRENT_KUBERNETES_GRAPHQL_GATEWAY -> ${{ env.KUBERNETES_GRAPHQL_GATEWAY_VERSION }}"
NEEDS_UPDATE=true
fi
if [ "$CURRENT_VIRTUAL_WORKSPACES" != "${{ env.VIRTUAL_WORKSPACES_VERSION }}" ]; then
echo "Virtual workspaces: $CURRENT_VIRTUAL_WORKSPACES -> ${{ env.VIRTUAL_WORKSPACES_VERSION }}"
NEEDS_UPDATE=true
fi
if [ "$CURRENT_PLATFORM_MESH_OPERATOR_COMPONENTS" != "${{ env.PLATFORM_MESH_OPERATOR_COMPONENTS_VERSION }}" ]; then
echo "Platform mesh operator components: $CURRENT_PLATFORM_MESH_OPERATOR_COMPONENTS -> ${{ env.PLATFORM_MESH_OPERATOR_COMPONENTS_VERSION }}"
NEEDS_UPDATE=true
fi
if [ "$CURRENT_PLATFORM_MESH_OPERATOR_INFRA_COMPONENTS" != "${{ env.PLATFORM_MESH_OPERATOR_INFRA_COMPONENTS_VERSION }}" ]; then
echo "Platform mesh operator infra components: $CURRENT_PLATFORM_MESH_OPERATOR_INFRA_COMPONENTS -> ${{ env.PLATFORM_MESH_OPERATOR_INFRA_COMPONENTS_VERSION }}"
NEEDS_UPDATE=true
fi
if [ "$CURRENT_EXAMPLE_HTTPBIN_OPERATOR" != "${{ env.EXAMPLE_HTTPBIN_OPERATOR_VERSION }}" ]; then
echo "Example HTTPBin operator: $CURRENT_EXAMPLE_HTTPBIN_OPERATOR -> ${{ env.EXAMPLE_HTTPBIN_OPERATOR_VERSION }}"
NEEDS_UPDATE=true
fi
if [ "$CURRENT_IAM_SERVICE" != "${{ env.IAM_SERVICE_VERSION }}" ]; then
echo "IAM service: $CURRENT_IAM_SERVICE -> ${{ env.IAM_SERVICE_VERSION }}"
NEEDS_UPDATE=true
fi
if [ "$CURRENT_IAM_UI" != "${{ env.IAM_UI_VERSION }}" ]; then
echo "IAM UI: $CURRENT_IAM_UI -> ${{ env.IAM_UI_VERSION }}"
NEEDS_UPDATE=true
fi
if [ "$CURRENT_MARKETPLACE_UI" != "${{ env.MARKETPLACE_UI_VERSION }}" ]; then
echo "Marketplace UI: $CURRENT_MARKETPLACE_UI -> ${{ env.MARKETPLACE_UI_VERSION }}"
NEEDS_UPDATE=true
fi
if [ "$CURRENT_ORGANIZATION_IDP" != "${{ env.ORGANIZATION_IDP_VERSION }}" ]; then
echo "Organization-idp component: $CURRENT_ORGANIZATION_IDP -> ${{ env.ORGANIZATION_IDP_VERSION }}"
NEEDS_UPDATE=true
fi
# Check third-party dependency versions
if [ "$CURRENT_CROSSPLANE" != "${{ env.CROSSPLANE_VERSION }}" ]; then
echo "Crossplane: $CURRENT_CROSSPLANE -> ${{ env.CROSSPLANE_VERSION }}"
NEEDS_UPDATE=true
fi
if [ "$CURRENT_KCP_OPERATOR" != "${{ env.KCP_OPERATOR_CHART_VERSION }}" ]; then
echo "KCP Operator: $CURRENT_KCP_OPERATOR -> ${{ env.KCP_OPERATOR_CHART_VERSION }}"
NEEDS_UPDATE=true
fi
if [ "$CURRENT_KCP" != "${{ env.KCP_VERSION }}" ]; then
echo "KCP: $CURRENT_KCP -> ${{ env.KCP_VERSION }}"
NEEDS_UPDATE=true
fi
if [ "$CURRENT_ETCD_DRUID" != "${{ env.GARDENER_ETCD_DRUID_SOURCE_REF }}" ]; then
echo "Gardener etcd-druid: $CURRENT_ETCD_DRUID -> ${{ env.GARDENER_ETCD_DRUID_SOURCE_REF }}"
NEEDS_UPDATE=true
fi
if [ "$CURRENT_OPENFGA" != "${{ env.OPENFGA_VERSION }}" ]; then
echo "OpenFGA: $CURRENT_OPENFGA -> ${{ env.OPENFGA_VERSION }}"
NEEDS_UPDATE=true
fi
if [ "$CURRENT_GATEWAY_API" != "${{ env.GATEWAY_API_VERSION }}" ]; then
echo "Gateway API: $CURRENT_GATEWAY_API -> ${{ env.GATEWAY_API_VERSION }}"
NEEDS_UPDATE=true
fi
if [ "$CURRENT_TRAEFIK" != "${{ env.TRAEFIK_VERSION }}" ]; then
echo "Traefik: $CURRENT_TRAEFIK -> ${{ env.TRAEFIK_VERSION }}"
NEEDS_UPDATE=true
fi
if [ "$CURRENT_CERT_MANAGER" != "${{ env.CERT_MANAGER_VERSION }}" ]; then
echo "Cert Manager: $CURRENT_CERT_MANAGER -> ${{ env.CERT_MANAGER_VERSION }}"
NEEDS_UPDATE=true
fi
if [ "$NEEDS_UPDATE" = "true" ]; then
echo "Component dependencies have changed, creating new version"
echo "Previous platform-mesh version: ${{ env.CURRENT_PM_VERSION }}"
echo "New platform-mesh version: ${{ env.NEXT_VERSION }}"
echo "needs_update=true" >> $GITHUB_OUTPUT
echo "VERSION=${{ env.NEXT_VERSION }}" >> $GITHUB_ENV
else
echo "No dependency changes detected, skipping component creation"
echo "Current platform-mesh version: ${{ env.CURRENT_PM_VERSION }} (no update needed)"
echo "needs_update=false" >> $GITHUB_OUTPUT
fi
- name: create OCM ComponentArchive
if: steps.version_check.outputs.needs_update == 'true'
run: |
ocm_ctf=.ocm/transport.ctf
mkdir -p "$(dirname "$ocm_ctf")"
./ocm add components -c --templater=go --file "$ocm_ctf" constructor/component-constructor.yaml -- \
VERSION=${{ env.VERSION }} \
ACCOUNT_OPERATOR_VERSION=${{ env.ACCOUNT_OPERATOR_VERSION }} \
EXTENSION_MANAGER_OPERATOR_VERSION=${{ env.EXTENSION_MANAGER_OPERATOR_VERSION }} \
INFRA_VERSION=${{ env.INFRA_VERSION }} \
SECURITY_OPERATOR_VERSION=${{ env.SECURITY_OPERATOR_VERSION }} \
REBAC_AUTHZ_WEBHOOK_VERSION=${{ env.REBAC_AUTHZ_WEBHOOK_VERSION }} \
PORTAL_VERSION=${{ env.PORTAL_VERSION }} \
PLATFORM_MESH_OPERATOR_VERSION=${{ env.PLATFORM_MESH_OPERATOR_VERSION }} \
VIRTUAL_WORKSPACES_VERSION=${{ env.VIRTUAL_WORKSPACES_VERSION }} \
CROSSPLANE_VERSION=${{ env.CROSSPLANE_VERSION }} \
KCP_OPERATOR_CHART_VERSION=${{ env.KCP_OPERATOR_CHART_VERSION }} \
KCP_OPERATOR_IMAGE_VERSION=${{ env.KCP_OPERATOR_IMAGE_VERSION }} \
KCP_VERSION=${{ env.KCP_VERSION }} \
GARDENER_ETCD_DRUID_SOURCE_REF=${{ env.GARDENER_ETCD_DRUID_SOURCE_REF }} \
GARDENER_ETCD_DRUID_CHART_VERSION=${{ env.GARDENER_ETCD_DRUID_CHART_VERSION }} \
OPENFGA_VERSION=${{ env.OPENFGA_VERSION }} \
GATEWAY_API_VERSION=${{ env.GATEWAY_API_VERSION }} \
GATEWAY_API_COMMIT=${{ env.GATEWAY_API_COMMIT }} \
TRAEFIK_VERSION=${{ env.TRAEFIK_VERSION }} \
TRAEFIK_CRD_VERSION=${{ env.TRAEFIK_CRD_VERSION }} \
CERT_MANAGER_VERSION=${{ env.CERT_MANAGER_VERSION }} \
KUBERNETES_GRAPHQL_GATEWAY_VERSION=${{ env.KUBERNETES_GRAPHQL_GATEWAY_VERSION }} \
KEYCLOAK_VERSION=${{ env.KEYCLOAK_VERSION}} \
PLATFORM_MESH_OPERATOR_COMPONENTS_VERSION=${{ env.PLATFORM_MESH_OPERATOR_COMPONENTS_VERSION }} \
PLATFORM_MESH_OPERATOR_INFRA_COMPONENTS_VERSION=${{ env.PLATFORM_MESH_OPERATOR_INFRA_COMPONENTS_VERSION }} \
EXAMPLE_HTTPBIN_OPERATOR_VERSION=${{ env.EXAMPLE_HTTPBIN_OPERATOR_VERSION }} \
IAM_SERVICE_VERSION=${{ env.IAM_SERVICE_VERSION }} \
IAM_UI_VERSION=${{ env.IAM_UI_VERSION }} \
MARKETPLACE_UI_VERSION=${{ env.MARKETPLACE_UI_VERSION }} \
ORGANIZATION_IDP_VERSION=${{ env.ORGANIZATION_IDP_VERSION }}
- name: Transfer to OCM REPO
if: steps.version_check.outputs.needs_update == 'true'
run: ./ocm transfer ctf --overwrite .ocm/transport.ctf "ghcr.io/platform-mesh"