Skip to content

Commit

Permalink
[bot] update konflux configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
openshift-pipelines-bot authored and savitaashture committed Nov 4, 2024
1 parent 6014e6c commit fcacaf8
Show file tree
Hide file tree
Showing 12 changed files with 793 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/auto-merge.main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: auto-merge-main

on:
workflow_dispatch: {}
schedule:
- cron: "*/30 * * * *" # At every 30 minutes

jobs:
auto-approve:
runs-on: ubuntu-latest
if: github.repository_owner == 'openshift-pipelines' # do not run this elsewhere
permissions:
pull-requests: write
steps:
- name: Checkout the current repo
uses: actions/checkout@v4
- name: auto-merge-update-references
run: |
gh auth status
git config user.name openshift-pipelines-bot
git config user.email [email protected]
# Approve and merge pull-request with no reviews
for p in $(gh pr list --search "author:app/red-hat-konflux head:konflux/references/main" --json "number" | jq ".[].number"); do
gh pr merge --rebase --delete-branch --auto $p
done
env:
GH_TOKEN: ${{ secrets.OPENSHIFT_PIPELINES_ROBOT }}
- name: auto-merge-upstream-main
run: |
gh auth status
git config user.name openshift-pipelines-bot
git config user.email [email protected]
# Approve and merge pull-request with no reviews
for p in $(gh pr list --search "head:actions/update/sources-main" --json "number" | jq ".[].number"); do
gh pr merge --rebase --delete-branch --auto $p
done
env:
GH_TOKEN: ${{ secrets.OPENSHIFT_PIPELINES_ROBOT }}

8 changes: 8 additions & 0 deletions .konflux/main/application.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Generated by openshift-pipelines/hack. DO NOT EDIT.
---
apiVersion: appstudio.redhat.com/v1alpha1
kind: Application
metadata:
name: manual-approval-gate-main
spec:
displayName: manual-approval-gate main
18 changes: 18 additions & 0 deletions .konflux/main/component-controller.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by openshift-pipelines/hack. DO NOT EDIT.
---
apiVersion: appstudio.redhat.com/v1alpha1
kind: Component
metadata:
annotations:
build.appstudio.openshift.io/pipeline: '{"name":"docker-build-ta","bundle":"latest"}'
name: manual-approval-gate-main-controller
spec:
componentName: controller
application: manual-approval-gate-main
build-nudges-ref:
- operator-main-bundle
source:
git:
url: https://github.com/openshift-pipelines/manual-approval-gate
dockerfileUrl: .konflux/dockerfiles/controller.Dockerfile
revision: main
18 changes: 18 additions & 0 deletions .konflux/main/component-webhook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by openshift-pipelines/hack. DO NOT EDIT.
---
apiVersion: appstudio.redhat.com/v1alpha1
kind: Component
metadata:
annotations:
build.appstudio.openshift.io/pipeline: '{"name":"docker-build-ta","bundle":"latest"}'
name: manual-approval-gate-main-webhook
spec:
componentName: webhook
application: manual-approval-gate-main
build-nudges-ref:
- operator-main-bundle
source:
git:
url: https://github.com/openshift-pipelines/manual-approval-gate
dockerfileUrl: .konflux/dockerfiles/webhook.Dockerfile
revision: main
15 changes: 15 additions & 0 deletions .konflux/main/image-controller.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Generated by openshift-pipelines/hack. DO NOT EDIT.
---
apiVersion: appstudio.redhat.com/v1alpha1
kind: ImageRepository
metadata:
name: manual-approval-gate-main-controller
annotations:
image-controller.appstudio.redhat.com/update-component-image: "true"
labels:
appstudio.redhat.com/component: manual-approval-gate-main-controller
appstudio.redhat.com/application: manual-approval-gate-main
spec:
image:
name: manual-approval-gate-main/controller
visibility: public
15 changes: 15 additions & 0 deletions .konflux/main/image-webhook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Generated by openshift-pipelines/hack. DO NOT EDIT.
---
apiVersion: appstudio.redhat.com/v1alpha1
kind: ImageRepository
metadata:
name: manual-approval-gate-main-webhook
annotations:
image-controller.appstudio.redhat.com/update-component-image: "true"
labels:
appstudio.redhat.com/component: manual-approval-gate-main-webhook
appstudio.redhat.com/application: manual-approval-gate-main
spec:
image:
name: manual-approval-gate-main/webhook
visibility: public
25 changes: 25 additions & 0 deletions .konflux/main/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Generated by openshift-pipelines/hack. DO NOT EDIT.
---
apiVersion: appstudio.redhat.com/v1beta2
kind: IntegrationTestScenario
metadata:
name: manual-approval-gate-main-enterprise-contract
spec:
application: manual-approval-gate-main
contexts:
- description: Application testing
name: application
params:
- name: POLICY_CONFIGURATION
value: tekton-ecosystem-tenant/tekton-ecosystem-tenant-containers
- name: TIMEOUT
value: "15m0s"
resolverRef:
params:
- name: url
value: "https://github.com/konflux-ci/build-definitions"
- name: revision
value: main
- name: pathInRepo
value: pipelines/enterprise-contract.yaml
resolver: git
Loading

0 comments on commit fcacaf8

Please sign in to comment.