Skip to content
Snippets Groups Projects
Commit 5639bdce authored by jurgenhaas's avatar jurgenhaas
Browse files

gitlab-ci-cd/drupal#28 Make it work in pipelines too

parent 8561633b
No related branches found
No related tags found
1 merge request!8Merging develop into main
/.ahoy.l3d
...@@ -71,14 +71,18 @@ if [[ "$host1" != "$host2" ]]; then ...@@ -71,14 +71,18 @@ if [[ "$host1" != "$host2" ]]; then
exit 4 exit 4
fi fi
echo "Find project ID from remote URL ..." if [[ -n ${CI_PROJECT_ID} ]]; then
# shellcheck disable=SC2001 PRJID=$CI_PROJECT_ID
path="$(echo "$path" | sed -e 's,\..*,,g')" else
gitlab 200 GET projects?search="$path" echo "Find project ID from remote URL ..."
PRJID=$(echo "$result" | jq -r .[0]."id") # shellcheck disable=SC2001
if [[ $(isNumeric "$PRJID") -eq 1 ]]; then path="$(echo "$path" | sed -e 's,\..*,,g')"
echo "Can not find project ID" gitlab 200 GET projects?search="$path"
exit 5 PRJID=$(echo "$result" | jq -r .[0]."id")
if [[ $(isNumeric "$PRJID") -eq 1 ]]; then
echo "Can not find project ID"
exit 5
fi
fi fi
echo "Create merge request ..." echo "Create merge request ..."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment