Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow more then on runStep container #355

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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.

None yet

2 participants