From 8805c5554ff296a5cafa3d2d20d926f93cfa4155 Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Fri, 7 Jun 2024 12:07:30 +0200 Subject: [PATCH] Add support for BUILD_NUMBER (temporarily) Some old scripts still use BUILD_NUMBER instead of the newer BUILD_ID. The later is the preferred one in new scripts (no matter both still work). Once https://github.com/moodlehq/moodle-local_ci/issues/303 is fixed we'll revert this change, when we have everything working with BUILD_ID. --- runner/main/run.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/runner/main/run.sh b/runner/main/run.sh index b232c2c..90b110c 100755 --- a/runner/main/run.sh +++ b/runner/main/run.sh @@ -57,6 +57,10 @@ fi # BUILD_ID, if not defined use the current PID. BUILD_ID="${BUILD_ID:-$$}" +# Always make BUILD_NUMBER available, some old scripts use it. +# TODO: Remove this once https://github.com/moodlehq/moodle-local_ci/issues/303 is fixed. +BUILD_NUMBER="${BUILD_ID}" + # Base directory to be shared with some containers that will read/write information there (timing, environment, logs... etc.). SHAREDDIR="${WORKSPACE}"/"${BUILD_ID}"