Skip to content

Commit eca94ca

Browse files
openshift-pipelines-botpramodbindal
authored andcommitted
[bot:release-v1.22.x] update konflux configuration
1 parent c6eb273 commit eca94ca

File tree

4 files changed

+67
-35
lines changed

4 files changed

+67
-35
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Generated for Konflux Application openshift-pipelines-core by openshift-pipelines/hack. DO NOT EDIT
2+
name: auto-merge-upstream-tektoncd-chains
3+
4+
on:
5+
workflow_dispatch: {}
6+
schedule:
7+
- cron: "*/30 * * * *" # At every 30 minutes
8+
9+
jobs:
10+
auto-approve:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
pull-requests: write
14+
steps:
15+
- name: Checkout the current repo
16+
uses: actions/checkout@v4
17+
- name: auto-merge-upstream-tektoncd-chains
18+
run: |
19+
gh auth status
20+
git config user.name openshift-pipelines-bot
21+
git config user.email [email protected]
22+
# Approve and merge pull-request with no reviews
23+
for p in $(gh pr list --search "head:actions/update/sources-tektoncd-chains" --json "number" | jq ".[].number"); do
24+
gh pr merge --rebase --delete-branch --auto $p
25+
done
26+
env:
27+
GH_TOKEN: ${{ secrets.OPENSHIFT_PIPELINES_ROBOT }}
28+
Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,40 @@
1-
# Generated by openshift-pipelines/hack. DO NOT EDIT.
2-
name: update-sources
1+
# Generated for Konflux Application openshift-pipelines-core by openshift-pipelines/hack. DO NOT EDIT
2+
name: update-sources-tektoncd-chains
33

44
on:
55
workflow_dispatch: {}
66
schedule:
7-
- cron: "0 1 * * 1" # At 1AM every monday
7+
- cron: "0 1 * * *" # At 1AM everyday
88

99
jobs:
1010

1111
update-sources:
1212
runs-on: ubuntu-latest
13-
if: github.repository_owner == 'openshift-pipelines' # do not run this elsewhere
1413
permissions:
1514
contents: write
1615
pull-requests: write
1716
steps:
1817
- name: Checkout the current repo
1918
uses: actions/checkout@v4
2019
with:
21-
ref: next
20+
ref: release-v1.22.x
2221

2322
- name: Clone tektoncd/chains
2423
run: |
2524
rm -fR upstream
2625
git clone https://github.com/tektoncd/chains upstream
2726
pushd upstream
28-
git checkout -B release-v0.24.x origin/release-v0.24.x
27+
git checkout -B release-v0.26.x origin/release-v0.26.x
2928
popd
30-
31-
3229
- name: Commit new changes
3330
run: |
31+
32+
set -x
33+
3434
git config user.name openshift-pipelines-bot
3535
git config user.email [email protected]
36-
git checkout -b actions/update/sources-next
36+
git checkout -b actions/update/sources-release-v1.22.x
37+
touch head
3738
pushd upstream
3839
OLD_COMMIT=$(cat ../head)
3940
NEW_COMMIT=$(git rev-parse HEAD)
@@ -53,22 +54,22 @@ jobs:
5354
fi
5455
5556
git commit -F- <<EOF
56-
[bot] Update next from tektoncd/chains to ${NEW_COMMIT}
57+
[bot] Update release-v1.22.x from tektoncd/chains to ${NEW_COMMIT}
5758
5859
$ git diff --stat ${NEW_COMMIT}..${OLD_COMMIT}
5960
$(cat /tmp/diff.txt | sed 's/^/ /' | head -c 55555)
6061
6162
https://github.com/tektoncd/chains/compare/${NEW_COMMIT}..${OLD_COMMIT}
6263
EOF
6364
64-
git push -f origin actions/update/sources-next
65+
git push -f origin actions/update/sources-release-v1.22.x
6566
66-
if [ "$(gh pr list --base next --head actions/update/sources-next --json url --jq 'length')" = "0" ]; then
67+
if [ "$(gh pr list --base release-v1.22.x --head actions/update/sources-release-v1.22.x --json url --jq 'length')" = "0" ]; then
6768
echo "creating PR..."
68-
gh pr create -B next -H actions/update/sources-next --label=automated --label=upstream --fill
69+
gh pr create -B release-v1.22.x -H actions/update/sources-release-v1.22.x --label=automated --label=upstream --fill
6970
else
7071
echo "a PR already exists, editing..."
71-
gh pr edit --title "[bot] Update next from tektoncd/chains to ${NEW_COMMIT}" --body "$(cat /tmp/diff.txt | sed 's/^/ /' | head -c 55555)"
72+
gh pr edit --title "[bot] Update release-v1.22.x from tektoncd/chains to ${NEW_COMMIT}" --body "$(cat /tmp/diff.txt | sed 's/^/ /' | head -c 55555)"
7273
fi
7374
env:
7475
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.tekton/tektoncd-chains-next-controller-pull-request.yaml renamed to .tekton/tektoncd-chains-1-22-controller-pull-request.yaml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Generated for Konflux Application openshift-pipelines-core-next 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,31 +11,32 @@ metadata:
1111
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
1212
pipelinesascode.tekton.dev/max-keep-runs: "3"
1313
pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch
14-
== "next" &&
14+
== "release-v1.22.x" &&
1515
("upstream/***".pathChanged() || ".konflux/patches/***".pathChanged() || ".konflux/rpms/***".pathChanged() ||
1616
".konflux/dockerfiles/controller.Dockerfile".pathChanged() ||
17-
".tekton/tektoncd-chains-next-controller-pull-request.yaml".pathChanged())
18-
creationTimestamp: null
17+
".tekton/tektoncd-chains-1-22-controller-pull-request.yaml".pathChanged())
1918
labels:
20-
appstudio.openshift.io/application: openshift-pipelines-core-next
21-
appstudio.openshift.io/component: tektoncd-chains-next-controller
19+
appstudio.openshift.io/application: openshift-pipelines-core-1-22
20+
appstudio.openshift.io/component: tektoncd-chains-controller-1-22
2221
pipelines.appstudio.openshift.io/type: build
23-
name: tektoncd-chains-next-controller-on-pull-request
22+
name: tektoncd-chains-1-22-controller-on-pull-request
2423
namespace: tekton-ecosystem-tenant
2524
spec:
2625
params:
2726
- name: git-url
2827
value: '{{source_url}}'
29-
- name: upstream-git-url
30-
value: 'https://github.com/tektoncd/chains'
3128
- name: revision
3229
value: '{{revision}}'
3330
- name: output-image
34-
value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/next/chains-controller-rhel9:on-pr-{{revision}}
31+
value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/pipelines-chains-controller-rhel9:on-pr-{{revision}}
3532
- name: image-expires-after
3633
value: 5d
3734
- name: dockerfile
3835
value: .konflux/dockerfiles/controller.Dockerfile
36+
- name: additional-tags
37+
value:
38+
- "on-pr1.22"
39+
- "on-pr-1.22.0"
3940
- name: build-platforms
4041
value:
4142
- linux/x86_64
@@ -45,7 +46,7 @@ spec:
4546
pipelineRef:
4647
name: docker-build-ta
4748
taskRunTemplate:
48-
serviceAccountName: build-pipeline-tektoncd-chains-next-controller
49+
serviceAccountName: build-pipeline-tektoncd-chains-controller-1-22
4950
workspaces:
5051
- name: git-auth
5152
secret:

