Args wasnt expanded properly, it showed like this when running the task:
`[pthon-lint : pylint] /tekton/scripts/script-0-s2wjl: line 8: inputs.params.args: not found`
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
the install of requirements.txt was removed from the 0.1 task but it is actually
needed for pylint, since it would error out if it can't find the dependences.
We make sure we can install them as user since the image assume root and that
would not work on some k8 install (ie: openshfit and others).
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
- Bump a new pylint task to 0.2
- Use an image which already has pylint and not auto install it every time we
run the task.
- Convert the spec to pipelineSpec
- Do not try to install requirements.txt modules since pylint doesn't need it.
- Remove the ability to choose another python version since you probaby would
not need it for a static analyzer. If you really need it you can redefine the
image params targetting a custom container image.
Co-authored-by: Maximilian Wurzer <62810491+wumaxd@users.noreply.github.com>
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
We were previously using the outdated git_clone version 0.1 in the
add_git_clone_task function.
So let's introduce a more generic function :
```
add_task ${task} ${version}
```
if version is 'latest' it will always install the latest version of the task.
Change all pre-apply-task-hook to use that function instead.
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
Use variable $(workspaces.source.path) for path (pytest)
Add OWNERS file
Use latest tag for the python images as default
Signed-off-by: wumaxd <wurzer.maxi@gmx.de>
* Only intall the requirements when the file is here
(sometime we write pure python script that doesn't need external libs)
* fix installing pylint when needed
* Use variable $(workspaces.source.path) for path
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
Centralize all the the git-clone apply commands we had around the
pre-apply-task-hook to a central common function.
This will make easier to have the same git-clone task version used everywhere.
Add some documentation about the helper functions along the way.
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
This will the fix the pytest and pylint task
which fails if run as non root user
in case of non-root user, it install at
location which is not in PATH of image
so adding the required PATH fix the issue