Adding a command group to a devfile

Create command groups to help automate your devfile.

Procedure
  1. Assign a given command to one or more groups that represent the nature of the command.

  2. Use the following supported group kinds:

    • build

    • run

    • test

    • debug

  3. At most, there can only be one default command for each group kind. Set the default command by specifying a true value for isDefault.

    schemaVersion: 2.1.0
    metadata:
      name: mydevfile
    projects:
      - name: my-maven-project
        clonePath: maven/src/github.com/acme/my-maven-project
        git:
          remotes:
            origin: "https://github.com/acme/my-maven-project.git"
    components:
      - name: maven
        container:
          image: eclipse/maven-jdk8:latest
          mountSources: true
          command: ['tail']
    commands:
      - id: package
        exec:
          component: maven
          commandLine: "mvn package"
          group:
            kind: build
      - id: install
        exec:
          component: maven
          commandLine: "mvn install"
          group:
            kind: build
            isDefault: true