diff --git a/konflux-configs/base/project/kustomization.yaml b/konflux-configs/base/project/kustomization.yaml index 5a93e2e4..b95134fb 100644 --- a/konflux-configs/base/project/kustomization.yaml +++ b/konflux-configs/base/project/kustomization.yaml @@ -13,6 +13,7 @@ resources: - overlay/create-tree - overlay/client-server - overlay/tough + - overlay/tufcli - overlay/policy-controller - overlay/policy-controller-operator - overlay/model-validation-operator diff --git a/konflux-configs/base/project/overlay/cli-stacks/kustomization.yaml b/konflux-configs/base/project/overlay/cli-stacks/kustomization.yaml index 542edea9..9ab51d18 100644 --- a/konflux-configs/base/project/overlay/cli-stacks/kustomization.yaml +++ b/konflux-configs/base/project/overlay/cli-stacks/kustomization.yaml @@ -33,6 +33,10 @@ patches: name: cli-stacks-template kind: ProjectDevelopmentStreamTemplate path: patch/tuftool-cli-stack.yaml + - target: + name: cli-stacks-template + kind: ProjectDevelopmentStreamTemplate + path: patch/tufcli-cli-stack.yaml - target: name: cli-stacks-template kind: ProjectDevelopmentStreamTemplate diff --git a/konflux-configs/base/project/overlay/cli-stacks/patch/tufcli-cli-stack.yaml b/konflux-configs/base/project/overlay/cli-stacks/patch/tufcli-cli-stack.yaml new file mode 100644 index 00000000..6c17e487 --- /dev/null +++ b/konflux-configs/base/project/overlay/cli-stacks/patch/tufcli-cli-stack.yaml @@ -0,0 +1,44 @@ +- op: add + path: /spec/resources/- + value: + apiVersion: appstudio.redhat.com/v1alpha1 + kind: Component + metadata: + annotations: + build.appstudio.openshift.io/pipeline: '{"name":"docker-build-oci-ta","bundle":"latest"}' + git-provider: github + git-provider-url: https://github.com + mintmaker.appstudio.redhat.com/disabled: "{{.mintmakerDisabled}}" + name: "tufcli-cli-stack{{.nameSuffix}}" + spec: + application: "{{.application}}{{.nameSuffix}}" + componentName: "tufcli-cli-stack" + build-nudges-ref: + - "client-server{{.nameSuffix}}" + source: + git: + url: https://github.com/securesign/tufcli + revision: "{{.branch}}" + dockerfileUrl: Dockerfile.cli-stack.rh +- op: add + path: /spec/resources/- + value: + apiVersion: appstudio.redhat.com/v1alpha1 + kind: ImageRepository + metadata: + name: "tufcli-cli-stack{{.nameSuffix}}" + annotations: + image-controller.appstudio.redhat.com/update-component-image: 'true' + labels: + appstudio.redhat.com/application: "{{.application}}{{.nameSuffix}}" + appstudio.redhat.com/component: "tufcli-cli-stack{{.nameSuffix}}" + spec: + image: + name: rhtas-tenant/tufcli-cli-stack + visibility: public + notifications: + - config: + url: https://bombino.api.redhat.com/v1/sbom/quay/push + event: repo_push + method: webhook + title: SBOM-event-to-Bombino diff --git a/konflux-configs/base/project/overlay/tufcli/kustomization.yaml b/konflux-configs/base/project/overlay/tufcli/kustomization.yaml new file mode 100644 index 00000000..81f8bb5b --- /dev/null +++ b/konflux-configs/base/project/overlay/tufcli/kustomization.yaml @@ -0,0 +1,20 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - project.yaml + - template.yaml + +components: + - ../../base/ec + - ../../base/release-plan + +patches: + - target: + name: tufcli-template + kind: ProjectDevelopmentStreamTemplate + path: patch/tufcli.yaml + - target: + name: tufcli-template + kind: ProjectDevelopmentStreamTemplate + path: patch/tufcli-init.yaml diff --git a/konflux-configs/base/project/overlay/tufcli/patch/tufcli-init.yaml b/konflux-configs/base/project/overlay/tufcli/patch/tufcli-init.yaml new file mode 100644 index 00000000..1b3421b0 --- /dev/null +++ b/konflux-configs/base/project/overlay/tufcli/patch/tufcli-init.yaml @@ -0,0 +1,41 @@ +- op: add + path: /spec/resources/- + value: + apiVersion: appstudio.redhat.com/v1alpha1 + kind: Component + metadata: + annotations: + build.appstudio.openshift.io/pipeline: '{"name":"docker-build-oci-ta","bundle":"latest"}' + git-provider: github + git-provider-url: https://github.com + mintmaker.appstudio.redhat.com/disabled: "{{.mintmakerDisabled}}" + name: "tufcli-init{{.nameSuffix}}" + spec: + application: "{{.application}}{{.nameSuffix}}" + componentName: "tufcli-init" + build-nudges-ref: + - "rhtas-operator{{.nameSuffix}}" + source: + git: + url: https://github.com/securesign/tufcli + revision: "{{.branch}}" + dockerfileUrl: Dockerfile.tufcli-init +- op: add + path: /spec/resources/- + value: + apiVersion: appstudio.redhat.com/v1alpha1 + kind: ImageRepository + metadata: + name: "imagerepository-for-{{.application}}{{.nameSuffix}}-tufcli-init" + labels: + appstudio.redhat.com/component: "tufcli-init{{.nameSuffix}}" + spec: + image: + name: rhtas-tenant/tufcli-init + visibility: public + notifications: + - config: + url: https://bombino.api.redhat.com/v1/sbom/quay/push + event: repo_push + method: webhook + title: SBOM-event-to-Bombino diff --git a/konflux-configs/base/project/overlay/tufcli/patch/tufcli.yaml b/konflux-configs/base/project/overlay/tufcli/patch/tufcli.yaml new file mode 100644 index 00000000..86a17d12 --- /dev/null +++ b/konflux-configs/base/project/overlay/tufcli/patch/tufcli.yaml @@ -0,0 +1,41 @@ +- op: add + path: /spec/resources/- + value: + apiVersion: appstudio.redhat.com/v1alpha1 + kind: Component + metadata: + annotations: + build.appstudio.openshift.io/pipeline: '{"name":"docker-build-oci-ta","bundle":"latest"}' + git-provider: github + git-provider-url: https://github.com + mintmaker.appstudio.redhat.com/disabled: "{{.mintmakerDisabled}}" + name: "tufcli{{.nameSuffix}}" + spec: + application: "{{.application}}{{.nameSuffix}}" + componentName: "tufcli" + build-nudges-ref: + - "tufcli-cli-stack{{.nameSuffix}}" + source: + git: + url: https://github.com/securesign/tufcli + revision: "{{.branch}}" + dockerfileUrl: Dockerfile.rh +- op: add + path: /spec/resources/- + value: + apiVersion: appstudio.redhat.com/v1alpha1 + kind: ImageRepository + metadata: + name: "imagerepository-for-{{.application}}{{.nameSuffix}}-tufcli" + labels: + appstudio.redhat.com/component: "tufcli{{.nameSuffix}}" + spec: + image: + name: rhtas-tenant/tufcli + visibility: public + notifications: + - config: + url: https://bombino.api.redhat.com/v1/sbom/quay/push + event: repo_push + method: webhook + title: SBOM-event-to-Bombino diff --git a/konflux-configs/base/project/overlay/tufcli/project.yaml b/konflux-configs/base/project/overlay/tufcli/project.yaml new file mode 100644 index 00000000..f467eb78 --- /dev/null +++ b/konflux-configs/base/project/overlay/tufcli/project.yaml @@ -0,0 +1,8 @@ +apiVersion: projctl.konflux.dev/v1beta1 +kind: Project +metadata: + name: tufcli +spec: + displayName: tufcli + description: | + tufcli is a Go command-line utility for generating and signing TUF repositories. diff --git a/konflux-configs/base/project/overlay/tufcli/template.yaml b/konflux-configs/base/project/overlay/tufcli/template.yaml new file mode 100644 index 00000000..055c9551 --- /dev/null +++ b/konflux-configs/base/project/overlay/tufcli/template.yaml @@ -0,0 +1,33 @@ +apiVersion: projctl.konflux.dev/v1beta1 +kind: ProjectDevelopmentStreamTemplate +metadata: + name: tufcli-template + labels: + build.rhtas.com/ec: registry-rhtas + build.rhtas.com/type: component +spec: + project: tufcli + variables: + - name: version + description: A version number for a new development stream + - name: branch + description: Git branch + defaultValue: "main" + - name: nameSuffix + description: A suffix which will be added to K8s resource name + defaultValue: "-{{hyphenize .version}}" + - name: application + description: The application name + defaultValue: "tufcli" + - name: mintmakerDisabled + description: Whether to disable mintmaker annotation on the Component + defaultValue: "false" + resources: + - apiVersion: appstudio.redhat.com/v1alpha1 + kind: Application + metadata: + annotations: + application.thumbnail: "5" + name: "{{.application}}{{.nameSuffix}}" + spec: + displayName: "tufcli ({{.version}})" diff --git a/konflux-configs/base/stream/rhtas/base/kustomization.yaml b/konflux-configs/base/stream/rhtas/base/kustomization.yaml index 4beb188e..22c7a954 100644 --- a/konflux-configs/base/stream/rhtas/base/kustomization.yaml +++ b/konflux-configs/base/stream/rhtas/base/kustomization.yaml @@ -10,6 +10,7 @@ resources: - tas-tools-stream.yaml - tas-components-stream.yaml - tough-stream.yaml + - tufcli-stream.yaml - create-tree-stream.yaml - client-server-stream.yaml - cli-stacks-stream.yaml diff --git a/konflux-configs/base/stream/rhtas/base/tufcli-stream.yaml b/konflux-configs/base/stream/rhtas/base/tufcli-stream.yaml new file mode 100644 index 00000000..8ec79b9e --- /dev/null +++ b/konflux-configs/base/stream/rhtas/base/tufcli-stream.yaml @@ -0,0 +1,15 @@ +apiVersion: projctl.konflux.dev/v1beta1 +kind: ProjectDevelopmentStream +metadata: + name: tufcli +spec: + project: tufcli + template: + name: tufcli-template + values: + - name: version + value: "main" + - name: branch + value: "main" + - name: nameSuffix + value: ""