Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .tekton/central-db-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ metadata:
pipelinesascode.tekton.dev/max-keep-runs: "500"
# TODO(ROX-21073): re-enable for all PR branches
pipelinesascode.tekton.dev/on-cel-expression: |
(event == "push" && target_branch.matches("^(master|release-.*)$")) ||
(event == "pull_request" && (source_branch.matches("(konflux|appstudio|rhtap)") || body.pull_request.labels.exists(l, l.name == "konflux-build")))
(event == "push" && target_branch.matches("^(master|release-.*)$"))
labels:
appstudio.openshift.io/application: acs
appstudio.openshift.io/component: central-db
Expand Down
59 changes: 59 additions & 0 deletions .tekton/collector-full-retag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
apiVersion: tekton.dev/v1
kind: PipelineRun

metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/stackrox/stackrox?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/max-keep-runs: "500"
# TODO(ROX-21073): re-enable for all PR branches
pipelinesascode.tekton.dev/on-cel-expression: |
(event == "push" && target_branch.matches("^(master|release-.*)$")) ||
(event == "pull_request" && (source_branch.matches("(konflux|appstudio|rhtap)") || body.pull_request.labels.exists(l, l.name == "konflux-build")))
labels:
appstudio.openshift.io/application: acs
appstudio.openshift.io/component: collector
pipelines.appstudio.openshift.io/type: build
name: collector-full-retag
namespace: rh-acs-tenant

spec:

params:
- name: git-url
value: '{{repo_url}}'
- name: image-expires-after
value: '13w'
- name: output-image-repo
value: quay.io/rhacs-eng/collector
- name: base-image-repo
value: quay.io/rhacs-eng/collector
- name: base-image-tag-makefile-target
value: collector-tag
- name: revision
value: '{{revision}}'
- name: rebuild
value: 'true'
- name: clone-depth
value: '0'
- name: clone-fetch-tags
value: 'true'

workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

pipelineRef:
name: retag-pipeline

taskRunSpecs:

timeouts:
# Retagging pipeline should be quick-ish.
tasks: 30m
# Reserve time for final tasks to run.
finally: 10m
pipeline: 40m
59 changes: 59 additions & 0 deletions .tekton/collector-slim-retag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
apiVersion: tekton.dev/v1
kind: PipelineRun

metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/stackrox/stackrox?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/max-keep-runs: "500"
# TODO(ROX-21073): re-enable for all PR branches
pipelinesascode.tekton.dev/on-cel-expression: |
(event == "push" && target_branch.matches("^(master|release-.*)$")) ||
(event == "pull_request" && (source_branch.matches("(konflux|appstudio|rhtap)") || body.pull_request.labels.exists(l, l.name == "konflux-build")))
labels:
appstudio.openshift.io/application: acs
appstudio.openshift.io/component: collector
pipelines.appstudio.openshift.io/type: build
name: collector-slim-retag
namespace: rh-acs-tenant

spec:

params:
- name: git-url
value: '{{repo_url}}'
- name: image-expires-after
value: '13w'
- name: output-image-repo
value: quay.io/rhacs-eng/collector-slim
- name: base-image-repo
value: quay.io/rhacs-eng/collector
- name: base-image-tag-makefile-target
value: collector-tag
- name: revision
value: '{{revision}}'
- name: rebuild
value: 'true'
- name: clone-depth
value: '0'
- name: clone-fetch-tags
value: 'true'

workspaces:
- name: git-auth
secret:
secretName: '{{ git_auth_secret }}'

pipelineRef:
name: retag-pipeline

taskRunSpecs:

timeouts:
# Retagging pipeline should be quick-ish.
tasks: 30m
# Reserve time for final tasks to run.
finally: 10m
pipeline: 40m
6 changes: 5 additions & 1 deletion .tekton/determine-image-tag-task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ spec:
description: Directory in which to run 'make' command.
type: string
default: "."
- name: MAKEFILE_TARGET
description: Makefile target to run.
type: string
default: "tag"
results:
- name: IMAGE_TAG
description: Image Tag determined by custom logic.
Expand All @@ -45,5 +49,5 @@ spec:
dnf -y install git make

.konflux/scripts/fail-build-if-git-is-dirty.sh
image_tag="$(make -C "$(params.MAKEFILE_DIRECTORY)" --quiet --no-print-directory tag)$(params.TAG_SUFFIX)"
image_tag="$(make -C "$(params.MAKEFILE_DIRECTORY)" --quiet --no-print-directory "$(params.MAKEFILE_TARGET)")$(params.TAG_SUFFIX)"
echo -n "$image_tag" | tee "$(results.IMAGE_TAG.path)"
3 changes: 1 addition & 2 deletions .tekton/main-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ metadata:
pipelinesascode.tekton.dev/max-keep-runs: "500"
# TODO(ROX-21073): re-enable for all PR branches
pipelinesascode.tekton.dev/on-cel-expression: |
(event == "push" && target_branch.matches("^(master|release-.*)$")) ||
(event == "pull_request" && (source_branch.matches("(konflux|appstudio|rhtap)") || body.pull_request.labels.exists(l, l.name == "konflux-build")))
(event == "push" && target_branch.matches("^(master|release-.*)$"))
labels:
appstudio.openshift.io/application: acs
appstudio.openshift.io/component: main
Expand Down
3 changes: 1 addition & 2 deletions .tekton/operator-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ metadata:
pipelinesascode.tekton.dev/max-keep-runs: "500"
# TODO(ROX-21073): re-enable for all PR branches
pipelinesascode.tekton.dev/on-cel-expression: |
(event == "push" && target_branch.matches("^(master|release-.*)$")) ||
(event == "pull_request" && (source_branch.matches("(konflux|appstudio|rhtap)") || body.pull_request.labels.exists(l, l.name == "konflux-build")))
(event == "push" && target_branch.matches("^(master|release-.*)$"))
labels:
appstudio.openshift.io/application: acs
appstudio.openshift.io/component: operator
Expand Down
3 changes: 1 addition & 2 deletions .tekton/operator-bundle-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ metadata:
pipelinesascode.tekton.dev/max-keep-runs: "500"
# TODO(ROX-21073): re-enable for all PR branches
pipelinesascode.tekton.dev/on-cel-expression: |
(event == "push" && target_branch.matches("^(master|release-.*)$")) ||
(event == "pull_request" && (source_branch.matches("(konflux|appstudio|rhtap)") || body.pull_request.labels.exists(l, l.name == "konflux-build")))
(event == "push" && target_branch.matches("^(master|release-.*)$"))
labels:
appstudio.openshift.io/application: acs
appstudio.openshift.io/component: operator-bundle
Expand Down
Loading