Skip to content

Commit b2da306

Browse files
author
openshift-pipelines-bot
committed
[bot:release-v1.22.x] update konflux configuration
1 parent 7009f99 commit b2da306

7 files changed

+157
-122
lines changed

.github/renovate.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"github>konflux-ci/mintmaker//config/renovate/renovate.json"
5+
],
6+
"enabledManagers": [
7+
"tekton",
8+
"dockerfile",
9+
"rpm-lockfile"
10+
],
11+
"addLabels": [
12+
"approved",
13+
"lgtm",
14+
"konflux",
15+
"mintmaker"
16+
],
17+
"ignorePaths": ["upstream/**"],
18+
"autoApprove": true,
19+
"packageRules": [
20+
{
21+
"matchPackageNames": ["*"],
22+
"automerge": true
23+
}
24+
]
25+
}
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-p12n-console-plugin
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-p12n-console-plugin
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-p12n-console-plugin" --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: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Generated for Konflux Application openshift-pipelines-core by openshift-pipelines/hack. DO NOT EDIT
2+
name: update-sources-p12n-console-plugin
3+
4+
on:
5+
workflow_dispatch: {}
6+
schedule:
7+
- cron: "0 1 * * *" # At 1AM everyday
8+
9+
jobs:
10+
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.22.x
21+
22+
- name: Clone openshift-pipelines/console-plugin
23+
run: |
24+
rm -fR upstream
25+
git clone https://github.com/openshift-pipelines/console-plugin upstream
26+
pushd upstream
27+
git checkout -B main origin/main
28+
popd
29+
- name: Commit new changes
30+
run: |
31+
32+
set -x
33+
34+
git config user.name openshift-pipelines-bot
35+
git config user.email [email protected]
36+
git checkout -b actions/update/sources-release-v1.22.x
37+
touch head
38+
pushd upstream
39+
OLD_COMMIT=$(cat ../head)
40+
NEW_COMMIT=$(git rev-parse HEAD)
41+
echo Previous commit: ${OLD_COMMIT}
42+
git show --stat ${OLD_COMMIT}
43+
echo New commit: ${NEW_COMMIT}
44+
git show --stat ${NEW_COMMIT}
45+
git diff --stat ${NEW_COMMIT}..${OLD_COMMIT} > /tmp/diff.txt
46+
git rev-parse HEAD > ../head
47+
popd
48+
rm -rf upstream/.git
49+
git add -f upstream head .konflux
50+
51+
if [[ -z $(git status --porcelain --untracked-files=no) ]]; then
52+
echo "No change, exiting"
53+
exit 0
54+
fi
55+
56+
git commit -F- <<EOF
57+
[bot] Update release-v1.22.x from openshift-pipelines/console-plugin to ${NEW_COMMIT}
58+
59+
$ git diff --stat ${NEW_COMMIT}..${OLD_COMMIT}
60+
$(cat /tmp/diff.txt | sed 's/^/ /' | head -c 55555)
61+
62+
https://github.com/openshift-pipelines/console-plugin/compare/${NEW_COMMIT}..${OLD_COMMIT}
63+
EOF
64+
65+
git push -f origin actions/update/sources-release-v1.22.x
66+
67+
if [ "$(gh pr list --base release-v1.22.x --head actions/update/sources-release-v1.22.x --json url --jq 'length')" = "0" ]; then
68+
echo "creating PR..."
69+
gh pr create -B release-v1.22.x -H actions/update/sources-release-v1.22.x --label=automated --label=upstream --fill
70+
else
71+
echo "a PR already exists, editing..."
72+
gh pr edit --title "[bot] Update release-v1.22.x from openshift-pipelines/console-plugin to ${NEW_COMMIT}" --body "$(cat /tmp/diff.txt | sed 's/^/ /' | head -c 55555)"
73+
fi
74+
env:
75+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.tekton/console-plugin-main-console-plugin-pull-request.yaml

Lines changed: 0 additions & 51 deletions
This file was deleted.

.tekton/console-plugin-next-console-plugin-push.yaml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.tekton/console-plugin-next-console-plugin-pull-request.yaml renamed to .tekton/p12n-console-plugin-1-22-console-plugin-pull-request.yaml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
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:
55
annotations:
66
pipelinesascode.tekton.dev/cancel-in-progress: "true" # Cancel in-progress pipelines
77
pipelinesascode.tekton.dev/pipeline: "https://raw.githubusercontent.com/openshift-pipelines/operator/refs/heads/main/.tekton/docker-build-ta.yaml"
8-
build.appstudio.openshift.io/repo: https://github.com/openshift-pipelines/console-plugin.git?rev={{revision}}
8+
build.appstudio.openshift.io/repo: https://github.com/openshift-pipelines/p12n-console-plugin.git?rev={{revision}}
99
build.appstudio.redhat.com/commit_sha: '{{revision}}'
1010
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
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-
== "main" &&
15-
("***".pathChanged() ||
14+
== "release-v1.22.x" &&
15+
("upstream/***".pathChanged() || ".konflux/patches/***".pathChanged() || ".konflux/rpms/***".pathChanged() ||
1616
".konflux/dockerfiles/console-plugin.Dockerfile".pathChanged() ||
17-
".tekton/console-plugin-next-console-plugin-pull-request.yaml".pathChanged())
18-
creationTimestamp: null
17+
".tekton/p12n-console-plugin-1-22-console-plugin-pull-request.yaml".pathChanged())
1918
labels:
20-
appstudio.openshift.io/application: openshift-pipelines-core-next
21-
appstudio.openshift.io/component: console-plugin-next-console-plugin
19+
appstudio.openshift.io/application: openshift-pipelines-core-1-22
20+
appstudio.openshift.io/component: p12n-console-plugin-console-plugin-1-22
2221
pipelines.appstudio.openshift.io/type: build
23-
name: console-plugin-next-console-plugin-on-pull-request
22+
name: p12n-console-plugin-1-22-console-plugin-on-pull-request
2423
namespace: tekton-ecosystem-tenant
2524
spec:
2625
params:
@@ -29,21 +28,25 @@ spec:
2928
- name: revision
3029
value: '{{revision}}'
3130
- name: output-image
32-
value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/next/console-plugin-rhel9:on-pr-{{revision}}
31+
value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/console-plugin-rhel9:on-pr-{{revision}}
3332
- name: image-expires-after
3433
value: 5d
3534
- name: dockerfile
3635
value: .konflux/dockerfiles/console-plugin.Dockerfile
36+
- name: additional-tags
37+
value:
38+
- "on-pr1.22"
39+
- "on-pr-1.22.0"
3740
- name: build-platforms
3841
value:
3942
- linux/x86_64
4043
- name: prefetch-input
4144
value: |
42-
{"type": "rpm", "path": ".konflux/rpms"}
45+
[{"type": "rpm", "path": ".konflux/rpms"}, {"type": "yarn", "path": "upstream"}]
4346
pipelineRef:
4447
name: docker-build-ta
4548
taskRunTemplate:
46-
serviceAccountName: build-pipeline-console-plugin-next-console-plugin
49+
serviceAccountName: build-pipeline-p12n-console-plugin-console-plugin-1-22
4750
workspaces:
4851
- name: git-auth
4952
secret:

.tekton/console-plugin-main-console-plugin-push.yaml renamed to .tekton/p12n-console-plugin-1-22-console-plugin-push.yaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
# Generated for Konflux Application openshift-pipelines-core-main 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:
55
annotations:
66
pipelinesascode.tekton.dev/cancel-in-progress: "true" # Cancel in-progress pipelines
77
pipelinesascode.tekton.dev/pipeline: "https://raw.githubusercontent.com/openshift-pipelines/operator/refs/heads/main/.tekton/docker-build-ta.yaml"
8-
build.appstudio.openshift.io/repo: https://github.com/openshift-pipelines/console-plugin.git?rev={{revision}}
8+
build.appstudio.openshift.io/repo: https://github.com/openshift-pipelines/p12n-console-plugin.git?rev={{revision}}
99
build.appstudio.redhat.com/commit_sha: '{{revision}}'
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-
== "main" &&
14-
("***".pathChanged() ||
13+
== "release-v1.22.x" &&
14+
("upstream/***".pathChanged() || ".konflux/patches/***".pathChanged() || ".konflux/rpms/***".pathChanged() ||
1515
".konflux/dockerfiles/console-plugin.Dockerfile".pathChanged() ||
16-
".tekton/console-plugin-main-console-plugin-push.yaml".pathChanged())
16+
".tekton/p12n-console-plugin-1-22-console-plugin-push.yaml".pathChanged())
1717
creationTimestamp: null
1818
labels:
19-
appstudio.openshift.io/application: openshift-pipelines-core-main
20-
appstudio.openshift.io/component: console-plugin-main-console-plugin
19+
appstudio.openshift.io/application: openshift-pipelines-core-1-22
20+
appstudio.openshift.io/component: p12n-console-plugin-console-plugin-1-22
2121
pipelines.appstudio.openshift.io/type: build
22-
name: console-plugin-main-console-plugin-on-push
22+
name: p12n-console-plugin-1-22-console-plugin-on-push
2323
namespace: tekton-ecosystem-tenant
2424
spec:
2525
params:
@@ -28,20 +28,20 @@ spec:
2828
- name: revision
2929
value: '{{revision}}'
3030
- name: output-image
31-
value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/main/console-plugin-rhel9:{{revision}}
31+
value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/console-plugin-rhel9:{{revision}}
3232
- name: dockerfile
3333
value: .konflux/dockerfiles/console-plugin.Dockerfile
34-
- name: build-platforms
34+
- name: additional-tags
3535
value:
36-
- linux/x86_64
37-
- linux-m2xlarge/arm64
36+
- "1.22"
37+
- "1.22.0"
3838
- name: prefetch-input
3939
value: |
40-
{"type": "rpm", "path": ".konflux/rpms"}
40+
[{"type": "rpm", "path": ".konflux/rpms"}, {"type": "yarn", "path": "upstream"}]
4141
pipelineRef:
4242
name: docker-build-ta
4343
taskRunTemplate:
44-
serviceAccountName: build-pipeline-console-plugin-main-console-plugin
44+
serviceAccountName: build-pipeline-p12n-console-plugin-console-plugin-1-22
4545
workspaces:
4646
- name: git-auth
4747
secret:

0 commit comments

Comments
 (0)