From 37c3369d5567369f394c87c15de9bb0634309f08 Mon Sep 17 00:00:00 2001 From: bmorcos Date: Tue, 28 Apr 2020 12:23:46 -0400 Subject: [PATCH] Export travis job number - This is used in the remote docs script to preventi failed builds from pushing docs. - Also added exe wrapper to the scp failed_file command --- .templates/remote-script.sh.template | 3 ++- CHANGES.rst | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.templates/remote-script.sh.template b/.templates/remote-script.sh.template index 07ce218a..defc1111 100644 --- a/.templates/remote-script.sh.template +++ b/.templates/remote-script.sh.template @@ -20,6 +20,7 @@ {% block remote_script %} {{ super() }} + export TRAVIS_JOB_NUMBER="$TRAVIS_JOB_NUMBER" export TRAVIS_BRANCH="$TRAVIS_BRANCH" export TRAVIS_TAG="$TRAVIS_TAG" export TEST_ARGS="$TEST_ARGS" @@ -30,7 +31,7 @@ {% block after_script %} {% if remote_script == "docs" %} REMOTE_FAILED_FILE="tmp/nengo-fpga-$TRAVIS_JOB_NUMBER/{{ pkg }}/$TRAVIS_JOB_NUMBER.failed" - ssh -q {{ host }} [[ -e "$REMOTE_FAILED_FILE" ]] && scp {{ host }}:"$REMOTE_FAILED_FILE" . + ssh -q {{ host }} [[ -e "$REMOTE_FAILED_FILE" ]] && exe scp {{ host }}:"$REMOTE_FAILED_FILE" . exe rsync -azh "{{ host }}:./tmp/{{ pkg }}-$TRAVIS_JOB_NUMBER/{{ pkg }}-docs" .. {% endif %} exe bash .ci/{{ remote_script }}.sh after_script diff --git a/CHANGES.rst b/CHANGES.rst index b13ed66c..2b3df186 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -59,6 +59,8 @@ Release History (`#45 `__) - Start using intersphinx, rename docs using '-'. (`#48 `__) +- Add TRAVIS_JOB_NUMBER to exported variables in remote-docs.sh. + (`#63 `__) 0.2.1 (September 17, 2019)