diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-19 18:09:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-19 18:09:09 +0300 |
commit | c7e385e282bcb8505589bce526e692b7bb819ffa (patch) | |
tree | 3e64affe1c2eebdcaa18cc6319b603f44b03b07e /lib/tasks | |
parent | cd3e2c7b9355f8990ab294b34b5e4add4f3985fa (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/gitlab/graphql.rake | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/tasks/gitlab/graphql.rake b/lib/tasks/gitlab/graphql.rake index c73691f3d45..568761edb33 100644 --- a/lib/tasks/gitlab/graphql.rake +++ b/lib/tasks/gitlab/graphql.rake @@ -8,13 +8,24 @@ namespace :gitlab do OUTPUT_DIR = Rails.root.join("doc/api/graphql/reference") TEMPLATES_DIR = 'lib/gitlab/graphql/docs/templates/' + # Consider all feature flags disabled + # to avoid pipeline failures in case developer + # dumps schema with flags enabled locally before pushing + task disable_feature_flags: :environment do + class Feature + def self.enabled?(*args) + false + end + end + end + # Defines tasks for dumping the GraphQL schema: # - gitlab:graphql:schema:dump # - gitlab:graphql:schema:idl # - gitlab:graphql:schema:json GraphQL::RakeTask.new( schema_name: 'GitlabSchema', - dependencies: [:environment], + dependencies: [:environment, :disable_feature_flags], directory: OUTPUT_DIR, idl_outfile: "gitlab_schema.graphql", json_outfile: "gitlab_schema.json" |