Skip to content

Conversation

@kvaster
Copy link

@kvaster kvaster commented Sep 19, 2022

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

@kvaster
Copy link
Author

kvaster commented Sep 28, 2022

Any chances to discuss PR ?

@sgotti
Copy link
Member

sgotti commented Sep 28, 2022

@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?

@kvaster
Copy link
Author

kvaster commented Sep 28, 2022

I've created issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants