Skip to content
Snippets Groups Projects
Commit 5027d06d authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Fix regex for getting project ids

parent c68b681b
No related branches found
No related tags found
No related merge requests found
......@@ -6,14 +6,14 @@ NS_GITLAB_HOST=$(echo $GITLAB_HOST | cut -d'/' -f3)
echo "\n------ Getting all projects IDs --------"
# Get a list of projects in the group using GitLab API
PROJECT_IDS=$(curl --header "PRIVATE-TOKEN: $1" "$GITLAB_HOST/api/v4/groups/$SPECIFICATIONS_GROUP/projects" | grep -oP '"id":(?!$SPECIFICATIONS_GROUP)\d+' | cut -d':' -f2)
PROJECT_IDS=$(curl --header "PRIVATE-TOKEN: $1" "$GITLAB_HOST/api/v4/groups/$SPECIFICATIONS_GROUP/projects" | grep -oP '"id":(?!$'SPECIFICATIONS_GROUP')\d+' | cut -d':' -f2)
echo $PROJECT_IDS
PROJECT_IDS="41" # Use TS-0019 for debugging
# Trigger pipeline for each project. Triggered pipeline pages job will handle the upgrade of the index.html
for PROJECT_ID in $PROJECT_IDS; do
echo "------ Preparing specification project --------"
curl -X POST --fail -F token=$ACCESS_TOKEN "https://git.onem2m.org/api/v4/projects/$PROJECT_ID/trigger/pipeline"
curl -X POST --fail -F token=$1 https://git.onem2m.org/api/v4/projects/$PROJECT_ID/trigger/pipeline
done
exit 0
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment