Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-03 00:07:38 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-03 00:07:38 +0300
commit9d54184f308893338967b18874dedebf38acf89e (patch)
tree100e32c6d4b34deac52d9e98a083361d89804b50 /scripts
parentd5b5f5e6e1474d5526add9033c9754b8e395841f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts')
-rw-r--r--scripts/sync-stable-branch.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/sync-stable-branch.sh b/scripts/sync-stable-branch.sh
index b44bf26a151..1eb416bf4f5 100644
--- a/scripts/sync-stable-branch.sh
+++ b/scripts/sync-stable-branch.sh
@@ -35,6 +35,22 @@ then
exit 1
fi
+if [[ "$TARGET_PROJECT" != "gitlab-org/gitlab-foss" ]]
+then
+ echo 'This is a security FOSS merge train'
+ echo "Checking if $CI_COMMIT_SHA is available on canonical"
+
+ gitlab_com_commit_status=$(curl -s "https://gitlab.com/api/v4/projects/278964/repository/commits/$CI_COMMIT_SHA" | jq -M .status)
+
+ if [[ "$gitlab_com_commit_status" != "null" ]]
+ then
+ echo 'Commit available on canonical, skipping merge train'
+ exit 0
+ fi
+
+ echo 'Commit not available, triggering a merge train'
+fi
+
curl -X POST \
-F token="$MERGE_TRAIN_TRIGGER_TOKEN" \
-F ref=master \