Breadcrumb

  1. Red Hat Interactive Learning Portal
  2. OpenShift learning
  3. Accelerate 5G core standalone rollout: An end-to-end testing pipeline with Red Hat OpenShift
  4. Run the 5G core testing pipeline

Accelerate 5G core standalone rollout: An end-to-end testing pipeline with Red Hat OpenShift

Deploy a 5G core testing pipeline to create a continuous quality check for a 5G core network. Integrate tools like Ansible Automation Platform for automation and ABot by Rebaca Technologies to ensure seamless integration and performance across different vendors.

Try Red Hat OpenShift

In our use case, when a 5G core network function is pushed to Red Hat Quay, a webhook triggers the EventListener, which processes the event and runs the associated TriggerTemplate.

Now that the pipeline is ready, let’s add the following resources to the pipelines project to define the TriggerTemplate and run the pipeline. 

Prerequisites:

  • Create the full 5G core testing pipeline.

In this lesson, you will:

  • Add TriggerBindingTriggerTemplate, and EventListener resources to the pipelines project.
  • Trigger the pipeline by pushing the image you want to test to the inbound repository.

Run the pipeline

TriggerBinding

TriggerBinding captures fields from the webhook payload and maps them to parameters like imageRegistryimageTag, and imageRepository

Create this resource by running the following command:

oc apply -f https://raw.githubusercontent.com/rh-telco-tigers/open5gs-test-framework/refs/heads/main/Triggers/triggerbinding.yaml

TriggerTemplate

TriggerTemplate defines the PipelineRun that runs when the EventListener detects a new image push to Quay.

Create this resource by running the following command:

oc apply -f https://raw.githubusercontent.com/rh-telco-tigers/open5gs-test-framework/refs/heads/main/Triggers/triggertemplate.yaml

EventListener

An EventListener creates a service that listens for events and links a TriggerTemplate with a TriggerBinding.

Create this resource by running the following command:

oc apply -f https://raw.githubusercontent.com/rh-telco-tigers/open5gs-test-framework/refs/heads/main/Triggers/eventlistener.yaml

List the service that is created in the pipelines namespace:

oc get svc -n pipelines

Create a route to expose the previous service:

oc expose svc/el-<eventlistener-name> -n pipelines

Trigger the pipeline: Pass and fail cases

To trigger the pipeline, push the image you want to test to the inbound repository using either the following Docker or Podman command:

podman push <your-registry-hostname>/inbound-repository/open5gs-image:latest

Once the image is pushed, switch to the pipelines namespace in your Red Hat OpenShift cluster, then go to the Pipelines section and check the PipelineRuns tab (Figure 1). The pipeline should start running automatically.

A flow diagram showing the steps for verifying the status of PipelineRuns in Red Hat OpenShift.
Figure 1: PipelineRuns in Red Hat OpenShift.

When tests pass

In Figure 2, the Policy Control Function (PCF) image passed all test cases. The pipeline ran the promote-new-version task to push the image to the integration repository for the next phase of testing.

A diagram showing that a pipeline has passed all test cases.
Figure 2: OpenShift Pipeline success flow.

When tests fail

In Figure 3, the PCF image didn’t pass the test cases. As a result, the pipeline skipped the promote-new-version task and moved straight to cleaning up the test environment.

A diagram showing that a pipeline has passed all tests except for promote-new-version and has therefore skipped that task.
Figure 2: OpenShift Pipeline failure flow.
Figure 3: OpenShift Pipeline failure flow.

Summary

In this learning path, we walked through setting up a pipeline to automate PCF testing within a 5G core environment using OpenShift Pipelines and ABot by Rebaca Technologies. From pushing the image and sending real-time Slack notifications to promoting the image to the integration registry, everything runs smoothly without lifting a finger! This automation saves time, ensures core network functions behave correctly, and creates a reliable CI/CD workflow for 5G core components.

Ready to learn more about Pipelines and CI/CD?

Previous resource
Set up the 5G core testing pipeline