syntasso / kratix-cli

CLI-based tool to build Promises
Apache License 2.0
2 stars 1 forks source link

bug: kratix build promise does not work with helm-promise and operator-promise #28

Closed ChunyiLyu closed 2 months ago

ChunyiLyu commented 2 months ago

Description

Promise initialized with kratix init helm-promise and kratix init operator-promise defines a resource configure pipeline that's written to workflows/resource/configure/workflow.yaml

and looks like

- apiVersion: platform.kratix.io/v1alpha1
  kind: Pipeline
  metadata:
    name: instance-configure
  spec:
    containers:
    - env:
...
      image: ghcr.io/syntasso/kratix-cli/from-api-to-operator:v0.1.0
      name: from-api-to-operator

or

- apiVersion: platform.kratix.io/v1alpha1
  kind: Pipeline
  metadata:
    name: instance-configure
  spec:
...
      image: ghcr.io/syntasso/kratix-cli/helm-resource-configure:v0.1.0
      name: instance-configure

When building promise with kratix build promise this generated workflow is not included in the final promise.

Issue

kratix build promise is expecting the workflow.yaml file in a specific structure. kratix add container generated workflow file looks like

promise: {}
resource:
  configure:
  - apiVersion: platform.kratix.io/v1alpha1
    kind: Pipeline
    metadata:
      name: instance-configure
    spec:
      containers:
      - image: test:latest
        name: test