.tekton/tektoncd-chains-next-controller-push.yaml renamed to .tekton/tektoncd-chains-1-22-controller-push.yaml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Generated for Konflux Application openshift-pipelines-core-next 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:
@@ -10,36 +10,38 @@ metadata:
1010
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
1111
pipelinesascode.tekton.dev/max-keep-runs: "3"
1212
pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch
13-
== "next" &&
13+
== "release-v1.22.x" &&
1414
("upstream/***".pathChanged() || ".konflux/patches/***".pathChanged() || ".konflux/rpms/***".pathChanged() ||
1515
".konflux/dockerfiles/controller.Dockerfile".pathChanged() ||
16-
".tekton/tektoncd-chains-next-controller-push.yaml".pathChanged())
16+
".tekton/tektoncd-chains-1-22-controller-push.yaml".pathChanged())
1717
creationTimestamp: null
1818
labels:
19-
appstudio.openshift.io/application: openshift-pipelines-core-next
20-
appstudio.openshift.io/component: tektoncd-chains-next-controller
19+
appstudio.openshift.io/application: openshift-pipelines-core-1-22
20+
appstudio.openshift.io/component: tektoncd-chains-controller-1-22
2121
pipelines.appstudio.openshift.io/type: build
22-
name: tektoncd-chains-next-controller-on-push
22+
name: tektoncd-chains-1-22-controller-on-push
2323
namespace: tekton-ecosystem-tenant
2424
spec:
2525
params:
2626
- name: git-url
2727
value: '{{source_url}}'
2828
- name: revision
2929
value: '{{revision}}'
30-
- name: upstream-git-url
31-
value: 'https://github.com/tektoncd/chains'
3230
- name: output-image
33-
value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/next/chains-controller-rhel9:{{revision}}
31+
value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/pipelines-chains-controller-rhel9:{{revision}}
3432
- name: dockerfile
3533
value: .konflux/dockerfiles/controller.Dockerfile
34+
- name: additional-tags
35+
value:
36+
- "1.22"
37+
- "1.22.0"
3638
- name: prefetch-input
3739
value: |
3840
{"type": "rpm", "path": ".konflux/rpms"}
3941
pipelineRef:
4042
name: docker-build-ta
4143
taskRunTemplate:
42-
serviceAccountName: build-pipeline-tektoncd-chains-next-controller
44+
serviceAccountName: build-pipeline-tektoncd-chains-controller-1-22
4345
workspaces:
4446
- name: git-auth
4547
secret:

0 commit comments

Comments
 (0)