Skip to content
Snippets Groups Projects
Commit 689c9ac5 authored by Bartek Wrona's avatar Bartek Wrona
Browse files

PYPROJECT_DIR should default to CI_PROJECT_DIR instead of pwd (which can be random actually)

parent 8a91b40f
No related branches found
No related tags found
1 merge request!65Docker building job templates cleanup
Pipeline #108766 passed
...@@ -22,9 +22,10 @@ variables: ...@@ -22,9 +22,10 @@ variables:
.configuration_template: .configuration_template:
extends: .job-defaults extends: .job-defaults
image: "${PYTHON_IMAGE}" image: "${PYTHON_IMAGE}"
variables:
PYPROJECT_DIR: "${CI_PROJECT_DIR}"
before_script: before_script:
- if [ -z "${PYPROJECT_DIR}" ]; then PYPROJECT_DIR="$(pwd)"; else echo "using - ${PYPROJECT_DIR}"; fi - echo "Using Python project directory - ${PYPROJECT_DIR}"
- poetry -C "${PYPROJECT_DIR}" env use python3 # create virtualenv if not exists - poetry -C "${PYPROJECT_DIR}" env use python3 # create virtualenv if not exists
- source $(poetry -C "${PYPROJECT_DIR}" env info --path)/bin/activate # activate that virtualenv - source $(poetry -C "${PYPROJECT_DIR}" env info --path)/bin/activate # activate that virtualenv
- python3 -V - python3 -V
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment