Skip to content
Snippets Groups Projects
Commit 2e9ed902 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[gitlab-ci] Do the cleanup in before_script

This separates more cleanly the goal of each part. At the same
time the prefix path file can be kept in the sources rather than
being in /tmp that could be altered during a run.
parent eac7edb7
No related branches found
No related tags found
2 merge requests!2551.4.x,!238Upgrade to django 1.11
...@@ -3,7 +3,7 @@ stages: ...@@ -3,7 +3,7 @@ stages:
variables: variables:
PREFIX: /opt/beat.env.web/usr PREFIX: /opt/beat.env.web/usr
TEST_PREFIX_PATH_FILE: '/tmp/test_prefix_$CI_JOB_ID.txt' TEST_PREFIX_PATH_FILE: 'test_prefix_$CI_JOB_ID.txt'
build: build:
stage: build stage: build
...@@ -12,10 +12,10 @@ build: ...@@ -12,10 +12,10 @@ build:
before_script: before_script:
- ${PREFIX}/bin/python --version - ${PREFIX}/bin/python --version
- docker info - docker info
- git clean -ffdx
- export BEAT_TEST_PREFIX=`mktemp -d --tmpdir=/var/tmp beat_test_prefix.XXXXXXXXX` - export BEAT_TEST_PREFIX=`mktemp -d --tmpdir=/var/tmp beat_test_prefix.XXXXXXXXX`
- echo $BEAT_TEST_PREFIX > $TEST_PREFIX_PATH_FILE - echo $BEAT_TEST_PREFIX > $TEST_PREFIX_PATH_FILE
script: script:
- git clean -ffdx
- ${PREFIX}/bin/python bootstrap-buildout.py - ${PREFIX}/bin/python bootstrap-buildout.py
- ./bin/buildout - ./bin/buildout
- export COVERAGE_FILE=.coverage.django - export COVERAGE_FILE=.coverage.django
......
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