agola
agola copied to clipboard
Allow more then on runStep container
Currently agola can run command only in one container - the first one. Other containers are always treated as 'service container'. This is not comfortable even for clone operation - git binary may be absent in 'build' container.
This PR allow containers to have names and allow to specify container for runStep. First container and named containers are always treated as 'non-service'. If no container is specified for clone step then 'clone' container will be used. 'clone' container will default to alpine-git if unspecified.
Example:
tasks:
- name: build
runtime:
type: pod
containers:
- image: golang:latest
name: golang
- image: node:latest
name: node
steps:
- clone
- run:
name: build frontend
command: npm install && npm run build
container: node
- run:
name: build backend
command: go build .
container: golang
Any chances to discuss PR ?
@kvaster I took a look at the PR but there're many changes I can't follow.
Before the code changes I'd like to understand and discuss the use case/cases you're proposing and then understand how these should be expressed in the config specification and then implement them. Can you open a new issue to discuss this?
I've created issue.