diff options
Diffstat (limited to '.gitlab')
-rw-r--r-- | .gitlab/ci/cache-repo.gitlab-ci.yml | 2 | ||||
-rw-r--r-- | .gitlab/ci/frontend.gitlab-ci.yml | 2 | ||||
-rw-r--r-- | .gitlab/ci/rails.gitlab-ci.yml | 40 | ||||
-rw-r--r-- | .gitlab/ci/rules.gitlab-ci.yml | 70 | ||||
-rw-r--r-- | .gitlab/issue_templates/Experiment Successful Cleanup.md | 1 | ||||
-rw-r--r-- | .gitlab/issue_templates/experiment_tracking_template.md | 1 |
6 files changed, 59 insertions, 57 deletions
diff --git a/.gitlab/ci/cache-repo.gitlab-ci.yml b/.gitlab/ci/cache-repo.gitlab-ci.yml index 48724f7e65c..475cbca3156 100644 --- a/.gitlab/ci/cache-repo.gitlab-ci.yml +++ b/.gitlab/ci/cache-repo.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Builds a cached .tar.gz of the master branch with full history and +# Builds a cached .tar.gz of the $CI_DEFAULT_BRANCH branch with full history and # uploads it to Google Cloud Storage. This archive is downloaded by a # script defined by a CI/CD variable named CI_PRE_CLONE_SCRIPT. This has # two benefits: diff --git a/.gitlab/ci/frontend.gitlab-ci.yml b/.gitlab/ci/frontend.gitlab-ci.yml index 910a58bcd0e..e739b046ff7 100644 --- a/.gitlab/ci/frontend.gitlab-ci.yml +++ b/.gitlab/ci/frontend.gitlab-ci.yml @@ -246,7 +246,7 @@ coverage-frontend: extends: - .default-retry - .yarn-cache - - .frontend:rules:ee-mr-and-master-only + - .frontend:rules:ee-mr-and-default-branch-only needs: ["jest"] stage: post-test before_script: diff --git a/.gitlab/ci/rails.gitlab-ci.yml b/.gitlab/ci/rails.gitlab-ci.yml index f4ea6e3ae01..6b5c617dccc 100644 --- a/.gitlab/ci/rails.gitlab-ci.yml +++ b/.gitlab/ci/rails.gitlab-ci.yml @@ -142,7 +142,7 @@ ############################ ####################################################### -# EE/FOSS: default refs (MRs, master, schedules) jobs # +# EE/FOSS: default refs (MRs, default branch, schedules) jobs # setup-test-env: extends: - .rails-job-base @@ -347,7 +347,7 @@ db:migrate:reset: db:check-schema: extends: - .db-job-base - - .rails:rules:ee-mr-and-master-only + - .rails:rules:ee-mr-and-default-branch-only script: - source scripts/schema_changed.sh @@ -538,11 +538,11 @@ rspec:feature-flags: run_timed_command "bundle exec scripts/used-feature-flags"; fi -# EE/FOSS: default refs (MRs, master, schedules) jobs # +# EE/FOSS: default refs (MRs, default branch, schedules) jobs # ####################################################### ################################################## -# EE: default refs (MRs, master, schedules) jobs # +# EE: default refs (MRs, default branch, schedules) jobs # rspec migration pg11-as-if-foss: extends: - .rspec-base-pg11-as-if-foss @@ -685,81 +685,81 @@ db:rollback geo: script: - bundle exec rake geo:db:migrate VERSION=20170627195211 - bundle exec rake geo:db:migrate -# EE: default refs (MRs, master, schedules) jobs # +# EE: default refs (MRs, default branch, schedules) jobs # ################################################## ########################################## -# EE/FOSS: master nightly scheduled jobs # +# EE/FOSS: default branch nightly scheduled jobs # rspec migration pg12: extends: - .rspec-base-pg12 - .rspec-base-migration - - .rails:rules:master-schedule-nightly--code-backstage + - .rails:rules:default-branch-schedule-nightly--code-backstage - .rspec-migration-parallel rspec unit pg12: extends: - .rspec-base-pg12 - - .rails:rules:master-schedule-nightly--code-backstage + - .rails:rules:default-branch-schedule-nightly--code-backstage - .rspec-unit-parallel rspec integration pg12: extends: - .rspec-base-pg12 - - .rails:rules:master-schedule-nightly--code-backstage + - .rails:rules:default-branch-schedule-nightly--code-backstage - .rspec-integration-parallel rspec system pg12: extends: - .rspec-base-pg12 - - .rails:rules:master-schedule-nightly--code-backstage + - .rails:rules:default-branch-schedule-nightly--code-backstage - .rspec-system-parallel -# EE/FOSS: master nightly scheduled jobs # +# EE/FOSS: default branch nightly scheduled jobs # ########################################## ##################################### -# EE: master nightly scheduled jobs # +# EE: default branch nightly scheduled jobs # rspec-ee migration pg12: extends: - .rspec-ee-base-pg12 - .rspec-base-migration - - .rails:rules:master-schedule-nightly--code-backstage-ee-only + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only - .rspec-ee-migration-parallel rspec-ee unit pg12: extends: - .rspec-ee-base-pg12 - - .rails:rules:master-schedule-nightly--code-backstage-ee-only + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only - .rspec-ee-unit-parallel rspec-ee integration pg12: extends: - .rspec-ee-base-pg12 - - .rails:rules:master-schedule-nightly--code-backstage-ee-only + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only - .rspec-ee-integration-parallel rspec-ee system pg12: extends: - .rspec-ee-base-pg12 - - .rails:rules:master-schedule-nightly--code-backstage-ee-only + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only - .rspec-ee-system-parallel rspec-ee unit pg12 geo: extends: - .rspec-ee-base-geo-pg12 - - .rails:rules:master-schedule-nightly--code-backstage-ee-only + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only - .rspec-ee-unit-geo-parallel rspec-ee integration pg12 geo: extends: - .rspec-ee-base-geo-pg12 - - .rails:rules:master-schedule-nightly--code-backstage-ee-only + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only rspec-ee system pg12 geo: extends: - .rspec-ee-base-geo-pg12 - - .rails:rules:master-schedule-nightly--code-backstage-ee-only -# EE: master nightly scheduled jobs # + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only +# EE: default branch nightly scheduled jobs # ##################################### ################################################## diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml index 5464409254a..39522f7b60c 100644 --- a/.gitlab/ci/rules.gitlab-ci.yml +++ b/.gitlab/ci/rules.gitlab-ci.yml @@ -11,25 +11,25 @@ if: '$CI_PROJECT_NAME != "gitlab-foss" && $CI_PROJECT_NAME != "gitlab-ce" && $CI_PROJECT_NAME != "gitlabhq"' .if-default-refs: &if-default-refs - if: '$CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_REF_NAME == "main" || $CI_COMMIT_REF_NAME =~ /^[\d-]+-stable(-ee)?$/ || $CI_COMMIT_REF_NAME =~ /^\d+-\d+-auto-deploy-\d+$/ || $CI_COMMIT_REF_NAME =~ /^security\// || $CI_MERGE_REQUEST_IID || $CI_COMMIT_TAG || $FORCE_GITLAB_CI' + if: '$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH || $CI_COMMIT_REF_NAME =~ /^[\d-]+-stable(-ee)?$/ || $CI_COMMIT_REF_NAME =~ /^\d+-\d+-auto-deploy-\d+$/ || $CI_COMMIT_REF_NAME =~ /^security\// || $CI_MERGE_REQUEST_IID || $CI_COMMIT_TAG || $FORCE_GITLAB_CI' -.if-master-refs: &if-master-refs - if: '$CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_REF_NAME == "main"' +.if-default-branch-refs: &if-default-branch-refs + if: '$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH' -.if-master-push: &if-master-push - if: '($CI_COMMIT_BRANCH == "master" || $CI_COMMIT_REF_NAME == "main") && $CI_PIPELINE_SOURCE == "push"' +.if-default-branch-push: &if-default-branch-push + if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "push"' -.if-master-schedule-2-hourly: &if-master-schedule-2-hourly - if: '($CI_COMMIT_BRANCH == "master" || $CI_COMMIT_REF_NAME == "main") && $CI_PIPELINE_SOURCE == "schedule" && $FREQUENCY == "2-hourly"' +.if-default-branch-schedule-2-hourly: &if-default-branch-schedule-2-hourly + if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule" && $FREQUENCY == "2-hourly"' -.if-master-schedule-nightly: &if-master-schedule-nightly - if: '($CI_COMMIT_BRANCH == "master" || $CI_COMMIT_REF_NAME == "main") && $CI_PIPELINE_SOURCE == "schedule" && $FREQUENCY == "nightly"' +.if-default-branch-schedule-nightly: &if-default-branch-schedule-nightly + if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule" && $FREQUENCY == "nightly"' .if-auto-deploy-branches: &if-auto-deploy-branches if: '$CI_COMMIT_BRANCH =~ /^\d+-\d+-auto-deploy-\d+$/' -.if-master-or-tag: &if-master-or-tag - if: '$CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_REF_NAME == "main" || $CI_COMMIT_TAG' +.if-default-branch-or-tag: &if-default-branch-or-tag + if: '$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH || $CI_COMMIT_TAG' .if-merge-request: &if-merge-request if: '$CI_MERGE_REQUEST_IID' @@ -52,8 +52,8 @@ .if-dot-com-gitlab-org-schedule: &if-dot-com-gitlab-org-schedule if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org" && $CI_PIPELINE_SOURCE == "schedule"' -.if-dot-com-gitlab-org-master: &if-dot-com-gitlab-org-master - if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org" && ($CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_REF_NAME == "main")' +.if-dot-com-gitlab-org-default-branch: &if-dot-com-gitlab-org-default-branch + if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH' .if-dot-com-gitlab-org-merge-request: &if-dot-com-gitlab-org-merge-request if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org" && $CI_MERGE_REQUEST_IID' @@ -293,7 +293,7 @@ ################ .shared:rules:update-cache: rules: - - <<: *if-master-schedule-2-hourly + - <<: *if-default-branch-schedule-2-hourly - <<: *if-security-schedule - <<: *if-merge-request-title-update-caches @@ -435,26 +435,26 @@ - <<: *if-merge-request changes: *frontend-patterns -.frontend:rules:ee-mr-and-master-only: +.frontend:rules:ee-mr-and-default-branch-only: rules: - <<: *if-not-ee when: never - <<: *if-merge-request changes: *code-backstage-patterns when: always - - <<: *if-master-refs + - <<: *if-default-branch-refs changes: *code-backstage-patterns .frontend:rules:qa-frontend-node: rules: - - <<: *if-master-refs + - <<: *if-default-branch-refs changes: *frontend-dependency-patterns - <<: *if-merge-request changes: *frontend-dependency-patterns .frontend:rules:qa-frontend-node-latest: rules: - - <<: *if-master-refs + - <<: *if-default-branch-refs changes: *frontend-dependency-patterns allow_failure: true - <<: *if-merge-request @@ -465,7 +465,7 @@ rules: - <<: *if-not-canonical-namespace when: never - - if: '$DANGER_GITLAB_API_TOKEN && $CI_MERGE_REQUEST_IID && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main")' + - if: '$DANGER_GITLAB_API_TOKEN && $CI_MERGE_REQUEST_IID && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH' changes: *frontend-patterns allow_failure: true @@ -485,7 +485,7 @@ rules: - <<: *if-not-ee when: never - - <<: *if-master-schedule-2-hourly + - <<: *if-default-branch-schedule-2-hourly ############ # QA rules # @@ -825,14 +825,14 @@ - changes: *db-library-patterns - <<: *if-merge-request-title-run-all-rspec -.rails:rules:ee-mr-and-master-only: +.rails:rules:ee-mr-and-default-branch-only: rules: - <<: *if-not-ee when: never - <<: *if-merge-request-title-run-all-rspec - <<: *if-merge-request changes: *code-backstage-patterns - - <<: *if-master-refs + - <<: *if-default-branch-refs changes: *code-backstage-patterns .rails:rules:detect-tests: @@ -888,7 +888,7 @@ rules: - <<: *if-not-ee when: never - - <<: *if-master-schedule-nightly + - <<: *if-default-branch-schedule-nightly - <<: *if-merge-request-title-run-all-rspec .rails:rules:rspec-coverage: @@ -898,7 +898,7 @@ - <<: *if-merge-request changes: *code-backstage-patterns when: always - - <<: *if-master-schedule-2-hourly + - <<: *if-default-branch-schedule-2-hourly - <<: *if-merge-request-title-run-all-rspec when: always @@ -906,21 +906,21 @@ rules: - <<: *if-not-ee when: never - - <<: *if-master-schedule-2-hourly + - <<: *if-default-branch-schedule-2-hourly allow_failure: true - <<: *if-merge-request-title-run-all-rspec -.rails:rules:master-schedule-nightly--code-backstage: +.rails:rules:default-branch-schedule-nightly--code-backstage: rules: - - <<: *if-master-schedule-nightly + - <<: *if-default-branch-schedule-nightly - <<: *if-merge-request changes: [".gitlab/ci/rails.gitlab-ci.yml"] -.rails:rules:master-schedule-nightly--code-backstage-ee-only: +.rails:rules:default-branch-schedule-nightly--code-backstage-ee-only: rules: - <<: *if-not-ee when: never - - <<: *if-master-schedule-nightly + - <<: *if-default-branch-schedule-nightly - <<: *if-merge-request changes: [".gitlab/ci/rails.gitlab-ci.yml"] @@ -946,7 +946,7 @@ rules: - if: '$CODE_QUALITY_DISABLED' when: never - # - <<: *if-master-refs # To be done in a later iteration: https://gitlab.com/gitlab-org/gitlab/issues/31160#note_278188255 + # - <<: *if-default-branch-refs # To be done in a later iteration: https://gitlab.com/gitlab-org/gitlab/issues/31160#note_278188255 - <<: *if-default-refs changes: *code-backstage-patterns allow_failure: true @@ -955,7 +955,7 @@ rules: - if: '$SAST_DISABLED || $GITLAB_FEATURES !~ /\bsast\b/' when: never - # - <<: *if-master-refs # To be done in a later iteration: https://gitlab.com/gitlab-org/gitlab/issues/31160#note_278188255 + # - <<: *if-default-branch-refs # To be done in a later iteration: https://gitlab.com/gitlab-org/gitlab/issues/31160#note_278188255 - <<: *if-default-refs changes: *code-backstage-qa-patterns allow_failure: true @@ -964,7 +964,7 @@ rules: - if: '$DEPENDENCY_SCANNING_DISABLED || $GITLAB_FEATURES !~ /\bdependency_scanning\b/' when: never - # - <<: *if-master-refs # To be done in a later iteration: https://gitlab.com/gitlab-org/gitlab/issues/31160#note_278188255 + # - <<: *if-default-branch-refs # To be done in a later iteration: https://gitlab.com/gitlab-org/gitlab/issues/31160#note_278188255 - <<: *if-default-refs changes: *code-backstage-qa-patterns allow_failure: true @@ -985,7 +985,7 @@ rules: - if: '$DAST_DISABLED || $GITLAB_FEATURES !~ /\bdast\b/' when: never - - <<: *if-master-schedule-nightly + - <<: *if-default-branch-schedule-nightly allow_failure: true .reports:rules:license_scanning: @@ -1119,13 +1119,13 @@ rules: - <<: *if-not-canonical-namespace when: never - - <<: *if-master-or-tag + - <<: *if-default-branch-or-tag changes: *code-backstage-qa-patterns when: on_success .setup:rules:dont-interrupt-me: rules: - - <<: *if-master-or-tag + - <<: *if-default-branch-or-tag allow_failure: true - <<: *if-auto-deploy-branches allow_failure: true diff --git a/.gitlab/issue_templates/Experiment Successful Cleanup.md b/.gitlab/issue_templates/Experiment Successful Cleanup.md index afe4793cdfc..42f26342342 100644 --- a/.gitlab/issue_templates/Experiment Successful Cleanup.md +++ b/.gitlab/issue_templates/Experiment Successful Cleanup.md @@ -15,5 +15,6 @@ The changes need to become an official part of the product. - [ ] Optional: Migrate experiment to a default enabled [feature flag](https://docs.gitlab.com/ee/development/feature_flags) for one milestone and add a changelog. Converting to a feature flag can be skipped at the ICs discretion if risk is deemed low with consideration to both SaaS and (if applicable) self managed - [ ] In the next milestone, [remove the feature flag](https://docs.gitlab.com/ee/development/feature_flags/controls.html#cleaning-up) if applicable - [ ] After the flag removal is deployed, [clean up the feature/experiment feature flags](https://docs.gitlab.com/ee/development/feature_flags/controls.html#cleaning-up) by running chatops command in `#production` channel +- [ ] Ensure the corresponding [Experiment Tracking](https://gitlab.com/groups/gitlab-org/-/boards/1352542?label_name[]=devops%3A%3Agrowth&label_name[]=growth%20experiment&label_name[]=experiment%20tracking) issue is updated /label ~"feature" ~"feature::maintenance" ~"workflow::scheduling" ~"growth experiment" ~"feature flag" diff --git a/.gitlab/issue_templates/experiment_tracking_template.md b/.gitlab/issue_templates/experiment_tracking_template.md index 432ae57e594..6d05932b3d6 100644 --- a/.gitlab/issue_templates/experiment_tracking_template.md +++ b/.gitlab/issue_templates/experiment_tracking_template.md @@ -81,6 +81,7 @@ If applicable, any groups/projects that are happy to have this feature turned on - [ ] Announce on the issue that the flag has been enabled - [ ] Remove experiment code and feature flag and add changelog entry - a separate [cleanup issue](https://gitlab.com/gitlab-org/gitlab/-/issues/new?issuable_template=Experiment%20Successful%20Cleanup) might be required - [ ] After the flag removal is deployed, [clean up the feature flag](https://docs.gitlab.com/ee/development/feature_flags/controls.html#cleaning-up) by running chatops command in `#production` channel +- [ ] Assign to the product manager to update the [knowledge base](https://about.gitlab.com/direction/growth/#growth-insights-knowledge-base) (if applicable) ## Rollback Steps |