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
exit 4
fi
echo "Find project ID from remote URL ..."
# shellcheck disable=SC2001
path="$(echo "$path" | sed -e 's,\..*,,g')"
gitlab 200 GET projects?search="$path"
PRJID=$(echo "$result" | jq -r .[0]."id")
if [[ $(isNumeric "$PRJID") -eq 1 ]]; then
echo "Can not find project ID"
exit 5
if [[ -n ${CI_PROJECT_ID} ]]; then
PRJID=$CI_PROJECT_ID
else
echo "Find project ID from remote URL ..."
# shellcheck disable=SC2001
path="$(echo "$path" | sed -e 's,\..*,,g')"
gitlab 200 GET projects?search="$path"
PRJID=$(echo "$result" | jq -r .[0]."id")
if [[ $(isNumeric "$PRJID") -eq 1 ]]; then
echo "Can not find project ID"
exit 5
fi
fi
echo "Create merge request ..."
......
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