Skip to content

Commit c8c2db9

Browse files
added nose task
1 parent e1c4c69 commit c8c2db9

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

tekton/tasks.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,41 @@ spec:
1717
---
1818
apiVersion: tekton.dev/v1beta1
1919
kind: Task
20+
metadata:
21+
name: nose
22+
spec:
23+
description: This task will run nosetests on the provided input.
24+
workspaces:
25+
- name: source
26+
params:
27+
- name: args
28+
description: Arguments to pass to nose
29+
type: string
30+
default: "-v"
31+
- name: database_uri
32+
description: Database connection string
33+
type: string
34+
default: "sqlite:///test.db"
35+
steps:
36+
- name: nosetests
37+
image: python:3.9-slim
38+
workingDir: $(workspaces.source.path)
39+
env:
40+
- name: DATABASE_URI
41+
value: $(params.database_uri)
42+
script: |
43+
#!/bin/bash
44+
set -e
45+
46+
echo "***** Installing dependencies *****"
47+
python -m pip install --upgrade pip wheel
48+
pip install -qr requirements.txt
49+
50+
echo "***** Running nosetests with: $(params.args)"
51+
nosetests $(params.args)
52+
---
53+
apiVersion: tekton.dev/v1beta1
54+
kind: Task
2055
metadata:
2156
name: cleanup
2257
spec:

0 commit comments

Comments
 (0)