Files
openairinterface5g/ci-scripts/scripts/create_workspace.sh
Jaroslava Fiedlerova 84299bcd27 CI: replace CreateTag and merge-based workspace logic with explicit branch/repo
Remove CreateTag() and the merge/targetBranch parameters from
CreateWorkspace, passing the final branch name and repository directly
from Jenkins instead. Jenkinsfile computes testBranch and testRepository
(with INTERNAL_REPO as default). create_workspace.sh now does a simple
shallow clone by branch name.

Introduce two optional Jenkins parameters that allow overriding the
default branch reference and git repository URL used across the CI
pipeline.
- customBranch: when set, replaces the entire computed
  {sourceBranch}-{commitID}
- customRepository: when set, replaces INTERNAL_REPO as the git remote
  used by Create_Workspace to clone the source code onto the test node.

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-21 16:46:12 +02:00

22 lines
303 B
Bash
Executable File

#!/bin/bash
# SPDX-License-Identifier: MIT
function die() {
echo $@
exit 1
}
[ $# -eq 3 ] || die "usage: $0 <directory> <repository> <branch>"
set -ex
dir=$1
repo=$2
branch=$3
rm -rf ${dir}
git clone --depth=1 --branch "${branch}" "${repo}" "${dir}"
cd ${dir}
mkdir -p cmake_targets/log
exit 0