diff options
author | Matija Čupić <matteeyah@gmail.com> | 2019-07-29 10:43:10 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-07-29 10:43:10 +0300 |
commit | a5aa40c5fe93dc3daba8a578f4c09c4e443fcbec (patch) | |
tree | 34eb74d209b1919f78ce70d89ee0900cd2602780 /app/controllers/projects/jobs_controller.rb | |
parent | 946f7c0687760ec49aca582a329d0ec3c7ac3037 (diff) |
Add Job specific variables
Adds Job specific variables to facilitate specifying variables when
running manual jobs.
Diffstat (limited to 'app/controllers/projects/jobs_controller.rb')
-rw-r--r-- | app/controllers/projects/jobs_controller.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/projects/jobs_controller.rb b/app/controllers/projects/jobs_controller.rb index 02ff6e872c9..adbc0159358 100644 --- a/app/controllers/projects/jobs_controller.rb +++ b/app/controllers/projects/jobs_controller.rb @@ -94,7 +94,7 @@ class Projects::JobsController < Projects::ApplicationController def play return respond_422 unless @build.playable? - build = @build.play(current_user) + build = @build.play(current_user, play_params[:job_variables_attributes]) redirect_to build_path(build) end @@ -190,6 +190,10 @@ class Projects::JobsController < Projects::ApplicationController { query: { 'response-content-type' => 'text/plain; charset=utf-8', 'response-content-disposition' => 'inline' } } end + def play_params + params.permit(job_variables_attributes: %i[key secret_value]) + end + def trace_artifact_file @trace_artifact_file ||= build.job_artifacts_trace&.file end |