1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-22 06:02:51 +00:00

Fix pytest and pylint task

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
This commit is contained in:
Piyush Garg 2020-07-24 15:53:08 +05:30 committed by tekton-robot
parent e99060431c
commit 96d5997d3d
2 changed files with 8 additions and 6 deletions

View File

@ -39,6 +39,7 @@ spec:
image: docker.io/python:$(inputs.params.PYTHON)
workingDir: /workspace/source
script: |
pip install -r $(inputs.params.SOURCE_PATH)/$(inputs.params.REQUIREMENTS_FILE)
pip show pylint || echo "###\nWarning: Pylint is missing in your requirements\n###" && pip install pylint
pylint $(inputs.params.ARGS) $(inputs.params.MODULE_PATH)
export PATH=$PATH:$HOME/.local/bin
pip install -r $(inputs.params.SOURCE_PATH)/$(inputs.params.REQUIREMENTS_FILE)
pip show pylint || echo "###\nWarning: Pylint is missing in your requirements\n###" && pip install pylint
pylint $(inputs.params.ARGS) $(inputs.params.MODULE_PATH)

View File

@ -36,6 +36,7 @@ spec:
image: docker.io/python:$(inputs.params.PYTHON)
workingDir: /workspace/source
script: |
pip install -r $(inputs.params.SOURCE_PATH)/$(inputs.params.REQUIREMENTS_FILE)
pip show pytest || echo "###\nWarning: Pytest is missing in your requirements\n###" && pip install pytest
pytest $(inputs.params.ARGS) $(inputs.params.SOURCE-PATH)
export PATH=$PATH:$HOME/.local/bin
pip install -r $(inputs.params.SOURCE_PATH)/$(inputs.params.REQUIREMENTS_FILE)
pip show pytest || echo "###\nWarning: Pytest is missing in your requirements\n###" && pip install pytest
pytest $(inputs.params.ARGS) $(inputs.params.SOURCE-PATH)