Use TMPDIR for CI jobs

This commit is contained in:
Cédric Krier
2024-12-17 16:00:31 +01:00
parent f1161d2aba
commit 430a359eed
2 changed files with 12 additions and 9 deletions
+11 -8
View File
@@ -12,6 +12,9 @@ stages:
- test
- build
variables:
TMPDIR: /tmp
packages:
stage: preparation
rules:
@@ -161,8 +164,8 @@ check-eslint:
check-ci-modules:
extends: .check
script:
- python .gitlab-scripts/generate-ci.py $TMPDIR/gitab-ci-modules.yml
- cmp .gitlab-ci-modules.yml $TMPDIR/gitab-ci-modules.yml
- python .gitlab-scripts/generate-ci.py "${TMPDIR}/gitab-ci-modules.yml"
- cmp .gitlab-ci-modules.yml "${TMPDIR}/gitab-ci-modules.yml"
check-cookiecutter-module:
extends: .check
@@ -174,9 +177,9 @@ check-cookiecutter-module:
before_script:
- pip install cookiecutter
script:
- cookiecutter --no-input cookiecutter-module -o /tmp
- flake8 /tmp/my_module
- isort --multi-line VERTICAL_GRID --check --diff /tmp/my_module
- cookiecutter --no-input cookiecutter-module -o "${TMPDIR}"
- flake8 "${TMPDIR}/my_module"
- isort --multi-line VERTICAL_GRID --check --diff "${TMPDIR}/my_module"
rules:
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
changes:
@@ -254,7 +257,7 @@ check-account-chart:
.test-db:
extends: .test-tox
variables:
DB_CACHE: /tmp/cache
DB_CACHE: "${TMPDIR}/cache"
script:
- tox -e "py${PYTHON_VERSION/./}-${DATABASE}" -c "${PACKAGE}" -- -v --output-file junit.xml
@@ -403,8 +406,8 @@ test-demo:
- pip install packages/trytond* packages/proteus*
script:
- touch /tmp/demo.sqlite
- echo "admin" > /tmp/password
- TRYTONPASSFILE=/tmp/password trytond-admin --database demo --all --email admin@example.com
- echo "admin" > "${TMPDIR}/password"
- TRYTONPASSFILE="${TMPDIR}/password" trytond-admin --database demo --all --email admin@example.com
- python -m demo --database demo
rules:
- changes:
+1 -1
View File
@@ -7,7 +7,7 @@ mkdir -p "${OUTPUTDIR}"
: ${MAX_PROCS:=$(( `nproc` * 2 ))}
export DOC_BASE_URL
requirements=$(mktemp /tmp/requirements-doc-XXXXXXXXXX.txt)
requirements=$(mktemp "${TMPDIR}/requirements-doc-XXXXXXXXXX.txt")
find . -name 'cookiecutter*' -prune -o -path '*/doc/requirements-doc.txt' -exec cat {} + | sort | uniq > "${requirements}"
pip install setuptools
pip install -r "${requirements}"