build icon indicating copy to clipboard operation
build copied to clipboard

Inline scripts in build strategy steps

Open adambkaplan opened this issue 3 years ago • 4 comments

Feature Request

Build strategy steps should support inline scripts, along the lines of Tekton's script instruction for task steps [1]. Most build strategies run more complex behavior by invoking bash as the base command, with args that inline a script via a heredoc. Ex - the results step of our buildpacks strategy [2].

This should probably require a SHIP for full discussion.

[1] https://tekton.dev/docs/pipelines/tasks/#running-scripts-within-steps [2] https://github.com/shipwright-io/build/blob/main/samples/buildstrategy/kaniko/buildstrategy_kaniko_cr.yaml#L53-L64

adambkaplan avatar Jan 06 '22 22:01 adambkaplan

/kind feature

adambkaplan avatar Jan 06 '22 22:01 adambkaplan

Most notable is that Tekton's script does not support its variable substitution feature. There is a TEP in the works to add this capability: https://github.com/tektoncd/community/pull/596

adambkaplan avatar Jan 12 '22 14:01 adambkaplan

Adding this to the general backlog - this is something we could add as a feature in a v1 API.

adambkaplan avatar Jan 12 '22 14:01 adambkaplan

From Grooming: This might be a good candidate for v0.10.0. Having this just implies support for the script feature in TaskRuns and probably documenting this support in our strategies. This does not imply an override of existing strategies in favor of the spec.script. This requires a SHIP as it extend the strategy API.

Labelling this as a good-first-issue for both ends(writing down a SHIP + the implementation part).

qu1queee avatar Apr 20 '22 13:04 qu1queee