Skip to content

Commit 51a0b50

Browse files
committed
update release-test-pipelines
1 parent dfaf79d commit 51a0b50

3 files changed

Lines changed: 60 additions & 20 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
HUB_KUBECONFIG=$1
2+
SPOKE_KUBECONFIG=$2
3+
TEKTON_VERSION=v1.10.2
4+
5+
export HUB=hub
6+
export SPOKE=spoke-1
7+
8+
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
9+
ROOT="$(dirname "$SCRIPT_DIR")"
10+
11+
12+
echo "Create Hub Secret"
13+
kubectl create secret generic ${HUB}-secret \
14+
--from-file=kubeconfig=${HUB_KUBECONFIG} --dry-run=client -o yaml | kubectl apply -f -
15+
16+
echo "Create Spoke Secret"
17+
kubectl create secret generic ${SPOKE}-secret \
18+
--from-file=kubeconfig=${SPOKE_KUBECONFIG} --dry-run=client -o yaml | kubectl apply -f -
19+
20+
#echo "Install Tekton Pipelines"
21+
# kubectl apply --server-side -f https://infra.tekton.dev/tekton-releases/pipeline/previous/${TEKTON_VERSION}/release.yaml
22+
# kubectl wait --for=condition=Available deployment --all -n tekton-pipelines --timeout=300s
23+
24+
echo "Apply Resources"
25+
kubectl apply -f "${SCRIPT_DIR}/tasks"
26+
27+
echo "Create PipelineRun"
28+
kubectl create -f "${SCRIPT_DIR}/pipelinerun"
29+
30+
echo "Wait for pipeline run"
31+
tkn pr logs -f --last

release-tests/multikueue/pipelinerun/pr-multikueue.yaml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,13 @@ apiVersion: tekton.dev/v1
33
kind: PipelineRun
44
metadata:
55
generateName: multikueue-setup-
6-
labels:
7-
appstudio.openshift.io/application: openshift-pipelines-index-1-22
8-
appstudio.openshift.io/component: operator-1-22-index-4-17
96
spec:
107
pipelineSpec:
118
params:
129
- name: HUB_SECRET
13-
default: "hub-kuebeconfig"
10+
default: "hub-secret"
1411
- name: SPOKE_SECRET_1
15-
default: "spoke-kuebeconfig"
12+
default: "spoke-1-secret"
1613
workspaces:
1714
- name: credentials
1815
tasks:
@@ -28,12 +25,12 @@ spec:
2825
value: Spoke
2926
- name: KUEBECONFIG_SECRET
3027
value: $(params.SPOKE_SECRET_1)
31-
# - name: hub
32-
# params:
33-
# - name: MULTI_CLUSTER_ROLE
34-
# value: Hub
35-
# - name: KUEBECONFIG_SECRET
36-
# value: $(params.HUB_SECRET)
28+
- name: hub
29+
params:
30+
- name: MULTI_CLUSTER_ROLE
31+
value: Hub
32+
- name: KUEBECONFIG_SECRET
33+
value: $(params.HUB_SECRET)
3734
- name: configure-spoke
3835
matrix:
3936
include:

release-tests/multikueue/tasks/task-multikueue-common.yaml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,20 @@ spec:
3939
oc create ns cert-manager-operator --dry-run=client -o yaml | oc apply -f -
4040
- name: create-operator-group
4141
script: |
42-
cat <<EOF | oc apply -f -
42+
set -x
43+
if ! oc get operatorgroup -n "$KUEUE_NAMESPACE" --no-headers | grep -q "$KUEUE_NAMESPACE"; then
44+
echo "OperatorGroup not found. Creating..."
45+
cat <<EOF | oc apply -f -
4346
apiVersion: operators.coreos.com/v1
4447
kind: OperatorGroup
4548
metadata:
46-
name: $KUEUE_NAMESPACE
47-
namespace: $KUEUE_NAMESPACE
49+
name: "$KUEUE_NAMESPACE"
50+
namespace: "$KUEUE_NAMESPACE"
4851
spec: {}
4952
EOF
53+
else
54+
echo "OperatorGroup already exists in $KUEUE_NAMESPACE. Skipping."
55+
fi
5056
- name: install-cert-manager
5157
script: |
5258
cat << EOF | oc apply -f -
@@ -56,7 +62,11 @@ spec:
5662
name: openshift-cert-manager-operator
5763
namespace: cert-manager-operator
5864
spec:
59-
channel: stable-v1.18
65+
config:
66+
env:
67+
- name: ROLEARN
68+
value: test
69+
channel: stable-v1
6070
installPlanApproval: Automatic
6171
name: openshift-cert-manager-operator
6272
source: redhat-operators
@@ -87,7 +97,7 @@ spec:
8797
apiVersion: operators.coreos.com/v1alpha1
8898
kind: CatalogSource
8999
metadata:
90-
name: "custom-redhat-opeator"
100+
name: "custom-osp-operator"
91101
namespace: openshift-marketplace
92102
spec:
93103
sourceType: grpc
@@ -109,13 +119,15 @@ spec:
109119
namespace: openshift-operators
110120
spec:
111121
name: openshift-pipelines-operator-rh
112-
source: "custom-redhat-opeato"
122+
source: "custom-osp-operator"
113123
sourceNamespace: openshift-marketplace
114124
channel: latest
115125
EOF
116-
- name: check-rhbok-pods
126+
- name: wait-for-rhbok-pods
117127
script: |
118-
oc -n $KUEUE_NAMESPACE get po
128+
#!/usr/bin/env bash
129+
kubectl -n $KUEUE_NAMESPACE get po
130+
kubectl wait --for=condition=Available deployment --all -n $KUEUE_NAMESPACE --timeout=300s
119131
120132
- name: create-kueue-cr
121133
script: |
@@ -144,7 +156,7 @@ spec:
144156
managementState: Managed
145157
operatorLogLevel: Normal
146158
EOF
147-
- name: check-tekton-config
159+
- name: wait-for-tekton-config
148160
script: |
149161
#!/usr/bin/env bash
150162
oc get tektonconfig config

0 commit comments

Comments
 (0)