Switched to bridgehead user for git to avoid auth problems

This commit is contained in:
DavidCroftDKFZ 2024-07-17 09:24:37 +02:00
parent e0fe39ab83
commit c15c3962a7
1 changed files with 6 additions and 4 deletions

View File

@ -258,8 +258,8 @@ function clone_repo_if_nonexistent() {
cd "$target_dir"
# Checkout the specified branch
git checkout "$branch_name"
echo "Checked out branch '$branch_name'."
chown -R bridgehead .
su bridgehead -c "git checkout $branch_name"
cd -
}
@ -286,8 +286,9 @@ function build_transfair() {
# 2. There is no data lock file (which means that no ETL has yet been run).
if ls ../ecdc/data/*.[cC][sS][vV] 1> /dev/null 2>&1 && [ ! -f ../ecdc/data/lock ]; then
cd $base_dir/transfair
git pull
su bridgehead -c "git pull"
docker build --progress=plain -t samply/transfair --no-cache .
chown -R bridgehead .
cd -
fi
}
@ -296,8 +297,9 @@ function build_focus() {
local base_dir="$1"
cd $base_dir/focus
git pull
su bridgehead -c "git pull"
docker build --progress=plain -f DockerfileWithBuild -t samply/focus --no-cache .
chown -R bridgehead .
cd -
}