Skip to content

Commit 9bc4a01

Browse files
openshift-pipelines-botpramodbindal
authored andcommitted
[bot:release-v1.20.x] update konflux configuration
Generated by workflow [Generate konflux configurations](https://github.com/openshift-pipelines/hack/actions/runs/22854522302) Triggered by github-merge-queue[bot]
1 parent 210663c commit 9bc4a01

13 files changed

+272
-67
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Generated for Konflux Application openshift-pipelines-core by openshift-pipelines/hack. DO NOT EDIT
2+
name: auto-merge-upstream
3+
4+
on:
5+
workflow_dispatch: {}
6+
7+
jobs:
8+
auto-approve-and-merge:
9+
# This line prevents the job from running if CodeFreeze is true
10+
if: true
11+
runs-on: ubuntu-latest
12+
permissions:
13+
pull-requests: write
14+
steps:
15+
- name: Checkout the current repo
16+
uses: actions/checkout@v5
17+
- name: List PRs
18+
id: list-prs
19+
run: |
20+
echo "Listing PRs"
21+
gh auth status
22+
git config user.name openshift-pipelines-bot
23+
git config user.email pipelines-extcomm@redhat.com
24+
25+
pr_list=$(gh pr list \
26+
--state open \
27+
--base release-v1.20.x \
28+
--search 'label:upstream,label:hack -label:do-not-merge/hold' \
29+
--json number \
30+
--jq '.[]|.number')
31+
32+
success_pr_list=$(gh pr list \
33+
--state open \
34+
--base release-v1.20.x \
35+
--search 'label:upstream,label:hack -label:do-not-merge/hold' \
36+
--json number,title,statusCheckRollup \
37+
--jq ' .[]| select((.statusCheckRollup // [])| all(.conclusion == "SUCCESS" or .conclusion == "SKIPPED"))| "\(.number)"')
38+
39+
echo "pr_list=$pr_list" >> "$GITHUB_OUTPUT"
40+
echo "success_pr_list=$success_pr_list" >> "$GITHUB_OUTPUT"
41+
env:
42+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
44+
- name: Approve and add LGTM Label
45+
run: |
46+
# Approve and merge pull-request with no reviews
47+
for p in $pr_list; do
48+
echo "Adding lgtm label to PR $p"
49+
gh pr edit $p --add-label "lgtm" --add-label "approved" || true
50+
done
51+
env:
52+
pr_list: ${{ steps.list-prs.outputs.pr_list }}
53+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
- name: Merging PRs
55+
run: |
56+
# Approve and merge pull-request with no reviews
57+
for p in $success_pr_list; do
58+
echo "Merging PR $p"
59+
gh pr merge --rebase --delete-branch --auto $p
60+
done
61+
env:
62+
success_pr_list: ${{ steps.list-prs.outputs.success_pr_list }}
63+
GH_TOKEN: ${{ secrets.OPENSHIFT_PIPELINES_ROBOT }}
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# Generated for Konflux Application openshift-pipelines-core by openshift-pipelines/hack. DO NOT EDIT
2+
name: update-sources
3+
on:
4+
workflow_dispatch: {}
5+
push:
6+
branches:
7+
- release-v1.20.x
8+
paths:
9+
- .github/workflows/update-sources.yaml
10+
jobs:
11+
update-sources:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
steps:
17+
- name: Checkout the current repo
18+
uses: actions/checkout@v4
19+
with:
20+
ref: release-v1.20.x
21+
22+
- name: Clone tektoncd/operator
23+
run: |
24+
rm -fR upstream
25+
git clone https://github.com/tektoncd/operator upstream
26+
pushd upstream
27+
git checkout -B release-v1.20.x origin/release-v1.20.x
28+
popd
29+
- name: fetch-payload
30+
run: |
31+
pushd upstream
32+
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
33+
popd
34+
35+
if [[ "$BRANCH_NAME" != "main" ]] && [[ -z $(git status --porcelain --untracked-files=no) ]]; then
36+
echo "No change, do nothing"
37+
# exit 0
38+
fi
39+
# Operator SDK
40+
export OPERATOR_SDK_DL_URL=https://github.com/operator-framework/operator-sdk/releases/download/v1.37.0/operator-sdk_linux_amd64
41+
curl -LO ${OPERATOR_SDK_DL_URL}
42+
chmod +x operator-sdk_linux_amd64 && sudo mv operator-sdk_linux_amd64 /usr/local/bin/operator-sdk
43+
44+
operator-sdk version
45+
46+
# Python with requirements (yaml here)
47+
# We could migrate to go...
48+
python3 -m venv sync-sources
49+
source sync-sources/bin/activate
50+
pip3 install -r requirements.txt
51+
52+
# Update operator's payload and stuff
53+
make update-payload-and-reference
54+
pushd upstream
55+
rm -fR cmd/openshift/operator/kodata operatorhub
56+
git checkout HEAD .
57+
popd
58+
59+
- name: Commit new changes
60+
run: |
61+
62+
set -x
63+
64+
git config user.name openshift-pipelines-bot
65+
git config user.email pipelines-extcomm@redhat.com
66+
git checkout -b actions/update/sources-release-v1.20.x
67+
touch head
68+
pushd upstream
69+
OLD_COMMIT=$(cat ../head)
70+
NEW_COMMIT=$(git rev-parse HEAD)
71+
echo Previous commit: ${OLD_COMMIT}
72+
git show --stat ${OLD_COMMIT}
73+
echo New commit: ${NEW_COMMIT}
74+
git show --stat ${NEW_COMMIT}
75+
git diff --stat ${NEW_COMMIT}..${OLD_COMMIT} > /tmp/diff.txt
76+
git rev-parse HEAD > ../head
77+
popd
78+
rm -rf upstream/.git
79+
git add -f upstream head .konflux
80+
git add project.yaml
81+
82+
if [[ -z $(git status --porcelain --untracked-files=no) ]]; then
83+
echo "No change, exiting"
84+
exit 0
85+
fi
86+
87+
git commit -F- <<EOF
88+
[bot] Update release-v1.20.x from tektoncd/operator to ${NEW_COMMIT}
89+
90+
$ git diff --stat ${NEW_COMMIT}..${OLD_COMMIT}
91+
$(cat /tmp/diff.txt | sed 's/^/ /' | head -c 55555)
92+
93+
https://github.com/tektoncd/operator/compare/${NEW_COMMIT}..${OLD_COMMIT}
94+
EOF
95+
96+
git push -f origin actions/update/sources-release-v1.20.x
97+
98+
if [ "$(gh pr list --base release-v1.20.x --head actions/update/sources-release-v1.20.x --json url --jq 'length')" = "0" ]; then
99+
echo "creating PR..."
100+
gh pr create -B release-v1.20.x -H actions/update/sources-release-v1.20.x --label=automated --label=upstream --fill
101+
else
102+
echo "a PR already exists, editing..."
103+
gh pr edit --title "[bot] Update release-v1.20.x from tektoncd/operator to ${NEW_COMMIT}" --body "$(cat /tmp/diff.txt | sed 's/^/ /' | head -c 55555)"
104+
fi
105+
env:
106+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.konflux/dockerfiles/operator.Dockerfile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG GO_BUILDER=registry.access.redhat.com/ubi9/go-toolset:9.7-1772454089
1+
ARG GO_BUILDER=registry.access.redhat.com/ubi9/go-toolset:1.25
22
ARG RUNTIME=registry.access.redhat.com/ubi9/ubi-minimal:latest@sha256:c7d44146f826037f6873d99da479299b889473492d3c1ab8af86f08af04ec8a0
33

44
FROM $GO_BUILDER AS builder
@@ -23,16 +23,16 @@ COPY .konflux/olm-catalog/bundle/kodata /kodata
2323
COPY head ${KO_DATA_PATH}/HEAD
2424

2525
LABEL \
26-
com.redhat.component="openshift-pipelines-rhel9-operator-container" \
27-
name="openshift-pipelines/pipelines-rhel9-operator" \
28-
version="1.20.0" \
29-
summary="Red Hat OpenShift Pipelines Operator" \
30-
maintainer="pipelines-extcomm@redhat.com" \
31-
description="Red Hat OpenShift Pipelines Operator" \
32-
io.k8s.display-name="Red Hat OpenShift Pipelines Operator" \
33-
io.k8s.description="Red Hat OpenShift Pipelines Operator" \
34-
io.openshift.tags="operator,tekton,openshift" \
35-
cpe="cpe:/a:redhat:openshift_pipelines:1.20::el9"
26+
com.redhat.component="openshift-pipelines-rhel9-operator-container" \
27+
cpe="cpe:/a:redhat:openshift_pipelines:1.20::el9" \
28+
description="Red Hat OpenShift Pipelines operator operator" \
29+
io.k8s.description="Red Hat OpenShift Pipelines operator operator" \
30+
io.k8s.display-name="Red Hat OpenShift Pipelines operator operator" \
31+
io.openshift.tags="tekton,openshift,operator,operator" \
32+
maintainer="pipelines-extcomm@redhat.com" \
33+
name="openshift-pipelines/pipelines-rhel9-operator" \
34+
summary="Red Hat OpenShift Pipelines operator operator" \
35+
version="v1.20.4"
3636

3737
RUN groupadd -r -g 65532 nonroot && useradd --no-log-init -r -u 65532 -g nonroot nonroot
3838
USER 65532

.konflux/dockerfiles/proxy.Dockerfile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG GO_BUILDER=registry.access.redhat.com/ubi9/go-toolset:9.7-1772454089
1+
ARG GO_BUILDER=registry.access.redhat.com/ubi9/go-toolset:1.25
22
ARG RUNTIME=registry.access.redhat.com/ubi9/ubi-minimal:latest@sha256:c7d44146f826037f6873d99da479299b889473492d3c1ab8af86f08af04ec8a0
33

44
FROM $GO_BUILDER as builder
@@ -21,16 +21,16 @@ COPY --from=builder /tmp/openshift-pipelines-operator-proxy ${OPERATOR_PROXY}
2121
COPY head ${KO_DATA_PATH}/HEAD
2222

2323
LABEL \
24-
com.redhat.component="openshift-pipelines-operator-proxy-rhel9-container" \
25-
name="openshift-pipelines/pipelines-operator-proxy-rhel9" \
26-
version="1.20.0" \
27-
summary="Red Hat OpenShift Pipelines Operator Proxy" \
28-
maintainer="pipelines-extcomm@redhat.com" \
29-
description="Red Hat OpenShift Pipelines Operator Proxy" \
30-
io.k8s.display-name="Red Hat OpenShift Pipelines Operator Proxy" \
31-
io.k8s.description="Red Hat OpenShift Pipelines Operator Proxy" \
32-
io.openshift.tags="operator,tekton,openshift,proxy" \
33-
cpe="cpe:/a:redhat:openshift_pipelines:1.20::el9"
24+
com.redhat.component="openshift-pipelines-operator-proxy-rhel9-container" \
25+
cpe="cpe:/a:redhat:openshift_pipelines:1.20::el9" \
26+
description="Red Hat OpenShift Pipelines operator proxy" \
27+
io.k8s.description="Red Hat OpenShift Pipelines operator proxy" \
28+
io.k8s.display-name="Red Hat OpenShift Pipelines operator proxy" \
29+
io.openshift.tags="tekton,openshift,operator,proxy" \
30+
maintainer="pipelines-extcomm@redhat.com" \
31+
name="openshift-pipelines/pipelines-operator-proxy-rhel9" \
32+
summary="Red Hat OpenShift Pipelines operator proxy" \
33+
version="v1.20.4"
3434

3535
RUN groupadd -r -g 65532 nonroot && useradd --no-log-init -r -u 65532 -g nonroot nonroot
3636
USER 65532

.konflux/dockerfiles/webhook.Dockerfile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG GO_BUILDER=registry.access.redhat.com/ubi9/go-toolset:9.7-1772454089
1+
ARG GO_BUILDER=registry.access.redhat.com/ubi9/go-toolset:1.25
22
ARG RUNTIME=registry.access.redhat.com/ubi9/ubi-minimal:latest@sha256:c7d44146f826037f6873d99da479299b889473492d3c1ab8af86f08af04ec8a0
33

44
FROM $GO_BUILDER AS builder
@@ -23,16 +23,16 @@ COPY .konflux/olm-catalog/bundle/kodata /kodata
2323
COPY head ${KO_DATA_PATH}/HEAD
2424

2525
LABEL \
26-
com.redhat.component="openshift-pipelines-operator-webhook-rhel9-container" \
27-
name="openshift-pipelines/pipelines-operator-webhook-rhel9" \
28-
version="1.20.0" \
29-
summary="Red Hat OpenShift Pipelines Operator Webhook" \
30-
maintainer="pipelines-extcomm@redhat.com" \
31-
description="Red Hat OpenShift Pipelines Operator Webhook" \
32-
io.k8s.display-name="Red Hat OpenShift Pipelines Operator Webhook" \
33-
io.k8s.description="Red Hat OpenShift Pipelines Operator Webhook" \
34-
io.openshift.tags="operator,tekton,openshift,webhook" \
35-
cpe="cpe:/a:redhat:openshift_pipelines:1.20::el9"
26+
com.redhat.component="openshift-pipelines-operator-webhook-rhel9-container" \
27+
cpe="cpe:/a:redhat:openshift_pipelines:1.20::el9" \
28+
description="Red Hat OpenShift Pipelines operator webhook" \
29+
io.k8s.description="Red Hat OpenShift Pipelines operator webhook" \
30+
io.k8s.display-name="Red Hat OpenShift Pipelines operator webhook" \
31+
io.openshift.tags="tekton,openshift,operator,webhook" \
32+
maintainer="pipelines-extcomm@redhat.com" \
33+
name="openshift-pipelines/pipelines-operator-webhook-rhel9" \
34+
summary="Red Hat OpenShift Pipelines operator webhook" \
35+
version="v1.20.4"
3636

3737
RUN groupadd -r -g 65532 nonroot && useradd --no-log-init -r -u 65532 -g nonroot nonroot
3838
USER 65532

.tekton/operator-1-20-bundle-pull-request.yaml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Generated for Konflux Application openshift-pipelines-operator-1.20 by openshift-pipelines/hack. DO NOT EDIT
1+
# Generated for Konflux Application openshift-pipelines-core by openshift-pipelines/hack. DO NOT EDIT
22
apiVersion: tekton.dev/v1
33
kind: PipelineRun
44
metadata:
@@ -12,12 +12,11 @@ metadata:
1212
pipelinesascode.tekton.dev/max-keep-runs: "3"
1313
pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch
1414
== "release-v1.20.x" &&
15-
((".konflux/patches/***".pathChanged() || ".konflux/olm-catalog/bundle/***".pathChanged()) ||
16-
".konflux/olm-catalog/bundle/Dockerfile".pathChanged() ||
15+
((".konflux/olm-catalog/bundle/***".pathChanged()) ||
16+
".konflux/dockerfiles/bundle.Dockerfile".pathChanged() ||
1717
".tekton/operator-1-20-bundle-pull-request.yaml".pathChanged())
18-
creationTimestamp: null
1918
labels:
20-
appstudio.openshift.io/application: openshift-pipelines-operator-1-20
19+
appstudio.openshift.io/application: openshift-pipelines-core-1-20
2120
appstudio.openshift.io/component: operator-1-20-bundle
2221
pipelines.appstudio.openshift.io/type: build
2322
name: operator-1-20-bundle-on-pull-request
@@ -26,14 +25,19 @@ spec:
2625
params:
2726
- name: git-url
2827
value: '{{source_url}}'
28+
- name: upstream-git-url
29+
value: 'https://github.com/tektoncd/operator'
2930
- name: revision
3031
value: '{{revision}}'
3132
- name: output-image
32-
value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/1-20/operator-bundle-rhel9:on-pr-{{revision}}
33+
value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/pipelines-operator-bundle:on-pr-{{revision}}
3334
- name: image-expires-after
3435
value: 5d
3536
- name: dockerfile
36-
value: .konflux/olm-catalog/bundle/Dockerfile
37+
value: .konflux/dockerfiles/bundle.Dockerfile
38+
- name: additional-tags
39+
value:
40+
- "on-pr-v1.20.4"
3741
- name: build-platforms
3842
value:
3943
- linux/x86_64

.tekton/operator-1-20-bundle-push.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Generated for Konflux Application openshift-pipelines-operator-1.20 by openshift-pipelines/hack. DO NOT EDIT
1+
# Generated for Konflux Application openshift-pipelines-core by openshift-pipelines/hack. DO NOT EDIT
22
apiVersion: tekton.dev/v1
33
kind: PipelineRun
44
metadata:
@@ -11,12 +11,12 @@ metadata:
1111
pipelinesascode.tekton.dev/max-keep-runs: "3"
1212
pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch
1313
== "release-v1.20.x" &&
14-
((".konflux/patches/***".pathChanged() || ".konflux/olm-catalog/bundle/***".pathChanged()) ||
15-
".konflux/olm-catalog/bundle/Dockerfile".pathChanged() ||
14+
((".konflux/olm-catalog/bundle/***".pathChanged()) ||
15+
".konflux/dockerfiles/bundle.Dockerfile".pathChanged() ||
1616
".tekton/operator-1-20-bundle-push.yaml".pathChanged())
1717
creationTimestamp: null
1818
labels:
19-
appstudio.openshift.io/application: openshift-pipelines-operator-1-20
19+
appstudio.openshift.io/application: openshift-pipelines-core-1-20
2020
appstudio.openshift.io/component: operator-1-20-bundle
2121
pipelines.appstudio.openshift.io/type: build
2222
name: operator-1-20-bundle-on-push
@@ -25,12 +25,17 @@ spec:
2525
params:
2626
- name: git-url
2727
value: '{{source_url}}'
28+
- name: upstream-git-url
29+
value: 'https://github.com/tektoncd/operator'
2830
- name: revision
2931
value: '{{revision}}'
3032
- name: output-image
31-
value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/1-20/operator-bundle-rhel9:{{revision}}
33+
value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/pipelines-operator-bundle:{{revision}}
3234
- name: dockerfile
33-
value: .konflux/olm-catalog/bundle/Dockerfile
35+
value: .konflux/dockerfiles/bundle.Dockerfile
36+
- name: additional-tags
37+
value:
38+
- "v1.20.4"
3439
- name: build-platforms
3540
value:
3641
- linux/x86_64

.tekton/operator-1-20-operator-pull-request.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Generated for Konflux Application openshift-pipelines-operator-1.20 by openshift-pipelines/hack. DO NOT EDIT
1+
# Generated for Konflux Application openshift-pipelines-core by openshift-pipelines/hack. DO NOT EDIT
22
apiVersion: tekton.dev/v1
33
kind: PipelineRun
44
metadata:
@@ -15,9 +15,8 @@ metadata:
1515
("upstream/***".pathChanged() || ".konflux/patches/***".pathChanged() || ".konflux/rpms/***".pathChanged() ||
1616
".konflux/dockerfiles/operator.Dockerfile".pathChanged() ||
1717
".tekton/operator-1-20-operator-pull-request.yaml".pathChanged())
18-
creationTimestamp: null
1918
labels:
20-
appstudio.openshift.io/application: openshift-pipelines-operator-1-20
19+
appstudio.openshift.io/application: openshift-pipelines-core-1-20
2120
appstudio.openshift.io/component: operator-1-20-operator
2221
pipelines.appstudio.openshift.io/type: build
2322
name: operator-1-20-operator-on-pull-request
@@ -26,14 +25,19 @@ spec:
2625
params:
2726
- name: git-url
2827
value: '{{source_url}}'
28+
- name: upstream-git-url
29+
value: 'https://github.com/tektoncd/operator'
2930
- name: revision
3031
value: '{{revision}}'
3132
- name: output-image
32-
value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/1-20/operator-operator-rhel9:on-pr-{{revision}}
33+
value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/pipelines-rhel9-operator:on-pr-{{revision}}
3334
- name: image-expires-after
3435
value: 5d
3536
- name: dockerfile
3637
value: .konflux/dockerfiles/operator.Dockerfile
38+
- name: additional-tags
39+
value:
40+
- "on-pr-v1.20.4"
3741
- name: build-platforms
3842
value:
3943
- linux/x86_64

0 commit comments

Comments
 (0)