diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index a38c63e9e91d0a4c6a677fdd009eeb0fc242b287..dd6fbfbd01bc66c327a10971e1a078a6beada739 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -331,7 +331,7 @@ module Ci @ci_yaml_file = begin project.repository.gitlab_ci_yml_for(sha) - rescue Rugged::ReferenceError, GRPC::NotFound + rescue Rugged::ReferenceError, GRPC::NotFound, GRPC::Internal self.yaml_errors = "Failed to load CI/CD config file at #{project.ci_config_file_for_pipeline}" nil diff --git a/app/services/ci/create_pipeline_service.rb b/app/services/ci/create_pipeline_service.rb index 4f35255fb53df8b910b93b2619edaa7e61a5b759..b95c26560ae449643b14eaf7fece59d61a97ea3b 100644 --- a/app/services/ci/create_pipeline_service.rb +++ b/app/services/ci/create_pipeline_service.rb @@ -33,7 +33,7 @@ module Ci unless pipeline.config_processor unless pipeline.ci_yaml_file - return error("Missing #{pipeline.ci_yaml_file_path} file") + return error("Missing #{project.ci_config_file_for_pipeline} file") end return error(pipeline.yaml_errors, save: save_on_errors) end diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb index e5fd549f0d76573bcd348d2e33c5815cba71069f..1553d6d3a9a404be3bd49fb6658a243a1de6137e 100644 --- a/spec/models/ci/build_spec.rb +++ b/spec/models/ci/build_spec.rb @@ -1179,7 +1179,7 @@ describe Ci::Build, :models do { key: 'CI_PROJECT_NAMESPACE', value: project.namespace.full_path, public: true }, { key: 'CI_PROJECT_URL', value: project.web_url, public: true }, { key: 'CI_PIPELINE_ID', value: pipeline.id.to_s, public: true }, - { key: 'CI_CONFIG_PATH', value: pipeline.ci_yaml_file_path, public: true }, + { key: 'CI_CONFIG_PATH', value: project.ci_config_file_for_pipeline, public: true }, { key: 'CI_REGISTRY_USER', value: 'gitlab-ci-token', public: true }, { key: 'CI_REGISTRY_PASSWORD', value: build.token, public: false }, { key: 'CI_REPOSITORY_URL', value: build.repo_url, public: false }