84 lines
2.5 KiB
YAML
84 lines
2.5 KiB
YAML
# Make sure to update all the similar conditions in other CI config files if you modify these conditions
|
|
.if-canonical-gitlab-schedule: &if-canonical-gitlab-schedule
|
|
if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE =~ /^gitlab-org($|\/)/ && $CI_PIPELINE_SOURCE == "schedule"'
|
|
|
|
# Make sure to update all the similar conditions in other CI config files if you modify these conditions
|
|
.if-canonical-gitlab-merge-request: &if-canonical-gitlab-merge-request
|
|
if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE =~ /^gitlab-org($|\/)/ && $CI_MERGE_REQUEST_IID'
|
|
|
|
# Make sure to update all the similar patterns in other CI config files if you modify these patterns
|
|
.code-patterns: &code-patterns
|
|
- ".gitlab/ci/**/*"
|
|
- ".{eslintignore,gitattributes,nvmrc,prettierrc,stylelintrc,yamllint}"
|
|
- ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,scss-lint}.yml"
|
|
- ".csscomb.json"
|
|
- "Dockerfile.assets"
|
|
- "*_VERSION"
|
|
- "Gemfile{,.lock}"
|
|
- "Rakefile"
|
|
- "{babel.config,jest.config}.js"
|
|
- "config.ru"
|
|
- "{package.json,yarn.lock}"
|
|
- "{,ee/}{app,bin,config,db,haml_lint,lib,locale,public,scripts,symbol,vendor}/**/*"
|
|
- "doc/api/graphql/reference/*" # Files in this folder are auto-generated
|
|
|
|
# Make sure to update all the similar patterns in other CI config files if you modify these patterns
|
|
.qa-patterns: &qa-patterns
|
|
- ".dockerignore"
|
|
- "qa/**/*"
|
|
|
|
.qa-job-base:
|
|
extends:
|
|
- .default-tags
|
|
- .default-retry
|
|
- .default-only
|
|
- .only:changes-code-qa
|
|
stage: test
|
|
dependencies: []
|
|
cache:
|
|
key: "qa-framework-jobs:v1"
|
|
paths:
|
|
- vendor/ruby
|
|
before_script:
|
|
- cd qa/
|
|
- bundle install --clean --jobs=$(nproc) --path=vendor --retry=3 --quiet
|
|
- bundle check
|
|
|
|
qa:internal:
|
|
extends: .qa-job-base
|
|
script:
|
|
- bundle exec rspec
|
|
|
|
qa:selectors:
|
|
extends: .qa-job-base
|
|
script:
|
|
- bundle exec bin/qa Test::Sanity::Selectors
|
|
|
|
qa:selectors-foss:
|
|
extends:
|
|
- qa:selectors
|
|
- .only-ee-as-if-foss
|
|
|
|
.package-and-qa-base:
|
|
image: ruby:2.6-alpine
|
|
stage: qa
|
|
dependencies: []
|
|
retry: 0
|
|
script:
|
|
- source scripts/utils.sh
|
|
- install_gitlab_gem
|
|
- ./scripts/trigger-build omnibus
|
|
|
|
package-and-qa:
|
|
extends: .package-and-qa-base
|
|
rules:
|
|
- <<: *if-canonical-gitlab-merge-request
|
|
changes: *qa-patterns
|
|
when: on_success
|
|
- <<: *if-canonical-gitlab-merge-request
|
|
changes: *code-patterns
|
|
when: manual
|
|
- <<: *if-canonical-gitlab-schedule
|
|
when: on_success
|
|
needs: ["build-qa-image", "gitlab:assets:compile pull-cache"]
|
|
allow_failure: true
|