Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

The CRD is not updating the StackId #395

Closed
oiricaud opened this issue Jun 4, 2020 · 5 comments
Closed

The CRD is not updating the StackId #395

oiricaud opened this issue Jun 4, 2020 · 5 comments

Comments

@oiricaud
Copy link

oiricaud commented Jun 4, 2020

Kabanero: 0.6.1

In the docs we can see

"When the product operator activates the CRD, it associates the pipelines in the pipelines archive with each of the stacks in the stack hub. The default pipelines are intended to work with all the stacks in the stack hub in the previous example. All of the pipeline-related resources (such as the tasks, trigger bindings, and pipelines) prefix the name of the resource with the keyword StackId. When the operator activates these resources, it replaces the keyword with the name of the stack it is activating."

But upon creating a new pipeline resource such as

apiVersion: tekton.dev/v1alpha1
kind: TriggerBinding
metadata:
  name: StackId-mcm-pl-pullrequest-binding

I get

\"StackId-mcm-pl\" is invalid: metadata.name: Invalid value: \"StackId-mcm-pl\": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')} 

It appears the Regex only accepts lower case letters.

I added a new pipeline object with id nodejs-mcm in my CRD

    stacks:
      repositories:
      - https:
          name: central
          url: https://github.com/kabanero-io/kabanero-stack-hub/releases/download/0.6.3/kabanero-stack-hub-index.yaml
      - https:
          name: custom-node-stack
          url: https://github.com/odrodrig/custom-node-stack/releases/download/0.5.0/custom-node-stack-index.yaml
      pipelines:
      - https:
          url: https://github.com/kabanero-io/kabanero-pipelines/releases/download/0.6.1/default-kabanero-pipelines.tar.gz
        id: default
        sha256: 64aee2805d36127c2f1e0e5f0fc6fdae5cef19360c1bb506137584f3bd0988cc
      - https:
          url: https://github.com/oiricaud/devops-demo-kabanero-pipelines/releases/download/v1.31/default-kabanero-pipelines.tar.gz
        id: nodejs-mcm
        sha256: cfbe25c9650304601273fac167521a1c1c73e4ea2de2dd672d574abf0c033a9a

I am not sure if this is a bug or if I am missing a step, but it appears the operator is not activating these resources nor replacing the keyword name with the stack id.

I merely edited the kabanero.yaml file and changed the version and included the sha256

@kvijai82
Copy link
Contributor

kvijai82 commented Jun 4, 2020

@oiricaud you will need to specify #Kabanero! on activate substitute StackId for text 'StackId' on the first line of the yaml files where you want this substitution to happen.

@oiricaud
Copy link
Author

oiricaud commented Jun 4, 2020

Thank you @kvijai82 didn't realized I need to specify a comment or do you mean I need to replace StackId with the actual stack id i.e nodejs.

Do you mean
a)

apiVersion: tekton.dev/v1alpha1
kind: TriggerBinding
metadata:
  name: 'StackId'-mcm-pl-pullrequest-binding

b)

apiVersion: tekton.dev/v1alpha1
kind: TriggerBinding
metadata:
  name: nodejs-mcm-pl-pullrequest-binding

c)

#Kabanero! on activate substitute StackId for text 'StackId' 
apiVersion: tekton.dev/v1alpha1
kind: TriggerBinding
metadata:
  name: StackId-mcm-pl-pullrequest-binding

@kvijai82
Copy link
Contributor

kvijai82 commented Jun 4, 2020 via email

@oiricaud
Copy link
Author

oiricaud commented Jun 4, 2020

Thanks you are a legend!
Screen Shot 2020-06-04 at 12 08 46 PM

@oiricaud oiricaud closed this as completed Jun 4, 2020
@kvijai82
Copy link
Contributor

kvijai82 commented Jun 4, 2020 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants