Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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
88 changes: 63 additions & 25 deletions .konflux/tekton/release-test-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ spec:
script: |
#!/usr/bin/env bash
set -e

# Extract OCP version from COMPONENT_NAME
# Expected format: operator-1-22-index-4-20 -> 4.20
echo "Component Name: $COMPONENT_NAME"

# Extract version pattern (e.g., "4-19" from "operator-1-22-index-4-20")
VERSION_PATTERN=$(echo "$COMPONENT_NAME" | grep -oE '[0-9]+-[0-9]+' | tail -1)

if [ -z "$VERSION_PATTERN" ]; then
echo "Warning: Could not extract version from application name, will use default"
OCP_VERSION="4.20"
Expand All @@ -115,20 +115,20 @@ spec:
OCP_VERSION=$(echo "$VERSION_PATTERN" | tr '-' '.')
echo "Extracted OCP Version: $OCP_VERSION"
fi

echo -n "$OCP_VERSION" | tee /tekton/results/ocpVersion

# Fetch the latest patch version for this OCP version
echo "Fetching latest patch version for ${OCP_VERSION}..."
RELEASE_URL="https://multi.ocp.releases.ci.openshift.org/api/v1/releasestream/4-stable-multi/latest?prefix=${OCP_VERSION}."
echo "GET $RELEASE_URL"

RELEASE_INFO=$(curl -s "$RELEASE_URL")
echo "$RELEASE_INFO"

VERSION=$(echo "$RELEASE_INFO" | jq -r '.name')
echo "Selected version: $VERSION"

# Write result for create-cluster step
mkdir -p /tekton/steps/step-extract-and-pick-version/results
echo -n "$VERSION" | tee /tekton/steps/step-extract-and-pick-version/results/version
Expand All @@ -150,12 +150,28 @@ spec:
- name: instanceType
value: $(params.INSTANCE_TYPE)
- name: fips
value: true
- name: imageContentSources
value: |
- source: registry.redhat.io/openshift-pipelines/
mirrors:
- quay.io/redhat-user-workloads/tekton-ecosystem-tenant
value: false
# Configure Loki and OpenShift Logging
- name: configure-loki-logging
runAfter:
- provision-cluster
taskRef:
resolver: git
params:
- name: url
value: $(params.RELEASE_TEST_TASKS_REPO)
- name: revision
value: $(params.RELEASE_TEST_TASKS_BRANCH)
- name: pathInRepo
value: .konflux/tekton/task-configure-loki-logging.yaml
params:
- name: EAAS_SPACE_SECRET_REF
value: $(tasks.provision-eaas-space.results.secretRef)
- name: CLUSTER_NAME
value: $(tasks.provision-cluster.results.clusterName)
- name: IMAGE
value: $(params.IMAGE)

# Create Catalog Source to install Operator
- name: create-catalog-source
runAfter:
Expand Down Expand Up @@ -258,6 +274,28 @@ spec:
value: "$(tasks.create-catalog-source.results.channel)"
runAfter:
- create-catalog-source

# Setup test user accounts
- name: setup-testing-accounts
taskRef:
resolver: git
params:
- name: url
value: $(params.RELEASE_TEST_TASKS_REPO)
- name: revision
value: $(params.RELEASE_TEST_TASKS_BRANCH)
- name: pathInRepo
value: .konflux/tekton/task-setup-testing-accounts.yaml
params:
- name: EAAS_SPACE_SECRET_REF
value: $(tasks.provision-eaas-space.results.secretRef)
- name: CLUSTER_NAME
value: $(tasks.provision-cluster.results.clusterName)
- name: IMAGE
value: $(params.IMAGE)
runAfter:
- install-pipelines-operator

#Release Tests - Chains
- name: release-tests-chains
onError: continue
Expand Down Expand Up @@ -286,7 +324,7 @@ spec:
- name: GIT_RELEASE_TESTS_BRANCH
value: $(params.GIT_RELEASE_TESTS_BRANCH)
runAfter:
- install-pipelines-operator
- setup-testing-accounts

#Release Tests - Manual Approval Gate
- name: release-tests-manual-approval
Expand Down Expand Up @@ -316,7 +354,7 @@ spec:
- name: GIT_RELEASE_TESTS_BRANCH
value: $(params.GIT_RELEASE_TESTS_BRANCH)
runAfter:
- install-pipelines-operator
- setup-testing-accounts

#Release Tests - Metrics
- name: release-tests-metrics
Expand Down Expand Up @@ -346,7 +384,7 @@ spec:
- name: GIT_RELEASE_TESTS_BRANCH
value: $(params.GIT_RELEASE_TESTS_BRANCH)
runAfter:
- install-pipelines-operator
- setup-testing-accounts

#Release Tests - Pipelines as Code
- name: release-tests-pac
Expand Down Expand Up @@ -376,7 +414,7 @@ spec:
- name: GIT_RELEASE_TESTS_BRANCH
value: $(params.GIT_RELEASE_TESTS_BRANCH)
runAfter:
- install-pipelines-operator
- setup-testing-accounts

#Release Tests - Versions
- name: release-tests-versions
Expand Down Expand Up @@ -406,7 +444,7 @@ spec:
- name: GIT_RELEASE_TESTS_BRANCH
value: $(params.GIT_RELEASE_TESTS_BRANCH)
runAfter:
- install-pipelines-operator
- setup-testing-accounts

#Release Tests - Pipelines
- name: release-tests-pipelines
Expand Down Expand Up @@ -436,7 +474,7 @@ spec:
- name: GIT_RELEASE_TESTS_BRANCH
value: $(params.GIT_RELEASE_TESTS_BRANCH)
runAfter:
- install-pipelines-operator
- setup-testing-accounts

#Release Tests - Triggers
- name: release-tests-triggers
Expand Down Expand Up @@ -468,7 +506,7 @@ spec:
- name: OCP_VERSION
value: "$(tasks.provision-cluster.results.ocpVersion)"
runAfter:
- install-pipelines-operator
- setup-testing-accounts

#Release Tests - Results
- name: release-tests-results
Expand Down Expand Up @@ -498,7 +536,7 @@ spec:
- name: GIT_RELEASE_TESTS_BRANCH
value: $(params.GIT_RELEASE_TESTS_BRANCH)
runAfter:
- install-pipelines-operator
- setup-testing-accounts

#Release Tests - Triggers TLS
- name: release-tests-triggers-tls
Expand Down Expand Up @@ -528,7 +566,7 @@ spec:
- name: GIT_RELEASE_TESTS_BRANCH
value: $(params.GIT_RELEASE_TESTS_BRANCH)
runAfter:
- install-pipelines-operator
- setup-testing-accounts

finally:
# Verify aggregate status and fail pipeline if any e2e task failed
Expand All @@ -545,11 +583,11 @@ spec:
script: |
#!/bin/sh
echo "📋 Aggregate Status: $(params.aggregateStatus)"

if [[ "$(params.aggregateStatus)" != "Succeeded" ]]; then
echo "❌ Pipeline contains failed tasks!"
echo "💡 Check individual task logs for detailed error information"
exit 1
fi

echo "✅ All tasks succeeded!"
86 changes: 86 additions & 0 deletions .konflux/tekton/task-configure-loki-logging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: configure-loki-logging
spec:
description: |
Installs MinIO, Loki operator, and OpenShift Logging operator on an
ephemeral EaaS cluster using the install-logging.sh script from the
release-tests-infra repository.
params:
- name: EAAS_SPACE_SECRET_REF
type: string
- name: CLUSTER_NAME
type: string
description: Name of the ephemeral EaaS cluster
- name: IMAGE
description: CI image that contains the oc client
default: quay.io/openshift-pipeline/ci:latest
- name: INFRA_REPO_URL
default: https://github.com/openshift-pipelines/release-tests-infra.git
- name: INFRA_REPO_BRANCH
default: acceptance-tests-infra
volumes:
- name: credentials
emptyDir: {}
- name: source
emptyDir: {}
stepTemplate:
image: $(params.IMAGE)
volumeMounts:
- name: credentials
mountPath: /credentials
- name: source
mountPath: /source
steps:
- name: create-repo
script: |
mkdir -p /source/infra
chmod 777 /source/infra
- name: fetch-infra-repo
ref:
resolver: http
params:
- name: url
value: https://raw.githubusercontent.com/openshift-pipelines/tektoncd-catalog/p/stepactions/stepaction-git-clone/0.4.1/stepaction-git-clone.yaml
params:
- name: OUTPUT_PATH
value: /source/infra
- name: URL
value: $(params.INFRA_REPO_URL)
- name: REVISION
value: $(params.INFRA_REPO_BRANCH)
- name: get-kubeconfig
ref:
resolver: git
params:
- name: url
value: https://github.com/konflux-ci/build-definitions.git
- name: revision
value: main
- name: pathInRepo
value: stepactions/eaas-get-ephemeral-cluster-credentials/0.1/eaas-get-ephemeral-cluster-credentials.yaml
params:
- name: eaasSpaceSecretRef
value: "$(params.EAAS_SPACE_SECRET_REF)"
- name: clusterName
value: "$(params.CLUSTER_NAME)"
- name: credentials
value: credentials
- name: configure-loki-logging
env:
- name: KUBECONFIG
value: "/credentials/$(steps.get-kubeconfig.results.kubeconfig)"
workingDir: /source/infra
script: |
#!/usr/bin/env bash
set -e -o pipefail

echo "Running install-logging.sh from release-tests-infra..."
echo "Cluster: $(oc whoami --show-server)"

chmod +x config/operators/install-logging.sh
bash config/operators/install-logging.sh

echo "Loki and Logging operators configured successfully!"
18 changes: 15 additions & 3 deletions .konflux/tekton/task-e2e-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,18 @@ spec:
name: pac-gitlab
key: gitlab-webhook-token
optional: true
- name: GITLAB_GROUP_NAMESPACE
valueFrom:
secretKeyRef:
name: pac-gitlab
key: gitlab-group-ns
optional: true
- name: GITLAB_PROJECT_ID
valueFrom:
secretKeyRef:
name: pac-gitlab
key: gitlab-project-id
optional: true
- name: KUBECONFIG
value: "/credentials/$(steps.get-kubeconfig.results.kubeconfig)"
- name: CATALOG_SOURCE
Expand All @@ -135,11 +147,11 @@ spec:
go mod download
go build -p 1 ./...
gauge config check_updates false

# Some of the tests fail on specific OCP versions
set +H
tags="$(params.TAGS),!(skip-$OCP_VERSION | to-do)"
set -H

echo "Running $(params.SPECS) with tags $tags"
gauge run --tags="$tags" --log-level=debug --verbose $(params.SPECS)
gauge run --tags="$tags" --log-level=debug --verbose $(params.SPECS)
Loading