All Products
Search
Document Center

Container Service for Kubernetes:Build an event-driven CI pipeline with EventBridge

Last Updated:Sep 11, 2026

Build an efficient, low-cost, event-driven CI pipeline with EventBridge and Argo Workflows on ACK One to simplify and accelerate application delivery. This topic explains how to set up the automated CI pipeline workflow.EventBridge and Argo Workflows on ACK One.

Prerequisites

How it works

An event-driven CI pipeline has two parts:

  1. A Git event trigger: Committing code to a Git repository triggers an event.

  2. A CI system: Runs pre-build tests, builds a Docker image, and pushes it to an image repository.

After the image is built, use a Continuous Deployment (CD) system, such as ACK One GitOps, to synchronize the new image tag to the Kubernetes cluster.

image

This solution uses EventBridge, which offers advantages in availability, usability, security, and scalability. The CI layer uses Argo Workflows (CNCF graduated). The ACK One workflow cluster provides fully managed Argo Workflows with enhanced stability, observability, and O&M capabilities, helping you run larger-scale CI pipelines with faster execution and lower cost.workflow cluster provides fully managed Argo Workflows with enhanced stability and observability.

image
  1. A user commits code to a Git repository.

  2. Based on configured rules, EventBridge captures the Git event and delivers it to the ACK One workflow cluster, triggering the CI workflow.

  3. The CI workflow in the ACK One workflow cluster builds a Docker image and pushes it to an image repository. Use GitOps to synchronize the image to an ACK cluster.

Step 1: Prepare the CI environment

  1. Create an ACR EE access credential and mount a File Storage NAS volume. Complete Step 1 and Step 2 in Build a CI pipeline for a Go project in a workflow cluster.

    Note

    Use the same namespace as your Workflow resource.

  2. This example uses the echo-server project. Fork it to your GitHub account and modify the WorkflowTemplate as described in Clone a private Git repository in a CI pipeline.

Step 2: Create an event-driven CI pipeline

  1. Create a custom event bus.

  2. Integrate EventBridge with GitHub. See GitHub integration.

  3. (Optional) Configure an event rule. This example uses the following configuration. See Manage event rules.

    1. Event pattern: This pattern triggers the pipeline only for pushes to the release-v1 branch.

      {
          "source": [
              "github.event"
          ],
          "data": {
              "body": {
                  "ref": [
                      "refs/heads/release-v1"
                  ]
              }
          }
      }
      
    2. Configure an event target.

      1. Service Type: Select Container Service for Kubernetes.

      2. Kubernetes Cluster File: Enter the kubeconfig for your ACK One workflow cluster.

      3. YAML Configuration: Select Template for this example.

      4. Variable: Add workflowName and set it to the event ID.

        {
        	"workflowName": "$.id"
        }
      5. Template: Enter the Workflow CI custom resource (CR). Replace the values in the following example with your own.

        Important

        Explicitly set name and namespace. Do not use generateName. Declare the namespace even if it is default.

        apiVersion: argoproj.io/v1alpha1
        kind: Workflow
        metadata:
          name: ci-go-v1-eb-${workflowName}
          namespace: default
          labels:
            workflows.argoproj.io/workflow-template: ackone-ci
        spec:
          arguments:
            parameters:
            - name: repo_url
              value: https://github.com/ivan-cai/echo-server.git
            - name: repo_name
              value: echo-server
            - name: target_branch
              value: release-v1
            - name: container_image
              value: "YOUR-IMAGE-REGISTRY-ADDRESS"     # Replace the value with the address of your image repository.
            - name: container_tag
              value: "v1.0.0"
            - name: dockerfile
              value: ./Dockerfile
            - name: enable_suffix_commitid
              value: "true"
            - name: enable_test
              value: "true"
          workflowTemplateRef:
            name: ci-go-v1
            clusterScope: true
      6. Network Access: Select Internet for this example.

  4. After you apply this configuration, any commit to the release-v1 branch triggers the pipeline. Verify the process:

    1. View the event trace.

      1. Log on to the EventBridge console. In the left-side navigation pane, click Event Buses.

      2. Click the target event bus. In the left-side navigation pane, click Event Tracking.

      3. On the event tracing page, view the event trace.

        The event trace shows: In Event Receiving, Event Type is eventbridge:Events:HTTPEvent, Bus Name is ci-test, and source is github.event. In Event Delivering, rule ttt delivered the event to the target (59 ms, 200 response code, Success).

    2. View the execution topology of the new workflow.

      Check the workflow topology in the ACK One workflow cluster. See Enable Argo Server to access a workflow cluster.

      Workflow ci-go-v1-eb-3999580c-1ee4-4e10-a75b-af6e8eddccde runs three sequential steps: git-checkout-pr, run-test, and build-push-image. git-checkout-pr and run-test completed, and build-push-image is running.