diff --git a/scripts/pipelines/azure-devops/templates/ci/ci-pipeline.cfg b/scripts/pipelines/azure-devops/templates/ci/ci-pipeline.cfg index 61d11d9bd..2f1bd9183 100644 --- a/scripts/pipelines/azure-devops/templates/ci/ci-pipeline.cfg +++ b/scripts/pipelines/azure-devops/templates/ci/ci-pipeline.cfg @@ -10,8 +10,7 @@ yamlFile="ci-pipeline.yml" scriptFile=("build.sh" "test.sh" "quality.sh") # Source branch. sourceBranch="feature/ci-pipeline" -# Setup Environment script -setupScriptFile="quality-setup-environment.sh" + # Function that copies the script to build, test and check quality of the application. function copyScript { @@ -26,7 +25,6 @@ function copyScript { fi # Copy the quality script. cp "${hangarPath}/${commonTemplatesPipelinePath[2]}/${language}-${scriptFile[2]}.template" "${localDirectory}/${scriptFilePath}/${scriptFile[2]}" - ! [ -f "${hangarPath}/${commonTemplatesPipelinePath[2]}/${language}-${setupScriptFile}" ] || cp "${hangarPath}/${commonTemplatesPipelinePath[2]}/${language}-${setupScriptFile}" "${localDirectory}/${scriptFilePath}/${setupScriptFile}" } # Function that adds the variables to be used in the pipeline. diff --git a/scripts/pipelines/common/templates/build/python-build.sh b/scripts/pipelines/common/templates/build/python-build.sh index 328f34b27..60ed86102 100755 --- a/scripts/pipelines/common/templates/build/python-build.sh +++ b/scripts/pipelines/common/templates/build/python-build.sh @@ -9,11 +9,11 @@ export PIP_NO_CACHE_DIR=1 export POETRY_VERSION=1.0.5 pip install "poetry==$POETRY_VERSION" -python -m venv /venv -poetry export --without-hashes -f requirements.txt | /venv/bin/pip install -r /dev/stdin +python -m venv ./venv +poetry export --without-hashes -f requirements.txt | ./venv/bin/pip install -r /dev/stdin # shellcheck source=/dev/null -. /venv/bin/activate +. ./venv/bin/activate mypy . -poetry build && /venv/bin/pip install dist/*.whl +poetry build && ./venv/bin/pip install dist/*.whl deactivate -mv /venv ./venv \ No newline at end of file +#mv /venv ./venv diff --git a/scripts/pipelines/common/templates/quality/angular-quality-setup-environment.sh b/scripts/pipelines/common/templates/quality/angular-quality-setup-environment.sh deleted file mode 100755 index c25b2d3ec..000000000 --- a/scripts/pipelines/common/templates/quality/angular-quality-setup-environment.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -apt-get update -y -apt-get install -y openjdk-17-jre -apt-get install -y python \ No newline at end of file diff --git a/scripts/pipelines/common/templates/quality/node-quality-setup-environment.sh b/scripts/pipelines/common/templates/quality/node-quality-setup-environment.sh deleted file mode 100755 index c25b2d3ec..000000000 --- a/scripts/pipelines/common/templates/quality/node-quality-setup-environment.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -apt-get update -y -apt-get install -y openjdk-17-jre -apt-get install -y python \ No newline at end of file diff --git a/scripts/pipelines/common/templates/test/python-test.sh b/scripts/pipelines/common/templates/test/python-test.sh index 28e1ec401..24d4db9ef 100755 --- a/scripts/pipelines/common/templates/test/python-test.sh +++ b/scripts/pipelines/common/templates/test/python-test.sh @@ -1,9 +1,9 @@ #!/bin/bash set -e # shellcheck source=/dev/null -mv venv /venv +#mv venv ./venv # shellcheck source=/dev/null -. /venv/bin/activate +. ./venv/bin/activate coverage run -m unittest coverage report -coverage xml \ No newline at end of file +coverage xml