-
Notifications
You must be signed in to change notification settings - Fork 89
/
Copy pathtekton.dev_v1alpha1_task_kf-ready.yaml
81 lines (81 loc) · 2.91 KB
/
tekton.dev_v1alpha1_task_kf-ready.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
annotations:
sidecar.istio.io/inject: "false"
name: kf-ready
namespace: kf-ci
spec:
inputs:
params:
- description: Cluster pattern to select the KF cluster to run on Default to be from master branch.
name: testing-cluster-pattern
type: string
- description: Location to search for test clusters e.g. us-central1 or us-central1-f
name: testing-cluster-location
type: string
- default: kf-ready
description: Name to give the test results file.
name: test-name
type: string
- description: GCS bucket and directory artifacts will be uploaded to. Should be in the form of 'gs://'
name: artifacts-gcs
type: string
- default: gcr.io/kubeflow-ci/test-worker-py3@sha256:a749d7fa4d77466c892a206d3adf0909e86717da898dbd12378e6cbed59ffbd3
description: The docker image to run the tests in. Should contain a version of kubeflow/testing/py in /srcCache that we want to use.
name: test-image
type: string
resources:
- name: kfctl-repo
type: git
steps:
- args:
- -m
- kubeflow.testing.get_kf_testing_cluster
- get-credentials
- --pattern=$(inputs.params.testing-cluster-pattern)
- --location=$(inputs.params.testing-cluster-location)
- --output=/workspace/cluster.info.yaml
command:
- python
env:
- name: PYTHONPATH
value: /workspace/$(inputs.resources.kfctl-repo.name)/py:/srcCache/kubeflow/testing/py
image: $(inputs.params.test-image)
name: get-credential
- env:
- name: PYTHONPATH
value: /workspace/$(inputs.resources.kfctl-repo.name)/py:/srcCache/kubeflow/testing/py
image: $(inputs.params.test-image)
name: kf-ready
script: |
#!/usr/bin/env bash
set -x
# Get the name of the cluster
export KFNAME=$(yq r /workspace/cluster.info.yaml cluster.name)
# I think -s mean stdout/stderr will print out to aid in debugging.
# Failures still appear to be captured and stored in the junit file.
# Test suite name needs to be unique based on parameters
pytest kf_is_ready_test.py \
-s \
--log-cli-level=info \
--log-cli-format='%(levelname)s|%(asctime)s|%(pathname)s|%(lineno)d| %(message)s' \
--junitxml=/workspace/artifacts/junit_kf-ready.xml \
--app_name=$(KFNAME) \
--timeout=180 \
-o junit_suite_name=test_kf_ready_blueprint
echo test finished.
workingDir: /workspace/$(inputs.resources.kfctl-repo.name)/py/kubeflow/kfctl/testing/pytests
- args:
- -m
- kubeflow.testing.tekton_client
- junit-parse-and-upload
- --artifacts_dir=/workspace/artifacts
- --output_gcs=$(inputs.params.artifacts-gcs)
command:
- python
env:
- name: PYTHONPATH
value: /workspace/$(inputs.resources.kfctl-repo.name)/py:/srcCache/kubeflow/testing/py
image: $(inputs.params.test-image)
name: copy-artifacts