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:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-08-29 00:10:41 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-08-29 00:10:41 +0300
commit9a4a8e6be70657c1a30b0c602ea2ba58576257fe (patch)
tree6a276e9b1171830765fec54bdd064849da484b2e /app/controllers
parent672c5fcf46b385257ce01c2f773a65aa3578175d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects/environments_controller.rb6
-rw-r--r--app/controllers/projects/jobs_controller.rb8
2 files changed, 8 insertions, 6 deletions
diff --git a/app/controllers/projects/environments_controller.rb b/app/controllers/projects/environments_controller.rb
index e1e0bb83b40..f17b70cf62a 100644
--- a/app/controllers/projects/environments_controller.rb
+++ b/app/controllers/projects/environments_controller.rb
@@ -109,10 +109,8 @@ class Projects::EnvironmentsController < Projects::ApplicationController
job = stop_actions.first if stop_actions&.count == 1
action_or_env_url =
- if job.instance_of?(::Ci::Build)
- polymorphic_url([project, job])
- elsif job.instance_of?(::Ci::Bridge)
- project_pipeline_url(project, job.pipeline_id)
+ if job
+ project_job_url(project, job)
else
project_environment_url(project, @environment)
end
diff --git a/app/controllers/projects/jobs_controller.rb b/app/controllers/projects/jobs_controller.rb
index 4e0b304a2ee..cdce9f883f2 100644
--- a/app/controllers/projects/jobs_controller.rb
+++ b/app/controllers/projects/jobs_controller.rb
@@ -8,8 +8,8 @@ class Projects::JobsController < Projects::ApplicationController
urgency :low, [:index, :show, :trace, :retry, :play, :cancel, :unschedule, :erase, :raw]
- before_action :find_job_as_build, except: [:index, :play, :retry]
- before_action :find_job_as_processable, only: [:play, :retry]
+ before_action :find_job_as_build, except: [:index, :play, :retry, :show]
+ before_action :find_job_as_processable, only: [:play, :retry, :show]
before_action :authorize_read_build_trace!, only: [:trace, :raw]
before_action :authorize_read_build!
before_action :authorize_update_build!,
@@ -38,6 +38,10 @@ class Projects::JobsController < Projects::ApplicationController
end
def show
+ if @build.instance_of?(::Ci::Bridge)
+ redirect_to project_pipeline_path(@build.downstream_pipeline.project, @build.downstream_pipeline.id)
+ end
+
respond_to do |format|
format.html
format.json do