From c5224d8abc28b801947c212e63c382e179eebca9 Mon Sep 17 00:00:00 2001 From: Gabriel Ferreira Date: Fri, 22 Dec 2023 14:43:12 +0100 Subject: [PATCH] docs: add note regarding CI_DEFAULT_BRANCH settings of gitlab-ci-local --- doc/manual/source/working-with-gitlab-ci-local.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/manual/source/working-with-gitlab-ci-local.rst b/doc/manual/source/working-with-gitlab-ci-local.rst index 6dec6a81b..7a4b30b2a 100644 --- a/doc/manual/source/working-with-gitlab-ci-local.rst +++ b/doc/manual/source/working-with-gitlab-ci-local.rst @@ -167,3 +167,15 @@ Artifacts built by the CI jobs will be stored in separate subfolders based on the job name. ``~/ns-3-dev/.gitlab-ci-local/artifacts/jobname`` + +Note: some jobs may access the ``CI_DEFAULT_BRANCH`` environment variable, +which is set by default to ``main`` instead of ``master``. To change that, we need +to create a file ``~/.gitlab-ci-local/variables.yml`` containing the following: + +.. sourcecode:: YAML + + global: + CI_DEFAULT_BRANCH: "master" + +In case you are using Docker with root, you need to create this file in +``/root/.gitlab-ci-local/variables.yml``.