From cce1c3eb3d14dec612fa8b248216cf1ff29d958a Mon Sep 17 00:00:00 2001 From: Jakub Stejskal Date: Fri, 6 Sep 2024 09:15:19 +0200 Subject: [PATCH] Remove ODH deloyment and tests pipeline (#379) Signed-off-by: Jakub Stejskal --- install/roles/automation-hub/tasks/main.yml | 3 - .../open-data-hub/argo-deploy-odh.yaml | 17 -- .../tekton/infra-tkn-pipelines.yaml | 9 - .../test-suite/odh-e2e-metrics-collector.yaml | 68 ------- .../test-suite/odh-e2e-test-suite.yaml.j2 | 176 ------------------ 5 files changed, 273 deletions(-) delete mode 100644 install/roles/automation-hub/tasks/scenario-deployment/open-data-hub/argo-deploy-odh.yaml delete mode 100644 install/roles/automation-hub/templates/tekton/pipelines/test-suite/odh-e2e-metrics-collector.yaml delete mode 100644 install/roles/automation-hub/templates/tekton/pipelines/test-suite/odh-e2e-test-suite.yaml.j2 diff --git a/install/roles/automation-hub/tasks/main.yml b/install/roles/automation-hub/tasks/main.yml index 58e979b7..1bb2fe91 100644 --- a/install/roles/automation-hub/tasks/main.yml +++ b/install/roles/automation-hub/tasks/main.yml @@ -116,9 +116,6 @@ - import_tasks: scenario-deployment/monitoring/argo-deploy-strimzi-monitoring.yaml tags: [argo-apps, argo-strimzi-monitoring, strimzi-infra, never] -- import_tasks: scenario-deployment/open-data-hub/argo-deploy-odh.yaml - tags: [argo-apps, argo-odh, odh, never] - - import_tasks: scenario-deployment/tekton/infra-tkn-pipelines.yaml tags: [tekton-pipelines, infra, never] diff --git a/install/roles/automation-hub/tasks/scenario-deployment/open-data-hub/argo-deploy-odh.yaml b/install/roles/automation-hub/tasks/scenario-deployment/open-data-hub/argo-deploy-odh.yaml deleted file mode 100644 index 1c6cc213..00000000 --- a/install/roles/automation-hub/tasks/scenario-deployment/open-data-hub/argo-deploy-odh.yaml +++ /dev/null @@ -1,17 +0,0 @@ ---- -- name: Create Argo applications for ODH - kubernetes.core.k8s: - kubeconfig: "{{ kubeconfig_path }}/{{ infra_context_name }}" - namespace: "{{ infra_argo_namespace }}" - state: present - apply: true - template: "templates/argo/applications/open-data-hub/{{ file_template }}" - verify_ssl: no - loop: - - open-data-hub-operator.yaml.j2 - - open-data-hub-dependencies.yaml.j2 - - open-data-hub-resources.yaml.j2 - loop_control: - loop_var: file_template - vars: - cluster: "worker-03" diff --git a/install/roles/automation-hub/tasks/scenario-deployment/tekton/infra-tkn-pipelines.yaml b/install/roles/automation-hub/tasks/scenario-deployment/tekton/infra-tkn-pipelines.yaml index 3cc1070e..f7a0da15 100644 --- a/install/roles/automation-hub/tasks/scenario-deployment/tekton/infra-tkn-pipelines.yaml +++ b/install/roles/automation-hub/tasks/scenario-deployment/tekton/infra-tkn-pipelines.yaml @@ -32,15 +32,6 @@ apply: true template: "templates/tekton/pipelines/test-suite/strimzi-e2e-metrics-collector.yaml" -- name: Create collector metrics for odh-e2e suites - kubernetes.core.k8s: - kubeconfig: "{{ kubeconfig_path }}/{{ infra_context_name }}" - namespace: "{{ infra_ci_namespace }}" - state: present - verify_ssl: no - apply: true - template: "templates/tekton/pipelines/test-suite/odh-e2e-metrics-collector.yaml" - - name: Create Tekton pipelines from jinja templates for release_cluster and downstream_cluster kubernetes.core.k8s: kubeconfig: "{{ kubeconfig_path }}/{{ infra_context_name }}" diff --git a/install/roles/automation-hub/templates/tekton/pipelines/test-suite/odh-e2e-metrics-collector.yaml b/install/roles/automation-hub/templates/tekton/pipelines/test-suite/odh-e2e-metrics-collector.yaml deleted file mode 100644 index f738297d..00000000 --- a/install/roles/automation-hub/templates/tekton/pipelines/test-suite/odh-e2e-metrics-collector.yaml +++ /dev/null @@ -1,68 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: odh-e2e-metrics-collector - labels: - app: odh-e2e-metrics-collector ---- -kind: Service -apiVersion: v1 -metadata: - name: odh-e2e-metrics-collector - labels: - app: odh-e2e-metrics-collector -spec: - ports: - - port: 8080 - name: metrics - protocol: TCP - targetPort: 8080 - selector: - app: odh-e2e-metrics-collector ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: och-e2e-metrics-collector - labels: - app: odh-e2e-metrics-collector -spec: - replicas: 1 - selector: - matchLabels: - app: odh-e2e-metrics-collector - template: - metadata: - labels: - app: odh-e2e-metrics-collector - tealc/kind: odh-e2e-exporter - spec: - serviceAccountName: odh-e2e-metrics-collector - containers: - - name: odh-e2e-metrics-collector - image: quay.io/tealc/metrics-collector@sha256:f7adc0b119f1e4fb7df05575e504fd977e57d7fd79e21a1fa135ade15b27bb85 - resources: - limits: - memory: "128Mi" - cpu: "100m" - imagePullPolicy: Always - ports: - - containerPort: 8080 - name: metrics - protocol: TCP - strategy: - type: Recreate ---- -apiVersion: monitoring.coreos.com/v1 -kind: PodMonitor -metadata: - labels: - app: tealc - name: odh-e2e-metrics -spec: - podMetricsEndpoints: - - path: /metrics - port: metrics - selector: - matchLabels: - tealc/kind: odh-e2e-exporter diff --git a/install/roles/automation-hub/templates/tekton/pipelines/test-suite/odh-e2e-test-suite.yaml.j2 b/install/roles/automation-hub/templates/tekton/pipelines/test-suite/odh-e2e-test-suite.yaml.j2 deleted file mode 100644 index 406802cc..00000000 --- a/install/roles/automation-hub/templates/tekton/pipelines/test-suite/odh-e2e-test-suite.yaml.j2 +++ /dev/null @@ -1,176 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Pipeline -metadata: - name: odh-e2e-test-suite-pipeline - labels: - project: tealc - annotations: - argocd.argoproj.io/hook: PreSync -spec: - workspaces: - - name: pipeline-ws - tasks: - - name: odh-e2e - workspaces: - - name: pipeline-ws - workspace: pipeline-ws - taskSpec: - workspaces: - - name: pipeline-ws - steps: - - name: execute-tests - image: quay.io/mk-ci-cd/mas-ci-tools:latest - env: - - name: KUBE_TOKEN - valueFrom: - secretKeyRef: - name: worker-03-access - key: token - - name: KUBE_URL - valueFrom: - secretKeyRef: - name: worker-03-access - key: server - - name: GITHUB_TOKEN - valueFrom: - secretKeyRef: - name: github-secret - key: TOKEN - script: | - cd $(workspaces.pipeline-ws.path) - - git clone https://github.com/skodjob/odh-e2e.git - - cd odh-e2e - export JAVA_HOME=/usr/lib/jvm/java-17-openjdk - mvn verify -Pcontinuous --settings ./settings.xml - finally: - - name: sent-results - workspaces: - - name: pipeline-ws - workspace: pipeline-ws - taskSpec: - workspaces: - - name: pipeline-ws - steps: - - name: sent-results - image: quay.io/mk-ci-cd/mas-ci-tools:latest - script: | - cd $(workspaces.pipeline-ws.path)/odh-e2e/target/failsafe-reports - for file in *.xml; do curl -X POST -H "X-Run-ID: $(context.pipelineRun.name)" -d @$file odh-e2e-metrics-collector.tealc-pipelines.svc.cluster.local:8080/data; done - - name: notify-slack - when: - - input: $(tasks.status) - operator: in - values: ["Failed"] - taskRef: - name: send-to-webhook-slack - params: - - name: webhook-secret - value: webhook-secret - - name: message - value: "PipelineRun `$(context.pipelineRun.name)` has status: `$(tasks.status)!`" - - name: title - value: "$(context.pipeline.name)" - - name: status - value: "$(tasks.status)" - - name: button_url - value: "{{ infra_console_url }}/k8s/ns/{{ infra_ci_namespace }}/tekton.dev~v1~PipelineRun/$(context.pipelineRun.name)" - - name: button_text - value: "Pipeline :tekton:" - ---- -apiVersion: triggers.tekton.dev/v1alpha1 -kind: TriggerTemplate -metadata: - name: odh-e2e-test-suite-trigger-template - labels: - project: tealc -spec: - resourcetemplates: - - apiVersion: tekton.dev/v1beta1 - kind: PipelineRun - metadata: - generateName: odh-e2e-test-suite- - labels: - app: tealc - spec: - pipelineRef: - name: odh-e2e-test-suite-pipeline - workspaces: - - name: pipeline-ws - volumeClaimTemplate: - metadata: - name: odh-e2e-test-suite-pipeline-pvc - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 500Mi - ---- -apiVersion: triggers.tekton.dev/v1alpha1 -kind: TriggerBinding -metadata: - name: odh-e2e-test-suite-triggerbinding - labels: - project: tealc -spec: - params: - - name: message - value: $(body) - ---- -apiVersion: triggers.tekton.dev/v1alpha1 -kind: EventListener -metadata: - name: odh-e2e-test-suite-event-listener - labels: - listener: tealc - project: tealc -spec: - triggers: - - name: odh-e2e-test-suite-webhook - bindings: - - ref: odh-e2e-test-suite-triggerbinding - template: - ref: odh-e2e-test-suite-trigger-template - resources: - kubernetesResource: - spec: - template: - spec: - containers: - - resources: - limits: - memory: "64Mi" - cpu: "50m" - ---- -# cron job as trigger -apiVersion: batch/v1 -kind: CronJob -metadata: - name: odh-e2e-test-suite-cron - labels: - project: tealc -spec: - failedJobsHistoryLimit: 1 - successfulJobsHistoryLimit: 1 - schedule: "0 25 32 13 *" - jobTemplate: - spec: - template: - spec: - containers: - - name: notify - image: quay.io/tealc/apophis:latest - args: - - curl - - -d - - "{}" - - -H - - 'Content-Type: application/json' - - el-odh-e2e-test-suite-event-listener.tealc-pipelines.svc.cluster.local:8080 - restartPolicy: Never