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 an ability to specify Devfile in Stack #13346

Closed
wants to merge 4 commits into from

Conversation

sleshchenko
Copy link
Member

@sleshchenko sleshchenko commented May 16, 2019

What does this PR do?

Add an ability to specify Devfile in Stack.

There is one part that is missed - validation of Devfile before storing it.
It should be done in StackValidator class. And it will be done after or in the scope of #13315

With these changes, Che 7 stacks may be rewritten with Devfiles but it was not done since UD does not respect devfile in stacks. So, it should be done later. As an example, Che 7 stack rewritten with Devfile:

Stacks with Devfile in JSON format
  {
    "id": "che7-preview",
    "creator": "ide",
    "name": "Che 7",
    "description": "Workspace.next sidecars and Theia as IDE",
    "scope": "general",
    "tags": [
      "ws.next",
      "Theia",
      "Java",
      "JDK",
      "Node.JS",
      "NPM",
      "Yeoman"
    ],
    "components": [
      {
        "name": "Centos",
        "version": "7"
      },
      {
        "name": "OpenJDK",
        "version": "1.8.0_181"
      },
      {
        "name": "NodeJS",
        "version": "8.12.0"
      },
      {
        "name": "NPM",
        "version": "6.4.1"
      }
    ],
    "devfile": {
      "name": "che7",
      "components": [
        {
          "type": "cheEditor",
          "id": "eclipse/che-theia/next"
        },
        {
          "type": "chePlugin",
          "id": "eclipse/che-machine-exec-plugin/0.0.1"
        },
        {
          "type": "kubernetes",
          "referenceContent": "kind: List\nitems:\n - \n  apiVersion: v1\n  kind: Pod\n  metadata:\n   name: ws\n  spec:\n   containers:\n    - \n     image: 'eclipse/che-dev:nightly'\n     name: dev\n     resources:\n      limits:\n       memory: 512Mi\n"
        }
      ]
    },
    "stackIcon": {
      "name": "type-che7.svg",
      "mediaType": "image/svg+xml"
    }
  }
Stacks with Devfile in YAML format
---
id: che7-preview
creator: ide
name: Che 7
description: Workspace.next sidecars and Theia as IDE
scope: general
tags:
- ws.next
- Theia
- Java
- JDK
- Node.JS
- NPM
- Yeoman
components:
- name: Centos
  version: '7'
- name: OpenJDK
  version: 1.8.0_181
- name: NodeJS
  version: 8.12.0
- name: NPM
  version: 6.4.1
devfile:
  name: che7
  components:
  - type: cheEditor
    id: eclipse/che-theia/next
  - type: chePlugin
    id: eclipse/che-machine-exec-plugin/0.0.1
  - type: kubernetes
    referenceContent: |
      kind: List
      items:
      - 
      apiVersion: v1
      kind: Pod
      metadata:
        name: ws
      spec:
        containers:
        - image: 'eclipse/che-dev:nightly'
          name: dev
          resources:
            limits:
             memory: 512Mi
stackIcon:
  name: type-che7.svg
  mediaType: image/svg+xml

What issues does this PR fix or reference?

#13338

Release Notes

N/A

Docs PR

N/A

@sleshchenko sleshchenko force-pushed the stacksDevfile branch 2 times, most recently from 68badd8 to 6033590 Compare May 16, 2019 12:15
Signed-off-by: Sergii Leshchenko <sleshche@redhat.com>
Signed-off-by: Sergii Leshchenko <sleshche@redhat.com>
@sleshchenko sleshchenko marked this pull request as ready for review May 16, 2019 12:28
@sleshchenko sleshchenko requested a review from metlos May 16, 2019 12:28
@sleshchenko sleshchenko self-assigned this May 16, 2019
@sleshchenko sleshchenko added 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. labels May 16, 2019
Signed-off-by: Sergii Leshchenko <sleshche@redhat.com>
@sleshchenko
Copy link
Member Author

ci-test

@che-bot
Copy link
Contributor

che-bot commented May 16, 2019

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

@sleshchenko
Copy link
Member Author

ci-test

@che-bot
Copy link
Contributor

che-bot commented May 16, 2019

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

Signed-off-by: Sergii Leshchenko <sleshche@redhat.com>
@sleshchenko
Copy link
Member Author

Won't be applied since was decided to replace stacks with Devfile registry #13353

@sleshchenko sleshchenko deleted the stacksDevfile branch May 17, 2019 08:11
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.

2 participants