schemaVersion: 2.1.0
metadata:
  name: che-server-in-che
  namespace: admin-devspaces
projects:
  - git:
      remotes:
        origin: 'https://github.com/eclipse-che/che-server.git'
    name: che-server
components:
  - attributes:
      app.kubernetes.io/name: maven
      che-theia.eclipse.org/vscode-extensions:
        - 'relative:extension/resources/github_com/redhat-developer/devspaces-vscode-extensions/releases/download/7_44-che-assets/java-0.82.0-369.vsix'
        - 'relative:extension/resources/github_com/redhat-developer/devspaces-vscode-extensions/releases/download/7_44-che-assets/vscode-java-debug-0.26.0.vsix'
        - 'relative:extension/resources/open-vsx_org/api/vscjava/vscode-java-test/0_28_1/file/vscjava.vscode-java-test-0.28.1.vsix'
      che-theia.eclipse.org/vscode-preferences:
        java.server.launchMode: Standard
    container:
      args:
        - sh
        - '-c'
        - '${PLUGIN_REMOTE_ENDPOINT_EXECUTABLE}'
      env:
        - name: PLUGIN_REMOTE_ENDPOINT_EXECUTABLE
          value: /remote-endpoint/plugin-remote-endpoint
        - name: THEIA_PLUGINS
          value: 'local-dir:///plugins/sidecars/maven'
      image: 'quay.io/eclipse/che-java11-maven:nightly'
      memoryLimit: 2Gi
      mountSources: true
      sourceMapping: /projects
      volumeMounts:
        - name: m2
          path: /home/user/.m2
        - name: gradle
          path: /home/user/.gradle
        - name: gradle
          path: /home/user/.gradle
        - name: remote-endpoint
          path: /remote-endpoint
        - name: plugins
          path: /plugins
    name: maven
  - name: m2
    volume: {}
  - name: gradle
    volume: {}
  - name: gradle
    volume: {}
commands:
  - exec:
      commandLine: mvn clean install -DskipTests
      component: maven
      label: build without tests
      workingDir: '${PROJECTS_ROOT}/che'
    id: build-without-tests
