Skip to content
Snippets Groups Projects
Commit 63973c77 authored by jurgenhaas's avatar jurgenhaas
Browse files

gitlab-ci-cd/drupal#28 Improve project search and error handling

parent 6686d8e3
No related branches found
No related tags found
1 merge request!12Merging develop into main
......@@ -85,8 +85,12 @@ else
echo "Find project ID from remote URL ..."
# shellcheck disable=SC2001
path="$(echo "$path" | sed -e 's,\..*,,g')"
gitlab 200 GET projects?search="$path"
gitlab 200 GET "projects?search_namespaces=1&search=$path"
PRJID=$(echo "$result" | jq -r .[0]."id")
if [[ "a${PRJID}a" == "aa" ]]; then
echo "No project found"
exit 6
fi
if [[ $(isNumeric "$PRJID") -eq 1 ]]; then
echo "Can not find project ID"
exit 6
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment