Skip to content

Commit d10c844

Browse files
committed
Migrate integration cluster provisioning to OpenShift CI (#2784)
EaaS is deprecated and being replaced by OpenShift-CI. Increase AWS instance size to avoid InsufficientMemory errors when deploying test resources. Assisted-by: Codex GPT-5.6 Signed-off-by: amisstea <amisstea@redhat.com> (cherry picked from commit 267a24f) Signed-off-by: amisstea <amisstea@redhat.com>
1 parent 619797e commit d10c844

1 file changed

Lines changed: 40 additions & 76 deletions

File tree

‎.tekton/integration-tests/pipeline/lightspeed-stack-integration-test.yaml‎

Lines changed: 40 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ metadata:
66
spec:
77
description: |
88
This pipeline automates the process of running end-to-end tests for Lightspeed Stack
9-
using a ROSA (Red Hat OpenShift Service on AWS cluster. The pipeline provisions
10-
the ROSA cluster, installs the Lightspeed Stack, runs the tests, collects artifacts,
11-
and finally deprovisions the ROSA cluster.
9+
using an OpenShift CI HyperShift cluster. The pipeline provisions the cluster,
10+
installs the Lightspeed Stack, runs the tests, and collects artifacts.
1211
params:
1312
- name: SNAPSHOT
1413
description: 'The JSON string representing the snapshot of the application under test (includes lightspeed-stack image).'
@@ -24,64 +23,45 @@ spec:
2423
- name: namespace
2524
description: 'Namespace to run tests in'
2625
default: 'lightspeed-stack'
26+
- name: ocp-version
27+
description: 'OpenShift minor version for the ephemeral HyperShift cluster.'
28+
default: '4.19'
29+
type: string
30+
- name: compute-node-type
31+
description: 'AWS instance type for the ephemeral HyperShift compute nodes.'
32+
default: 'm5.xlarge'
33+
type: string
34+
- name: hosted-management-cluster
35+
description: 'Hosted management cluster used to provision the ephemeral cluster.'
36+
default: 'hosted-mgmt2'
37+
type: string
2738
tasks:
28-
- name: eaas-provision-space
39+
- name: provision-cluster
2940
taskRef:
3041
resolver: git
3142
params:
3243
- name: url
33-
value: https://github.com/konflux-ci/build-definitions.git
44+
value: https://github.com/openshift/konflux-tasks
3445
- name: revision
3546
value: main
3647
- name: pathInRepo
37-
value: task/eaas-provision-space/0.1/eaas-provision-space.yaml
48+
value: tasks/provision-ephemeral-cluster/0.1/provision-ephemeral-cluster.yaml
3849
params:
39-
- name: ownerKind
40-
value: PipelineRun
4150
- name: ownerName
4251
value: $(context.pipelineRun.name)
4352
- name: ownerUid
4453
value: $(context.pipelineRun.uid)
45-
- name: provision-cluster
46-
runAfter:
47-
- eaas-provision-space
48-
taskSpec:
49-
results:
50-
- name: clusterName
51-
value: "$(steps.create-cluster.results.clusterName)"
52-
steps:
53-
- name: pick-version
54-
ref:
55-
resolver: git
56-
params:
57-
- name: url
58-
value: https://github.com/konflux-ci/build-definitions.git
59-
- name: revision
60-
value: main
61-
- name: pathInRepo
62-
value: stepactions/eaas-get-latest-openshift-version-by-prefix/0.1/eaas-get-latest-openshift-version-by-prefix.yaml
63-
params:
64-
- name: prefix
65-
value: "4.19."
66-
- name: create-cluster
67-
ref:
68-
resolver: git
69-
params:
70-
- name: url
71-
value: https://github.com/konflux-ci/build-definitions.git
72-
- name: revision
73-
value: main
74-
- name: pathInRepo
75-
value: stepactions/eaas-create-ephemeral-cluster-hypershift-aws/0.1/eaas-create-ephemeral-cluster-hypershift-aws.yaml
76-
params:
77-
- name: eaasSpaceSecretRef
78-
value: $(tasks.eaas-provision-space.results.secretRef)
79-
- name: version
80-
value: "$(steps.pick-version.results.version)"
81-
- name: instanceType
82-
value: "m5.large"
83-
- name: timeout
84-
value: "4h0m0s"
54+
- name: workflow
55+
value: hypershift-hostedcluster-workflow
56+
- name: clusterProfile
57+
value: aws-konflux-prod
58+
- name: timeout
59+
value: 1h
60+
- name: releases
61+
value: >-
62+
{"latest":{"release":{"channel":"stable","version":"$(params.ocp-version)","architecture":"multi"}}}
63+
- name: env
64+
value: '{"COMPUTE_NODE_TYPE":"$(params.compute-node-type)","HOSTED_MANAGEMENT_CLUSTER":"$(params.hosted-management-cluster)"}'
8565
- name: get-stack-images
8666
description: Extract lightspeed-stack image and commit from SNAPSHOT (Llama Stack runs from source in-pod)
8767
runAfter:
@@ -180,10 +160,10 @@ spec:
180160
value: $(tasks.get-stack-images.results.commit)
181161
- name: namespace
182162
value: "$(params.namespace)"
183-
- name: spaceRequestSecretName
184-
value: $(tasks.eaas-provision-space.results.secretRef)
185-
- name: clusterName
186-
value: $(tasks.provision-cluster.results.clusterName)
163+
- name: clusterCredentialsSecretRef
164+
value: $(tasks.provision-cluster.results.secretRef)
165+
- name: ocp-version
166+
value: $(params.ocp-version)
187167
runAfter:
188168
- echo-integration-params
189169
taskSpec:
@@ -194,9 +174,9 @@ spec:
194174
- name: commit
195175
- name: namespace
196176
type: string
197-
- name: spaceRequestSecretName
177+
- name: clusterCredentialsSecretRef
198178
type: string
199-
- name: clusterName
179+
- name: ocp-version
200180
type: string
201181
results:
202182
- name: TEST_OUTPUT
@@ -213,25 +193,9 @@ spec:
213193
secret:
214194
secretName: quay-aipcc-password
215195
- name: credentials
216-
emptyDir: {}
196+
secret:
197+
secretName: $(params.clusterCredentialsSecretRef)
217198
steps:
218-
- name: get-kubeconfig
219-
ref:
220-
resolver: git
221-
params:
222-
- name: url
223-
value: https://github.com/konflux-ci/build-definitions.git
224-
- name: revision
225-
value: main
226-
- name: pathInRepo
227-
value: stepactions/eaas-get-ephemeral-cluster-credentials/0.1/eaas-get-ephemeral-cluster-credentials.yaml
228-
params:
229-
- name: eaasSpaceSecretRef
230-
value: $(params.spaceRequestSecretName)
231-
- name: clusterName
232-
value: "$(params.clusterName)"
233-
- name: credentials
234-
value: credentials
235199
- name: run-e2e-tests
236200
onError: continue
237201
resources:
@@ -252,7 +216,7 @@ spec:
252216
mountPath: /credentials
253217
env:
254218
- name: KUBECONFIG
255-
value: "/credentials/$(steps.get-kubeconfig.results.kubeconfig)"
219+
value: "/credentials/kubeconfig"
256220
- name: ARTIFACT_DIR
257221
value: "/workspace/artifacts"
258222
- name: SUITE_ID
@@ -274,7 +238,7 @@ spec:
274238
echo "[e2e] 2/8 Installing deps (git, tar, jq, curl-minimal, python3, gettext for envsubst)..."
275239
microdnf -y install git tar jq curl-minimal python3 gettext
276240
echo "[e2e] 3/8 Downloading oc client..."
277-
curl -sL -o oc.tar.gz https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/latest-4.19/openshift-client-linux-amd64-rhel9.tar.gz
241+
curl -sL -o oc.tar.gz https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/latest-$(params.ocp-version)/openshift-client-linux-amd64-rhel9.tar.gz
278242
tar -xzf oc.tar.gz && chmod +x kubectl oc && mv oc kubectl /usr/local/bin/
279243
echo "[e2e] 4/8 SNAPSHOT (length ${#SNAPSHOT} chars; clone URL fixed — SNAPSHOT is main/upstream, not fork)..."
280244
# Fixed fork + branch: Konflux SNAPSHOT points at main repo/rev, not the PR/fork under test.
@@ -305,7 +269,7 @@ spec:
305269
# - name: credentials
306270
# value: "credentials"
307271
# - name: kubeconfig
308-
# value: "$(steps.get-kubeconfig.results.kubeconfig)"
272+
# value: "kubeconfig"
309273
# - name: artifact-dir
310274
# value: "/workspace/konflux-artifacts"
311275
# # validate that the cluster resources are available in another tekton step
@@ -344,4 +308,4 @@ spec:
344308
# - name: revision
345309
# value: main
346310
# - name: pathInRepo
347-
# value: stepactions/fail-if-any-step-failed/0.1/fail-if-any-step-failed.yaml
311+
# value: stepactions/fail-if-any-step-failed/0.1/fail-if-any-step-failed.yaml

0 commit comments

Comments
 (0)