From 5b78694273560c90a0eed112ff6770e667bb2e5c Mon Sep 17 00:00:00 2001 From: Mike Bonnet Date: Thu, 29 Jan 2026 18:17:44 -0800 Subject: [PATCH] stop building the bats image Remove the Tekton pipelines for building the bats image, and the bats-integration test. Run tests as part of the ramalama image build using the e2e image. Signed-off-by: Mike Bonnet --- .tekton/bats/bats-pull-request.yaml | 47 ------------ .tekton/bats/bats-push.yaml | 44 ----------- .../pipelines/bats-integration.yaml | 75 ------------------- .tekton/integration/tasks/init-snapshot.yaml | 6 -- .tekton/ramalama/ramalama-pull-request.yaml | 2 +- .tekton/ramalama/ramalama-push.yaml | 2 +- 6 files changed, 2 insertions(+), 174 deletions(-) delete mode 100644 .tekton/bats/bats-pull-request.yaml delete mode 100644 .tekton/bats/bats-push.yaml delete mode 100644 .tekton/integration/pipelines/bats-integration.yaml diff --git a/.tekton/bats/bats-pull-request.yaml b/.tekton/bats/bats-pull-request.yaml deleted file mode 100644 index 7e30687d..00000000 --- a/.tekton/bats/bats-pull-request.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: tekton.dev/v1 -kind: PipelineRun -metadata: - annotations: - build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}} - build.appstudio.redhat.com/commit_sha: '{{revision}}' - build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}' - build.appstudio.redhat.com/target_branch: '{{target_branch}}' - pipelinesascode.tekton.dev/cancel-in-progress: "true" - pipelinesascode.tekton.dev/max-keep-runs: "3" - pipelinesascode.tekton.dev/on-cel-expression: >- - event == "pull_request" && target_branch == "main" && body.action != "ready_for_review" - labels: - appstudio.openshift.io/application: ramalama - appstudio.openshift.io/component: bats - pipelines.appstudio.openshift.io/type: build - name: bats-on-pull-request - namespace: ramalama-tenant -spec: - params: - - name: git-url - value: '{{source_url}}' - - name: revision - value: '{{revision}}' - - name: output-image - value: quay.io/redhat-user-workloads/ramalama-tenant/bats:on-pr-{{revision}} - - name: image-expires-after - value: 5d - - name: build-platforms - value: - - linux-d160-c8xlarge/amd64 - - linux-d160-c8xlarge/arm64 - - linux/ppc64le - - linux/s390x - - name: dockerfile - value: container-images/bats/Containerfile - pipelineRef: - name: pull-request-pipeline - timeouts: - pipeline: 12h - finally: 15m - taskRunTemplate: - serviceAccountName: build-pipeline-bats - workspaces: - - name: git-auth - secret: - secretName: '{{ git_auth_secret }}' diff --git a/.tekton/bats/bats-push.yaml b/.tekton/bats/bats-push.yaml deleted file mode 100644 index 3354fec8..00000000 --- a/.tekton/bats/bats-push.yaml +++ /dev/null @@ -1,44 +0,0 @@ -apiVersion: tekton.dev/v1 -kind: PipelineRun -metadata: - annotations: - build.appstudio.openshift.io/repo: https://github.com/containers/ramalama?rev={{revision}} - build.appstudio.redhat.com/commit_sha: '{{revision}}' - build.appstudio.redhat.com/target_branch: '{{target_branch}}' - pipelinesascode.tekton.dev/cancel-in-progress: "false" - pipelinesascode.tekton.dev/max-keep-runs: "3" - pipelinesascode.tekton.dev/on-cel-expression: >- - event == "push" && target_branch == "main" - labels: - appstudio.openshift.io/application: ramalama - appstudio.openshift.io/component: bats - pipelines.appstudio.openshift.io/type: build - name: bats-on-push - namespace: ramalama-tenant -spec: - params: - - name: git-url - value: '{{source_url}}' - - name: revision - value: '{{revision}}' - - name: output-image - value: quay.io/redhat-user-workloads/ramalama-tenant/bats:{{revision}} - - name: build-platforms - value: - - linux-d160-c8xlarge/amd64 - - linux-d160-c8xlarge/arm64 - - linux/ppc64le - - linux/s390x - - name: dockerfile - value: container-images/bats/Containerfile - pipelineRef: - name: push-pipeline - timeouts: - pipeline: 12h - finally: 15m - taskRunTemplate: - serviceAccountName: build-pipeline-bats - workspaces: - - name: git-auth - secret: - secretName: '{{ git_auth_secret }}' diff --git a/.tekton/integration/pipelines/bats-integration.yaml b/.tekton/integration/pipelines/bats-integration.yaml deleted file mode 100644 index 1cde96f2..00000000 --- a/.tekton/integration/pipelines/bats-integration.yaml +++ /dev/null @@ -1,75 +0,0 @@ -kind: Pipeline -apiVersion: tekton.dev/v1 -metadata: - name: bats-integration -spec: - description: | - Test the newly-built ramalama image and layered images on all supported architectures. - params: - - name: SNAPSHOT - description: >- - Information about the components included in the current snapshot under test. - - name: platforms - description: VM platforms on which to run test commands - type: array - default: - - linux-d160-m4xlarge/amd64 - - linux-d160-m4xlarge/arm64 - - linux/ppc64le - - linux/s390x - - linux-g64xlarge/amd64 - - name: commands - description: Test commands to run - type: array - default: - - bash -cx "bin/ramalama info && make bats" - - name: git-url - description: URL of the Git repository containing pipeline and task definitions - default: https://github.com/containers/ramalama.git - - name: git-revision - description: Revision of the Git repository containing pipeline and task definitions - default: main - tasks: - - name: init - params: - - name: SNAPSHOT - value: $(params.SNAPSHOT) - taskRef: - resolver: git - params: - - name: url - value: $(params.git-url) - - name: revision - value: $(params.git-revision) - - name: pathInRepo - value: .tekton/integration/tasks/init-snapshot.yaml - - name: test - matrix: - params: - - name: PLATFORM - value: - - $(params.platforms) - - name: cmd - value: - - $(params.commands) - params: - - name: image - value: $(tasks.init.results.bats-image) - - name: envs - value: - - RAMALAMA_DEFAULT_IMAGE="$(tasks.init.results.ramalama-image)" - - RAMALAMA_DEFAULT_RAG_IMAGE="$(tasks.init.results.ramalama-rag-image)" - - RAMALAMA_STACK_IMAGE=$(tasks.init.results.stack-image) - - >- - RAMALAMA_IMAGES='{"CUDA_VISIBLE_DEVICES": "$(tasks.init.results.cuda-image)"}' - - >- - RAMALAMA_RAG_IMAGES='{"CUDA_VISIBLE_DEVICES": "$(tasks.init.results.cuda-rag-image)"}' - taskRef: - resolver: git - params: - - name: url - value: $(params.git-url) - - name: revision - value: $(params.git-revision) - - name: pathInRepo - value: .tekton/integration/tasks/test-vm-cmd.yaml diff --git a/.tekton/integration/tasks/init-snapshot.yaml b/.tekton/integration/tasks/init-snapshot.yaml index 04d7fa67..910d3934 100644 --- a/.tekton/integration/tasks/init-snapshot.yaml +++ b/.tekton/integration/tasks/init-snapshot.yaml @@ -15,8 +15,6 @@ spec: description: The type of Snapshot that is being tested. - name: release-tags description: A space-separated list of tags that should be applied to the release - - name: bats-image - description: URI of the bats image included in the snapshot - name: e2e-image description: URI of the e2e image included in the snapshot - name: ramalama-image @@ -55,8 +53,6 @@ spec: value: $(results.snapshot-type.path) - name: RESULTS_RELEASE_TAGS_PATH value: $(results.release-tags.path) - - name: RESULTS_BATS_IMAGE_PATH - value: $(results.bats-image.path) - name: RESULTS_E2E_IMAGE_PATH value: $(results.e2e-image.path) - name: RESULTS_RAMALAMA_IMAGE_PATH @@ -83,8 +79,6 @@ spec: component_image() { jq -j --arg name "$1" '.components[] | select(.name == $name) | .containerImage' <<< "$SNAPSHOT" } - component_image bats | tee "$RESULTS_BATS_IMAGE_PATH" - echo component_image e2e | tee "$RESULTS_E2E_IMAGE_PATH" echo component_image ramalama | tee "$RESULTS_RAMALAMA_IMAGE_PATH" diff --git a/.tekton/ramalama/ramalama-pull-request.yaml b/.tekton/ramalama/ramalama-pull-request.yaml index 7e4172d5..b30e2883 100644 --- a/.tekton/ramalama/ramalama-pull-request.yaml +++ b/.tekton/ramalama/ramalama-pull-request.yaml @@ -42,7 +42,7 @@ spec: - name: dockerfile value: container-images/ramalama/Containerfile - name: test-image - value: quay.io/redhat-user-workloads/ramalama-tenant/bats:on-pr-{{revision}} + value: quay.io/redhat-user-workloads/ramalama-tenant/e2e:on-pr-{{revision}} - name: test-envs value: - RAMALAMA_IMAGE=quay.io/redhat-user-workloads/ramalama-tenant/ramalama:on-pr-{{revision}} diff --git a/.tekton/ramalama/ramalama-push.yaml b/.tekton/ramalama/ramalama-push.yaml index dfd199ac..f30011ca 100644 --- a/.tekton/ramalama/ramalama-push.yaml +++ b/.tekton/ramalama/ramalama-push.yaml @@ -32,7 +32,7 @@ spec: - name: dockerfile value: container-images/ramalama/Containerfile - name: test-image - value: quay.io/redhat-user-workloads/ramalama-tenant/bats:{{revision}} + value: quay.io/redhat-user-workloads/ramalama-tenant/e2e:{{revision}} - name: test-envs value: - RAMALAMA_IMAGE=quay.io/redhat-user-workloads/ramalama-tenant/ramalama:{{revision}}