Starting jobs with manual parameters #9053
Replies: 3 comments 7 replies
|
This please! The ability to manually select certain parameters for the pipeline is a must for me and my team. The most basic form of options for us are something like a repository branch or an environment name (we have multiple development environments), allowing us to build and deploy feature branches whenever and wherever we want to. |
|
@taylorsilva starting a new thread for some concourse internals questions for you. I'm trying to put together a proof of concept PR based on the ideas you mentioned above, starting w/specifying vars at the job level in a pipeline config, like this: jobs:
- name: job
vars:
name: world
plan:
- task: simple-task
config:
platform: linux
image_resource:
type: registry-image
source: { repository: busybox }
run:
path: echo
args: ["Hello ((name))!"]I've added a "vars" option to the JSON config for a job: diff --git a/atc/job_config.go b/atc/job_config.go
index dc2ba2da0..4c118a110 100644
--- a/atc/job_config.go
+++ b/atc/job_config.go
@@ -5,6 +5,9 @@ type JobConfig struct {
OldName string `json:"old_name,omitempty"`
Public bool `json:"public,omitempty"`
+ // Vars to use to parameterize the job config.
+ Vars Params `json:"vars,omitempty"`
+
DisableManualTrigger bool `json:"disable_manual_trigger,omitempty"`
Serial bool `json:"serial,omitempty"`
Interruptible bool `json:"interruptible,omitempty"`And now I'm trying to decide on how to get those down to the actual task step so they can be templated. I had two main ideas:
I'm somewhat new to Go, so I hope these questions aren't too detached from reality. I'm hoping to better grasp Concourse internals to be able to build at least a proof of concept version of this feature myself, but I know I'm definitely still building my understanding here. I am sure I'm misunderstanding some of how this works already. |

Uh oh!
There was an error while loading. Please reload this page.
@taylorsilva suggested I post some ideas here we chatted briefly about regarding how Concourse fits together with manual workflows.
Background
I love Concourse, and I think it's fan-in fan-out functionality is really powerful, but resource types as a way to trigger jobs is primarily focused on use-cases that can be fully automated. Things like:
This fits well for CI/CD environments that have been fully automated, but interacting with these systems manually can be hard. In Concourse today, how would someone:
There are some existing approaches to solving these problems in Concourse, but they're not necessarily easy to use. Some examples:
version:1.2.2andenvironment:qaProposed solutions
So, what's the best way to solve this problem? Some ideas we discussed:
1. A manual "parameters" resource type
The idea here would be that the resource type would be integrated into the Concourse UI. In a pipeline view, a user could click on that resource, provide some information, and that information would immediately emit a new "version" of that resource type.
Coupling resource types so strongly to Concourse like this hasn't really been done, it's not clear how this would work architecturally.
2. Extending jobs themselves to accept a list of manual "parameters"
Jobs can already be "triggered" thru the UI/CLI/API (as described above) so we could extend that mechanism to support requiring additional parameters when triggering a job. This would probably be implemented by a new step type, maybe
askorprompt? This would also require allgetsteps within the job to have atriggerproperty to be set tofalse.I'm open to other ideas, what thoughts do y'all have?
All reactions