Skip to content

Commit ac0d2c0

Browse files
openshift-pipelines-botdivyansh42
authored andcommitted
[bot:main] update konflux configuration
1 parent 0735690 commit ac0d2c0

7 files changed

+297
-2
lines changed

.github/renovate.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"extends": [
44
"github>konflux-ci/mintmaker//config/renovate/renovate.json"
55
],
6-
"branchPrefix": "osp-mintmaker/",
76
"enabledManagers": [
87
"tekton",
98
"dockerfile",
@@ -15,11 +14,14 @@
1514
"konflux",
1615
"mintmaker"
1716
],
17+
"ignorePaths": ["upstream/**"],
18+
1819
"autoApprove": true,
1920
"packageRules": [
2021
{
2122
"matchPackageNames": ["*"],
22-
"automerge": true
23+
"automerge": true,
24+
"ignorePaths": ["upstream/**"]
2325
}
2426
]
2527
}
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-manual-approval-gate
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-manual-approval-gate
18+
run: |
19+
gh auth status
20+
git config user.name openshift-pipelines-bot
21+
git config user.email pipelines-extcomm@redhat.com
22+
# Approve and merge pull-request with no reviews
23+
for p in $(gh pr list --search "head:actions/update/sources-manual-approval-gate" --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-manual-approval-gate
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: main
21+
22+
- name: Clone openshift-pipelines/manual-approval-gate
23+
run: |
24+
rm -fR upstream
25+
git clone https://github.com/openshift-pipelines/manual-approval-gate 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 pipelines-extcomm@redhat.com
36+
git checkout -b actions/update/sources-main
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 main from openshift-pipelines/manual-approval-gate 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/manual-approval-gate/compare/${NEW_COMMIT}..${OLD_COMMIT}
63+
EOF
64+
65+
git push -f origin actions/update/sources-main
66+
67+
if [ "$(gh pr list --base main --head actions/update/sources-main --json url --jq 'length')" = "0" ]; then
68+
echo "creating PR..."
69+
gh pr create -B main -H actions/update/sources-main --label=automated --label=upstream --fill
70+
else
71+
echo "a PR already exists, editing..."
72+
gh pr edit --title "[bot] Update main from openshift-pipelines/manual-approval-gate to ${NEW_COMMIT}" --body "$(cat /tmp/diff.txt | sed 's/^/ /' | head -c 55555)"
73+
fi
74+
env:
75+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Generated for Konflux Application openshift-pipelines-core by openshift-pipelines/hack. DO NOT EDIT
2+
apiVersion: tekton.dev/v1
3+
kind: PipelineRun
4+
metadata:
5+
annotations:
6+
pipelinesascode.tekton.dev/cancel-in-progress: "true" # Cancel in-progress pipelines
7+
pipelinesascode.tekton.dev/pipeline: "https://raw.githubusercontent.com/openshift-pipelines-konflux/tektoncd-operator/refs/heads/main/.tekton/docker-build-ta.yaml"
8+
build.appstudio.openshift.io/repo: https://github.com/openshift-pipelines/manual-approval-gate.git?rev={{revision}}
9+
build.appstudio.redhat.com/commit_sha: '{{revision}}'
10+
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
11+
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
12+
pipelinesascode.tekton.dev/max-keep-runs: "3"
13+
pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch
14+
== "main" &&
15+
("upstream/***".pathChanged() || ".konflux/patches/***".pathChanged() || ".konflux/rpms/***".pathChanged() ||
16+
".konflux/dockerfiles/controller.Dockerfile".pathChanged() ||
17+
".tekton/manual-approval-gate-main-controller-pull-request.yaml".pathChanged())
18+
labels:
19+
appstudio.openshift.io/application: openshift-pipelines-core-main
20+
appstudio.openshift.io/component: manual-approval-gate-main-controller
21+
pipelines.appstudio.openshift.io/type: build
22+
name: manual-approval-gate-main-controller-on-pull-request
23+
namespace: tekton-ecosystem-tenant
24+
spec:
25+
params:
26+
- name: git-url
27+
value: '{{source_url}}'
28+
- name: revision
29+
value: '{{revision}}'
30+
- name: output-image
31+
value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/manual-approval-gate-controller-rhel9:on-pr-{{revision}}
32+
- name: image-expires-after
33+
value: 5d
34+
- name: dockerfile
35+
value: .konflux/dockerfiles/controller.Dockerfile
36+
- name: build-platforms
37+
value:
38+
- linux/x86_64
39+
- name: prefetch-input
40+
value: |
41+
{"type": "rpm", "path": ".konflux/rpms"}
42+
pipelineRef:
43+
name: docker-build-ta
44+
taskRunTemplate:
45+
serviceAccountName: build-pipeline-manual-approval-gate-main-controller
46+
workspaces:
47+
- name: git-auth
48+
secret:
49+
secretName: '{{ git_auth_secret }}'
50+
status: {}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Generated for Konflux Application openshift-pipelines-core by openshift-pipelines/hack. DO NOT EDIT
2+
apiVersion: tekton.dev/v1
3+
kind: PipelineRun
4+
metadata:
5+
annotations:
6+
pipelinesascode.tekton.dev/cancel-in-progress: "true" # Cancel in-progress pipelines
7+
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/manual-approval-gate.git?rev={{revision}}
9+
build.appstudio.redhat.com/commit_sha: '{{revision}}'
10+
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
11+
pipelinesascode.tekton.dev/max-keep-runs: "3"
12+
pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch
13+
== "main" &&
14+
("upstream/***".pathChanged() || ".konflux/patches/***".pathChanged() || ".konflux/rpms/***".pathChanged() ||
15+
".konflux/dockerfiles/controller.Dockerfile".pathChanged() ||
16+
".tekton/manual-approval-gate-main-controller-push.yaml".pathChanged())
17+
creationTimestamp: null
18+
labels:
19+
appstudio.openshift.io/application: openshift-pipelines-core-main
20+
appstudio.openshift.io/component: manual-approval-gate-main-controller
21+
pipelines.appstudio.openshift.io/type: build
22+
name: manual-approval-gate-main-controller-on-push
23+
namespace: tekton-ecosystem-tenant
24+
spec:
25+
params:
26+
- name: git-url
27+
value: '{{source_url}}'
28+
- name: revision
29+
value: '{{revision}}'
30+
- name: output-image
31+
value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/manual-approval-gate-controller-rhel9:{{revision}}
32+
- name: dockerfile
33+
value: .konflux/dockerfiles/controller.Dockerfile
34+
- name: prefetch-input
35+
value: |
36+
{"type": "rpm", "path": ".konflux/rpms"}
37+
pipelineRef:
38+
name: docker-build-ta
39+
taskRunTemplate:
40+
serviceAccountName: build-pipeline-manual-approval-gate-main-controller
41+
workspaces:
42+
- name: git-auth
43+
secret:
44+
secretName: '{{ git_auth_secret }}'
45+
status: {}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Generated for Konflux Application openshift-pipelines-core by openshift-pipelines/hack. DO NOT EDIT
2+
apiVersion: tekton.dev/v1
3+
kind: PipelineRun
4+
metadata:
5+
annotations:
6+
pipelinesascode.tekton.dev/cancel-in-progress: "true" # Cancel in-progress pipelines
7+
pipelinesascode.tekton.dev/pipeline: "https://raw.githubusercontent.com/openshift-pipelines-konflux/tektoncd-operator/refs/heads/main/.tekton/docker-build-ta.yaml"
8+
build.appstudio.openshift.io/repo: https://github.com/openshift-pipelines/manual-approval-gate.git?rev={{revision}}
9+
build.appstudio.redhat.com/commit_sha: '{{revision}}'
10+
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
11+
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
12+
pipelinesascode.tekton.dev/max-keep-runs: "3"
13+
pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch
14+
== "main" &&
15+
("upstream/***".pathChanged() || ".konflux/patches/***".pathChanged() || ".konflux/rpms/***".pathChanged() ||
16+
".konflux/dockerfiles/webhook.Dockerfile".pathChanged() ||
17+
".tekton/manual-approval-gate-main-webhook-pull-request.yaml".pathChanged())
18+
labels:
19+
appstudio.openshift.io/application: openshift-pipelines-core-main
20+
appstudio.openshift.io/component: manual-approval-gate-main-webhook
21+
pipelines.appstudio.openshift.io/type: build
22+
name: manual-approval-gate-main-webhook-on-pull-request
23+
namespace: tekton-ecosystem-tenant
24+
spec:
25+
params:
26+
- name: git-url
27+
value: '{{source_url}}'
28+
- name: revision
29+
value: '{{revision}}'
30+
- name: output-image
31+
value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/manual-approval-gate-webhook-rhel9:on-pr-{{revision}}
32+
- name: image-expires-after
33+
value: 5d
34+
- name: dockerfile
35+
value: .konflux/dockerfiles/webhook.Dockerfile
36+
- name: build-platforms
37+
value:
38+
- linux/x86_64
39+
- name: prefetch-input
40+
value: |
41+
{"type": "rpm", "path": ".konflux/rpms"}
42+
pipelineRef:
43+
name: docker-build-ta
44+
taskRunTemplate:
45+
serviceAccountName: build-pipeline-manual-approval-gate-main-webhook
46+
workspaces:
47+
- name: git-auth
48+
secret:
49+
secretName: '{{ git_auth_secret }}'
50+
status: {}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Generated for Konflux Application openshift-pipelines-core by openshift-pipelines/hack. DO NOT EDIT
2+
apiVersion: tekton.dev/v1
3+
kind: PipelineRun
4+
metadata:
5+
annotations:
6+
pipelinesascode.tekton.dev/cancel-in-progress: "true" # Cancel in-progress pipelines
7+
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/manual-approval-gate.git?rev={{revision}}
9+
build.appstudio.redhat.com/commit_sha: '{{revision}}'
10+
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
11+
pipelinesascode.tekton.dev/max-keep-runs: "3"
12+
pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch
13+
== "main" &&
14+
("upstream/***".pathChanged() || ".konflux/patches/***".pathChanged() || ".konflux/rpms/***".pathChanged() ||
15+
".konflux/dockerfiles/webhook.Dockerfile".pathChanged() ||
16+
".tekton/manual-approval-gate-main-webhook-push.yaml".pathChanged())
17+
creationTimestamp: null
18+
labels:
19+
appstudio.openshift.io/application: openshift-pipelines-core-main
20+
appstudio.openshift.io/component: manual-approval-gate-main-webhook
21+
pipelines.appstudio.openshift.io/type: build
22+
name: manual-approval-gate-main-webhook-on-push
23+
namespace: tekton-ecosystem-tenant
24+
spec:
25+
params:
26+
- name: git-url
27+
value: '{{source_url}}'
28+
- name: revision
29+
value: '{{revision}}'
30+
- name: output-image
31+
value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/manual-approval-gate-webhook-rhel9:{{revision}}
32+
- name: dockerfile
33+
value: .konflux/dockerfiles/webhook.Dockerfile
34+
- name: prefetch-input
35+
value: |
36+
{"type": "rpm", "path": ".konflux/rpms"}
37+
pipelineRef:
38+
name: docker-build-ta
39+
taskRunTemplate:
40+
serviceAccountName: build-pipeline-manual-approval-gate-main-webhook
41+
workspaces:
42+
- name: git-auth
43+
secret:
44+
secretName: '{{ git_auth_secret }}'
45+
status: {}

0 commit comments

Comments
 (0)