Learn more about these different git repos.
Other Git URLs
In order to make the shell execution use case (very common) as short as possible I propose to make shell the default for the execute step. In this way the minimal config for executing a shell command could look like this:
shell
execute
/test/build/smoke: execute: commands: - /usr/bin/binary --help
I would not recommend to removing commands attribute as well. It is possible that in the future we would want to provide multiple implementations under a single step which could be done as a list.
commands
@pss Not sure if we should not call it script:, seems to be used more widely elsewhere:
script:
https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#script https://docs.gitlab.com/ee/ci/yaml/#script https://docs.travis-ci.com/user/customizing-the-build/
And accept a string or list as gitlab ci does ....
So you propose to use script instead of commands, right? The following would be acceptable variants of the syntax:
script
/test/build/smoke: execute: how: shell script: - first command - second command - third command
Single command would be supported directly as well:
/test/build/smoke: execute: how: shell script: single command
And finally the how keyword could be omitted:
how
/test/build/smoke: execute: script: single command
Does that look ok?
LGTM. Would this be acceptable as well? (I think it should...)
/test/build/smoke: execute: how: shell script: | # this is a multi-line script - executor would save it into a script & execute. /bin/true ls -al / exit $?
I like that one as well.
Specification update describing shell as the default execute implementation ready for review. @mvadkert, @happz, please have a look at #23. Thanks.
Metadata Update from @psss: - Issue assigned to psss
Pull request merged.
Metadata Update from @psss: - Issue status updated to: Closed (was: Open)
Login to comment on this ticket.