Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2017-11-17 19:24:40 +0300
committerEric Eastwood <contact@ericeastwood.com>2017-11-28 21:42:08 +0300
commita4a389a0a7314d011275592474bd974924f86735 (patch)
tree3469be680f8e0cf5931cb54fa784a86389e43d0f /app/helpers
parenta7f6ab952acc58e7ef9a33fba3fbaaa0918572fe (diff)
BE for automatic pipeline when enabling Auto DevOps
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/38962
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/auto_devops_helper.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/helpers/auto_devops_helper.rb b/app/helpers/auto_devops_helper.rb
index 483b957decb..069c29feb80 100644
--- a/app/helpers/auto_devops_helper.rb
+++ b/app/helpers/auto_devops_helper.rb
@@ -8,6 +8,22 @@ module AutoDevopsHelper
!project.ci_service
end
+ def show_run_auto_devops_pipeline_checkbox_for_instance_setting?(project)
+ return false if project.repository.gitlab_ci_yml
+
+ if project&.auto_devops&.enabled.present?
+ !project.auto_devops.enabled && current_application_settings.auto_devops_enabled?
+ else
+ current_application_settings.auto_devops_enabled?
+ end
+ end
+
+ def show_run_auto_devops_pipeline_checkbox_for_explicit_setting?(project)
+ return false if project.repository.gitlab_ci_yml
+
+ !project.auto_devops_enabled?
+ end
+
def auto_devops_warning_message(project)
missing_domain = !project.auto_devops&.has_domain?
missing_service = !project.kubernetes_service&.active?