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

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Cai <jcai@gitlab.com>2023-07-11 03:54:28 +0300
committerJohn Cai <jcai@gitlab.com>2023-07-11 03:54:28 +0300
commitab5d534057f73d43a8539406f5923e9314e9c982 (patch)
tree27734a9ad57b40db1eebe465e27b44e9ce823572
parentb5065d5e104d2625113b11b20852ebffd7096326 (diff)
parent9b1ef44c4f46e7e79658bb0bac0d65bee40ad45a (diff)
Merge branch 'jc/add-rails-pipeline' into 'master'
.gitlab-ci.yml: Add rails job See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5937 Merged-by: John Cai <jcai@gitlab.com> Approved-by: John McDonnell <jmcdonnell@gitlab.com> Approved-by: Will Chandler <wchandler@gitlab.com> Reviewed-by: Will Chandler <wchandler@gitlab.com> Reviewed-by: Lin Jen-Shin <jen-shin@gitlab.com> Reviewed-by: Nao Hashizume <nhashizume@gitlab.com>
-rw-r--r--.gitlab-ci.yml40
1 files changed, 40 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 02d6550dd..80af9ef9a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -39,6 +39,7 @@ variables:
# chosen as a semi-random value so as to not interfer with any preexisting
# users.
TEST_UID: 9999
+ RAILS_BRANCH_FOR_MERGE_REQUEST: "gitaly-merge-requests-$CI_MERGE_REQUEST_IID"
include:
- template: Security/License-Scanning.gitlab-ci.yml
@@ -514,6 +515,45 @@ pages:
rules:
- *rules_run_on_merge
+start-rails-specs:
+ needs: []
+ stage: qa
+ script:
+ - |
+ curl --request POST --header "PRIVATE-TOKEN: $GITLAB_PROJECT_TOKEN" \
+ "https://gitlab.com/api/v4/projects/278964/repository/branches?branch=$RAILS_BRANCH_FOR_MERGE_REQUEST&ref=master"
+ - |
+ curl --request PUT --header "PRIVATE-TOKEN: $GITLAB_PROJECT_TOKEN" \
+ --data "branch=$RAILS_BRANCH_FOR_MERGE_REQUEST" \
+ --data "content=$CI_MERGE_REQUEST_SOURCE_BRANCH_SHA" \
+ --data "commit_message=Updating GITALY_SERVER_VERSION to $CI_MERGE_REQUEST_SOURCE_BRANCH_SHA" \
+ https://gitlab.com/api/v4/projects/278964/repository/files/GITALY_SERVER_VERSION
+ rules:
+ - *rules_run_on_merge
+
+rails-specs:
+ needs: ["start-rails-specs"]
+ stage: qa
+ trigger:
+ project: gitlab-org/gitlab
+ branch: "gitaly-merge-requests-$CI_MERGE_REQUEST_IID"
+ strategy: depend
+ variables:
+ GITALY_TEST: "true"
+ FORCE_GITLAB_CI: "true"
+ rules:
+ - allow_failure: true
+
+rails-specs-cleanup:
+ stage: qa
+ needs: ["rails-specs"]
+ script:
+ - |
+ curl --request DELETE --header "PRIVATE-TOKEN: $GITLAB_PROJECT_TOKEN" \
+ "https://gitlab.com/api/v4/projects/278964/repository/branches/$RAILS_BRANCH_FOR_MERGE_REQUEST"
+ rules:
+ - allow_failure: true
+
build-package-and-qa:
needs: []
stage: qa