On 23/08/2023 4:23 pm, Anthony PERARD wrote: > On failure of "build"-each-commit script, the next command that move > the log back into the build directory isn't executed. Fix that by > using "after_script" which is always executed even if the main > "script" fails. (We would still miss the log when the jobs times out.) > > Signed-off-by: Anthony PERARD <anthony.per...@citrix.com> > --- > automation/gitlab-ci/test.yaml | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml > index 810631bc46..5099f2e6b6 100644 > --- a/automation/gitlab-ci/test.yaml > +++ b/automation/gitlab-ci/test.yaml > @@ -140,6 +140,7 @@ build-each-commit-gcc: > CC: gcc > script: > - BASE=${BASE_SHA:-${CI_COMMIT_BEFORE_SHA}} > TIP=${TIP_SHA:-${CI_COMMIT_SHA}} ./automation/gitlab-ci/build-each-commit.sh > 2>&1 | tee ../build-each-commit-gcc.log > + after_script: > - mv ../build-each-commit-gcc.log . > artifacts: > paths:
Thanks for looking into this, and yeah that is dumb, but why play games with the parent directory? $ git diff diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml index 810631bc4624..b4c2f22a1b07 100644 --- a/automation/gitlab-ci/test.yaml +++ b/automation/gitlab-ci/test.yaml @@ -136,11 +136,11 @@ build-each-commit-gcc: extends: .test-jobs-common variables: CONTAINER: debian:stretch + LOGFILE: build-each-commit-gcc.log XEN_TARGET_ARCH: x86_64 CC: gcc script: - - BASE=${BASE_SHA:-${CI_COMMIT_BEFORE_SHA}} TIP=${TIP_SHA:-${CI_COMMIT_SHA}} ./automation/gitlab-ci/build-each-commit.sh 2>&1 | tee ../build-each-commit-gcc.log - - mv ../build-each-commit-gcc.log . + - BASE=${BASE_SHA:-${CI_COMMIT_BEFORE_SHA}} TIP=${TIP_SHA:-${CI_COMMIT_SHA}} ./automation/gitlab-ci/build-each-commit.sh 2>&1 | tee ${LOGFILE} artifacts: paths: - '*.log' This is prevailing style of the other tests, and also e.g. won't emit the (whole) log file if e.g. disk space fills up. ~Andrew