mirror of
https://github.com/coreos/fedora-coreos-config.git
synced 2026-02-05 09:45:30 +01:00
konflux: add overrides pipeline
This is part of coreos/fedora-coreos-tracker#2049 When pinning or fast-tracking packages with `manifest-lock.overrides*` files we need to download those RPMs into `overrides/rpm` as they are not yet tagged in our `coreos-pool` Koji tag. This patch and [1] add the pipeline i.e: `*-on-pull-request-overrides` that handles this use case. When manifest-lock.overrides* is edited, this pipeline is triggered and dowloads the RPMS. This works whether hermetic build is enabled or not. Once the PR is merged, those RPMs are tagged a few seconds after, and the classic `-on-push` pipeline will pull the RPMs from the koji repo. [1] https://gitlab.com/fedora/bootc/tekton-catalog/-/merge_requests/23/
This commit is contained in:
@@ -4,4 +4,5 @@ kind: Kustomization
|
||||
resources:
|
||||
- base/
|
||||
- on-pull-request/
|
||||
- on-pull-request-overrides/
|
||||
- on-push/
|
||||
|
||||
13
.tekton/base/on-pull-request-overrides/kustomization.yaml
Normal file
13
.tekton/base/on-pull-request-overrides/kustomization.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ../on-pull-request
|
||||
nameSuffix: "-overrides"
|
||||
patches:
|
||||
- target:
|
||||
kind: PipelineRun
|
||||
patch: |-
|
||||
- op: replace
|
||||
path: /metadata/annotations/pipelinesascode.tekton.dev~1on-cel-expression
|
||||
value: event == "pull_request" && "manifest-lock.overrides*".pathChanged()
|
||||
@@ -3,4 +3,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- on-pull-request
|
||||
- on-pull-request-overrides
|
||||
- on-push
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
---
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ../../base/on-pull-request-overrides
|
||||
transformers:
|
||||
- |-
|
||||
apiVersion: builtin
|
||||
kind: PrefixSuffixTransformer
|
||||
metadata:
|
||||
name: SuffixTransformer1
|
||||
suffix: ' && target_branch == "branched"'
|
||||
fieldSpecs:
|
||||
- kind: PipelineRun
|
||||
path: metadata/annotations/pipelinesascode.tekton.dev\/on-cel-expression
|
||||
- |-
|
||||
apiVersion: builtin
|
||||
kind: PrefixSuffixTransformer
|
||||
metadata:
|
||||
name: SuffixTransformer2
|
||||
suffix: "-branched"
|
||||
fieldSpecs:
|
||||
- kind: PipelineRun
|
||||
path: metadata/labels/appstudio.openshift.io\/application
|
||||
- kind: PipelineRun
|
||||
path: metadata/labels/appstudio.openshift.io\/component
|
||||
- kind: PipelineRun
|
||||
path: spec/taskRunTemplate/serviceAccountName
|
||||
patches:
|
||||
- target:
|
||||
kind: PipelineRun
|
||||
patch: |-
|
||||
- op: replace
|
||||
path: /metadata/name
|
||||
value: 'fedora-coreos-branched-on-pull-request-overrides'
|
||||
@@ -3,4 +3,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- on-pull-request
|
||||
- on-pull-request-overrides
|
||||
- on-push
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
---
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ../../base/on-pull-request-overrides
|
||||
transformers:
|
||||
- |-
|
||||
apiVersion: builtin
|
||||
kind: PrefixSuffixTransformer
|
||||
metadata:
|
||||
name: SuffixTransformer1
|
||||
suffix: ' && target_branch == "next-devel"'
|
||||
fieldSpecs:
|
||||
- kind: PipelineRun
|
||||
path: metadata/annotations/pipelinesascode.tekton.dev\/on-cel-expression
|
||||
- |-
|
||||
apiVersion: builtin
|
||||
kind: PrefixSuffixTransformer
|
||||
metadata:
|
||||
name: SuffixTransformer2
|
||||
suffix: "-next-devel"
|
||||
fieldSpecs:
|
||||
- kind: PipelineRun
|
||||
path: metadata/labels/appstudio.openshift.io\/application
|
||||
- kind: PipelineRun
|
||||
path: metadata/labels/appstudio.openshift.io\/component
|
||||
- kind: PipelineRun
|
||||
path: spec/taskRunTemplate/serviceAccountName
|
||||
patches:
|
||||
- target:
|
||||
kind: PipelineRun
|
||||
patch: |-
|
||||
- op: replace
|
||||
path: /metadata/name
|
||||
value: 'fedora-coreos-next-devel-on-pull-request-overrides'
|
||||
@@ -3,4 +3,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- on-pull-request
|
||||
- on-pull-request-overrides
|
||||
- on-push
|
||||
|
||||
35
.tekton/rawhide/on-pull-request-overrides/kustomization.yaml
Normal file
35
.tekton/rawhide/on-pull-request-overrides/kustomization.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ../../base/on-pull-request-overrides
|
||||
transformers:
|
||||
- |-
|
||||
apiVersion: builtin
|
||||
kind: PrefixSuffixTransformer
|
||||
metadata:
|
||||
name: SuffixTransformer1
|
||||
suffix: ' && target_branch == "rawhide"'
|
||||
fieldSpecs:
|
||||
- kind: PipelineRun
|
||||
path: metadata/annotations/pipelinesascode.tekton.dev\/on-cel-expression
|
||||
- |-
|
||||
apiVersion: builtin
|
||||
kind: PrefixSuffixTransformer
|
||||
metadata:
|
||||
name: SuffixTransformer2
|
||||
suffix: "-rawhide"
|
||||
fieldSpecs:
|
||||
- kind: PipelineRun
|
||||
path: metadata/labels/appstudio.openshift.io\/application
|
||||
- kind: PipelineRun
|
||||
path: metadata/labels/appstudio.openshift.io\/component
|
||||
- kind: PipelineRun
|
||||
path: spec/taskRunTemplate/serviceAccountName
|
||||
patches:
|
||||
- target:
|
||||
kind: PipelineRun
|
||||
patch: |-
|
||||
- op: replace
|
||||
path: /metadata/name
|
||||
value: 'fedora-coreos-rawhide-on-pull-request-overrides'
|
||||
@@ -3,4 +3,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- on-pull-request
|
||||
- on-pull-request-overrides
|
||||
- on-push
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
---
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ../../base/on-pull-request-overrides
|
||||
transformers:
|
||||
- |-
|
||||
apiVersion: builtin
|
||||
kind: PrefixSuffixTransformer
|
||||
metadata:
|
||||
name: SuffixTransformer1
|
||||
suffix: ' && target_branch == "testing-devel"'
|
||||
fieldSpecs:
|
||||
- kind: PipelineRun
|
||||
path: metadata/annotations/pipelinesascode.tekton.dev\/on-cel-expression
|
||||
- |-
|
||||
apiVersion: builtin
|
||||
kind: PrefixSuffixTransformer
|
||||
metadata:
|
||||
name: SuffixTransformer2
|
||||
suffix: "-testing-devel"
|
||||
fieldSpecs:
|
||||
- kind: PipelineRun
|
||||
path: metadata/labels/appstudio.openshift.io\/application
|
||||
- kind: PipelineRun
|
||||
path: metadata/labels/appstudio.openshift.io\/component
|
||||
- kind: PipelineRun
|
||||
path: spec/taskRunTemplate/serviceAccountName
|
||||
patches:
|
||||
- target:
|
||||
kind: PipelineRun
|
||||
patch: |-
|
||||
- op: replace
|
||||
path: /metadata/name
|
||||
value: 'fedora-coreos-testing-devel-on-pull-request-overrides'
|
||||
Reference in New Issue
Block a user