-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Setup Devfile implementation plan fro Phase 1 #11719
Comments
Plan to have three REST Methods at Path("devfile")
public class DefFileService extends Service {
//Create a workspace by providing the url to the repository
@POST
@Produces(APPLICATION_JSON)
public Response create(@QueryParam("repo_url") String repo_url){
...
}
// generate a workspace by sending a devfile to a rest API
// Initially this method will return empty workspace configuration.
// And will start che-devfile-broker on a background to clone sources and get devfile.
@POST
@Consumes("text/yml")
@Produces(APPLICATION_JSON)
public Response createFromYaml(DevFile defFile){
...
}
// generate the devfile based on an existing workspace
// key = workspace12345678
// key = namespace/workspace_name
// key = namespace_part_1/namespace_part_2/workspace_name
// See get workspace by id aka key.
@GET
@Path("/{key:.*}")
@Produces("text/yml")
public Response createFromYaml(@PathParam("key") String key){
...
} } Example of yaml functionality for Phase 1 ---
specVersion: 0.0.1
name: petclinic-dev-environment
projects:
- name: petclinic
source:
type: git
location: 'git@github.com:spring-projects/spring-petclinic.git'
tools:
- name: theia-ide
definition:
chePlugin:
name: theia:0.0.3
- name: jdt.ls
definition:
chePlugin:
name: theia-jdtls:0.0.3
commands:
- name: build
toolsCommands:
- tool: mvn-stack
action:
exec:
command: mvn package
workdir: /projects/spring-petclinic
- name: run
toolsCommands:
- tool: mysql
action: start
- tool: mvn-stack
action:
exec:
command: mvn spring-boot:run
workdir: /projects/spring-petclinic |
Implementation plan :
|
@skabashnyuk I have some question. Would you be willing to elaborate?
|
I expect tools to be be like:
|
By design.
I guesses you right. Copy/past from. https://github.com/l0rd/devfile/blob/master/petclinic.yaml @l0rd can you confirm?
This use case postponed to next iteration for simplification. Now we considering that tool = 1 container.
Proposals? |
just |
@skabashnyuk tnx for the explanation |
Initial plan added to the upstream epic header #11549 |
Answering @garagatyi comments
I think that at the time of the devfile definition we had not made a distinction between plugins and editors or that the distinction was blurry. I am ok to have: - name: "editor"
definition:
cheEditor:
name: "org.eclipse.che.editor.theia:1.0.0" Anyway
The full model is https://github.com/l0rd/devfile#third-generation-devfile. And this is just a draft so any idea for improvement is very welcome.
Yes the simpler the better but renaming commands:
- name: build
tools:
- name: mvn-stack
(...) |
Sergii and I were suggesting
|
Description
The goal of this task is to dive into the task #11549 and provide some implementation plan for the first iteration.
The text was updated successfully, but these errors were encountered: