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

[WIP] Devfile initial model, converters & schema #11951

Closed
wants to merge 14 commits into from
Closed

Conversation

mshaposhnik
Copy link
Contributor

@mshaposhnik mshaposhnik commented Nov 15, 2018

What does this PR do?

Initial implementation proposal for DevFile local part -- model, converter, REST & JSON schema prototype.

What issues does this PR fix or reference?

#11832

Docs PR

N/A

Yaml example:

version: 0.0.1
name: petclinic-dev-environment
projects:
  - name: petclinic
    source:
      type: git
      location: 'git@github.com:spring-projects/spring-petclinic.git'
tools:
  - name: mvn-stack
    type: chePlugin
    id: eclipse/maven-jdk8:1.0.0
  - name: theia-ide
    type: cheEditor
    id: eclipse/theia:0.0.3
  - name: jdt.ls
    type: chePlugin
    id: eclipse/theia-jdtls:0.0.3
commands:
  - name: build
    actions:
      - type: exec
        tool: mvn-stack
        command: mvn package
        workdir: /projects/spring-petclinic
  - name: run
    attributes:
      runType: sequential
    actions:
      - type: exec
        tool: mvn-stack
        command: mvn spring-boot:run
        workdir: /projects/spring-petclinic
  - name: other
    actions:
      - type: exec
        tool: jdt.ls
        command: run.sh
WS config after conversion example:

{
  "projects": [
    {
       "source": {
        "location": "git@github.com:spring-projects/spring-petclinic.git",
        "type": "git",
        "parameters": {}
      },
      "mixins": [],
      "name": "petclinic",
      "path": "/petclinic",
      "attributes": {}
    }
  ],
  "commands": [
    {
      "commandLine": "mvn package",
      "name": "build:mvn-stack",
      "type": "exec",
      "attributes": {
        "pluginId": "eclipse/maven-jdk8:1.0.0",
        "workingDir": "/projects/spring-petclinic"
      }
    },
    {
      "commandLine": "mvn spring-boot:run",
      "name": "run:mvn-stack",
      "type": "exec",
      "attributes": {
        "pluginId": "eclipse/maven-jdk8:1.0.0",
        "runType": "sequential",
        "workingDir": "/projects/spring-petclinic"
      }
    },
    {
      "commandLine": "run.sh",
      "name": "other:jdt.ls",
      "type": "exec",
      "attributes": {
        "pluginId": "eclipse/theia-jdtls:0.0.3"
      }
    }
  ],
  "environments": {
    "default": {
      "recipe": {
        "type": "dockerimage",
        "content": "eclipse/ubuntu_jdk8"
      },
      "machines": {
        "dev-machine": {
          "installers": [],
          "servers": {},
          "env": {},
          "volumes": {},
          "attributes": {
            "memoryLimitBytes": "2147483648"
          }
        }
      }
    }
  },
  "defaultEnv": "default",
  "name": "petclinic-dev-environment",
  "attributes": {
    "eclipse/maven-jdk8:1.0.0": "mvn-stack",
    "editor": "eclipse/theia:0.0.3",
    "eclipse/theia-jdtls:0.0.3": "jdt.ls",
    "plugins": "eclipse/maven-jdk8:1.0.0,eclipse/theia-jdtls:0.0.3",
    "eclipse/theia:0.0.3": "theia-ide"
  }
}

@benoitf benoitf added status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. kind/task Internal things, technical debt, and to-do tasks to be performed. labels Nov 16, 2018
@mshaposhnik mshaposhnik deleted the devfile branch November 29, 2018 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed. 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.

2 participants