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:
authorJustin Tobler <jtobler@gitlab.com>2024-01-19 00:44:38 +0300
committerGitLab <noreply@gitlab.com>2024-01-19 00:44:38 +0300
commit2a75f777ac74326d18edacaa7d8feb74a9d19d57 (patch)
tree0cc1930eb2c4dff267a6e41b91969cc39edebc72
parent92f15bbbd89062e4cb82c07769b97f453f20e18f (diff)
parent221d4028730adaa3ae54c5fe2199014d4df36648 (diff)
Merge branch 'jc/automate-rails-pipeline' into 'master'
.gitlab-ci.yml: start rails spec and cleanup automatically See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6618 Merged-by: Justin Tobler <jtobler@gitlab.com> Approved-by: Lin Jen-Shin <jen-shin@gitlab.com> Approved-by: Justin Tobler <jtobler@gitlab.com> Co-authored-by: John Cai <jcai@gitlab.com>
-rw-r--r--.gitlab-ci.yml13
1 files changed, 6 insertions, 7 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ef608ef89..3b4935523 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -504,7 +504,8 @@ start-rails-specs:
name: merge-requests/$RAILS_BRANCH_FOR_JOB
on_stop: rails-specs-cleanup
rules:
- - when: manual
+ - if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_EVENT_TYPE != "merge_train"
+ when: manual
allow_failure: true
rails-specs:
@@ -523,8 +524,7 @@ rails-specs:
ENABLE_RSPEC_INTEGRATION: "true"
ENABLE_RSPEC_SYSTEM: "true"
rules:
- - when: manual
- allow_failure: true
+ - if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_EVENT_TYPE != "merge_train"
rails-specs-cleanup:
stage: qa
@@ -537,8 +537,8 @@ rails-specs-cleanup:
name: merge-requests/$RAILS_BRANCH_FOR_JOB
action: stop
rules:
- - when: manual
- allow_failure: true
+ - if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_EVENT_TYPE != "merge_train"
+ when: manual
cleanup-rails-spec-test-env:
needs: ["rails-specs-cleanup"]
@@ -551,8 +551,7 @@ cleanup-rails-spec-test-env:
ENV_ID=$(curl -s --request GET --header "PRIVATE-TOKEN: $GITALY_PROJECT_TOKEN" "https://gitlab.com/api/v4/projects/2009901/environments" --data-urlencode "name=merge-requests/$RAILS_BRANCH_FOR_JOB" | jq '.[0].id')
curl --fail -s --request DELETE --header "PRIVATE-TOKEN: $GITALY_PROJECT_TOKEN" "https://gitlab.com/api/v4/projects/2009901/environments/$ENV_ID"
rules:
- - when: manual
- allow_failure: true
+ - if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_EVENT_TYPE != "merge_train"
build-package-and-qa:
needs: []