diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-06-04 21:49:39 +0200 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-06-05 10:35:58 +0200 |
commit | b009a0084c67877ba6a808c4c8a81c568598d624 (patch) | |
tree | 047e4693e3f2ea4425e4a10ea07080c53196d61f /app/models/ci | |
parent | f12ee2a2f490e6d126ac6345a5ad7cbf12833791 (diff) | |
download | gitlab-ce-b009a0084c67877ba6a808c4c8a81c568598d624.tar.gz |
Remove PagesService and instead make it explicit that we call PagesWorkeroptimise-pages-service-calling
Diffstat (limited to 'app/models/ci')
-rw-r--r-- | app/models/ci/build.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index 7cf4dda178a..746464d0e21 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -144,6 +144,7 @@ module Ci after_transition any => [:success] do |build| build.run_after_commit do BuildSuccessWorker.perform_async(id) + PagesWorker.perform_async(:deploy, id) if build.pages_generator? end end @@ -183,6 +184,11 @@ module Ci pipeline.manual_actions.where.not(name: name) end + def pages_generator? + Gitlab.config.pages.enabled && + self.name == 'pages' + end + def playable? action? && (manual? || retryable?) end @@ -402,7 +408,6 @@ module Ci build_data = Gitlab::DataBuilder::Build.build(self) project.execute_hooks(build_data.dup, :job_hooks) project.execute_services(build_data.dup, :job_hooks) - PagesService.new(build_data).execute end def browsable_artifacts? |