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

Add support for command and args in dockerimage tool of devfile #12761

Merged
merged 1 commit into from
Mar 11, 2019

Conversation

metlos
Copy link
Contributor

@metlos metlos commented Feb 25, 2019

What does this PR do?

This adds support for command and args properties for dockerimage tools in the devfile. These two attributes are passed on to the workspace configuration as containerCommand and containerArgs.

Note that this PR builds on top of #12716 (which handles the assignment of the containerCommand and containerArgs` to the actual k8s container) and hence I marked this PR as draft so that we don't merge it prior to #12716.

An example devfile with the attributes applied so that we have an ever-running maven container in which we can run commands:

specVersion: 0.0.1
name: entrypoint-test
projects:
- name: revapi
  source:
    type: git
    location: https://github.com/revapi/revapi.git
tools:
- name: theia
  type: cheEditor
  id: org.eclipse.che.editor.theia:1.0.0
- name: exec
  type: chePlugin
  id: che-machine-exec-plugin:0.0.1
- name: mvn
  type: dockerimage
  image: maven:3.6.0-jdk-11
  memoryLimit: 512M
  command: ['tail']
  args: ['-f', '/dev/null']
  mountSources: true
  volumes:
  - name: localrepo
    containerPath: /m2
  env:
  - name: MAVEN_OPTS
    value: '-Dmaven.repo.local=/m2/repository'

What issues does this PR fix or reference?

#12668

Release Notes

  • TODO

Docs PR

@metlos metlos changed the title Devfile entrypoint Add support for command and args in dockerimage tool of devfile Feb 25, 2019
@che-bot che-bot added status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. kind/enhancement A feature request - must adhere to the feature request template. labels Feb 25, 2019
@metlos metlos force-pushed the devfile-entrypoint branch from 759f38f to e22f869 Compare March 5, 2019 20:09
@metlos
Copy link
Contributor Author

metlos commented Mar 5, 2019

ci-test

@che-bot
Copy link
Contributor

che-bot commented Mar 6, 2019

Results of automated E2E tests of Eclipse Che Multiuser on OCP:
Build details
Test report
docker image: eclipseche/che-server:12761
https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

@metlos
Copy link
Contributor Author

metlos commented Mar 6, 2019

ci-test

1 similar comment
@metlos
Copy link
Contributor Author

metlos commented Mar 6, 2019

ci-test

@metlos metlos marked this pull request as ready for review March 6, 2019 12:30
@che-bot
Copy link
Contributor

che-bot commented Mar 6, 2019

Results of automated E2E tests of Eclipse Che Multiuser on OCP:
Build details
Test report
docker image: eclipseche/che-server:12761
https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

@skabashnyuk
Copy link
Contributor

@metlos can you please add some examples of devfile in the description of this pr.

Copy link
Member

@sleshchenko sleshchenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Please address my unresolved comments

@sleshchenko
Copy link
Member

Please, do not forget to update dockerimage tool type description here https://github.com/eclipse/che/tree/master/wsmaster/che-core-api-devfile#dockerimage

Copy link
Contributor

@amisevsk amisevsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM, one question

@metlos
Copy link
Contributor Author

metlos commented Mar 7, 2019

ci-test

@che-bot
Copy link
Contributor

che-bot commented Mar 7, 2019

Results of automated E2E tests of Eclipse Che Multiuser on OCP:
Build details
Test report
docker image: eclipseche/che-server:12761
https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

Signed-off-by: Lukas Krejci <lkrejci@redhat.com>
@metlos metlos force-pushed the devfile-entrypoint branch from 8b5e0ff to d939959 Compare March 8, 2019 16:05
@metlos metlos merged commit f0abbff into eclipse-che:master Mar 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A feature request - must adhere to the feature request template. status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants