./gitlab/api calls auth for update-sample-applications
Description
Currently, during Release branching #v2024dev3 , the update-sample-applications
script failed with:
Running hooks in /etc/ca-certificates/update.d...
done.
$ git config --global user.name "Apertis CI"
$ git config --global user.email "devel@lists.apertis.org"
$ cd release-scripts
$ ./update-sample-applications
./gitlab/api: 3: .: cannot open /root/.gitlab-apertis-org-token: No such file
Cleaning up project directory and file based variables
00:00
Job succeeded
The above is failing because in trying to extract the list of repositories for the sample-applications
group, we make use of gitlab api calls, which need the auth to be configured proper.:
WORKDIR=$(pwd)
GROUPS=$(./gitlab/get-groups-repos sample-applications)
echo $GROUPS
for app in $GROUPS
do
cd $WORKDIR
[ -d $app ] && rm -rf $app
git clone https://oauth2:${BRANCHING_GITLAB_API_TOKEN}@${CI_SERVER_HOST}/sample-applications/$app
cd $app
if ! git show-ref --quiet "origin/apertis/${RELEASE}"
then
echo "$app: No origin/apertis/${RELEASE} branch found, skipping"
continue
fi
git branch apertis/${NEXT_RELEASE} origin/apertis/${RELEASE}
git checkout apertis/${NEXT_RELEASE}
if [ -f flatpak-recipe.yaml ]
then
sed -i "s/$RELEASE/$NEXT_RELEASE/" flatpak-recipe.yaml
git commit -s -m "Set release to $NEXT_RELEASE" flatpak-recipe.yaml
else
echo "$app: note: no flatpak-recipe.yaml to be branched"
fi
$run git push origin apertis/${NEXT_RELEASE}
done
Outcome
apertis-infrastructure!140 (merged)
Management data
This section is for management only, it should be the last one in the description.
Phabricator link: https://phabricator.apertis.org/T9903
Edited by Walter Lozano