From 5409c01b48c89692cb986e582ef7d447c66b963c Mon Sep 17 00:00:00 2001 From: openshift-pipelines-bot Date: Thu, 21 Nov 2024 13:24:31 +0000 Subject: [PATCH] [bot] update konflux configuration --- .github/workflows/auto-merge.next.yaml | 39 ++++++++++++++++++++++++++ .konflux/next/application.yaml | 8 ++++++ .konflux/next/component-cache.yaml | 18 ++++++++++++ .konflux/next/image-cache.yaml | 15 ++++++++++ .konflux/next/tests.yaml | 25 +++++++++++++++++ 5 files changed, 105 insertions(+) create mode 100644 .github/workflows/auto-merge.next.yaml create mode 100644 .konflux/next/application.yaml create mode 100644 .konflux/next/component-cache.yaml create mode 100644 .konflux/next/image-cache.yaml create mode 100644 .konflux/next/tests.yaml diff --git a/.github/workflows/auto-merge.next.yaml b/.github/workflows/auto-merge.next.yaml new file mode 100644 index 000000000..83cab7248 --- /dev/null +++ b/.github/workflows/auto-merge.next.yaml @@ -0,0 +1,39 @@ +name: auto-merge-next + +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 pipelines-extcomm@redhat.com + # Approve and merge pull-request with no reviews + for p in $(gh pr list --search "author:app/red-hat-konflux head:konflux/references/next" --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-next + run: | + gh auth status + git config user.name openshift-pipelines-bot + git config user.email pipelines-extcomm@redhat.com + # Approve and merge pull-request with no reviews + for p in $(gh pr list --search "head:actions/update/sources-next" --json "number" | jq ".[].number"); do + gh pr merge --rebase --delete-branch --auto $p + done + env: + GH_TOKEN: ${{ secrets.OPENSHIFT_PIPELINES_ROBOT }} + diff --git a/.konflux/next/application.yaml b/.konflux/next/application.yaml new file mode 100644 index 000000000..9505f2028 --- /dev/null +++ b/.konflux/next/application.yaml @@ -0,0 +1,8 @@ +# Generated by openshift-pipelines/hack. DO NOT EDIT. +--- +apiVersion: appstudio.redhat.com/v1alpha1 +kind: Application +metadata: + name: tekton-caches-next +spec: + displayName: tekton-caches next diff --git a/.konflux/next/component-cache.yaml b/.konflux/next/component-cache.yaml new file mode 100644 index 000000000..d7ee49885 --- /dev/null +++ b/.konflux/next/component-cache.yaml @@ -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-multi-platform-oci-ta","bundle":"latest"}' + name: tekton-caches-next-cache +spec: + componentName: cache + application: tekton-caches-next + build-nudges-ref: + - operator-next-bundle + source: + git: + url: https://github.com/openshift-pipelines/tekton-caches + dockerfileUrl: .konflux/dockerfiles/cache.Dockerfile + revision: next diff --git a/.konflux/next/image-cache.yaml b/.konflux/next/image-cache.yaml new file mode 100644 index 000000000..5dbb8f3a1 --- /dev/null +++ b/.konflux/next/image-cache.yaml @@ -0,0 +1,15 @@ +# Generated by openshift-pipelines/hack. DO NOT EDIT. +--- +apiVersion: appstudio.redhat.com/v1alpha1 +kind: ImageRepository +metadata: + name: tekton-caches-next-cache + annotations: + image-controller.appstudio.redhat.com/update-component-image: "true" + labels: + appstudio.redhat.com/component: tekton-caches-next-cache + appstudio.redhat.com/application: tekton-caches-next +spec: + image: + name: tekton-caches-next/cache + visibility: public diff --git a/.konflux/next/tests.yaml b/.konflux/next/tests.yaml new file mode 100644 index 000000000..9199eac66 --- /dev/null +++ b/.konflux/next/tests.yaml @@ -0,0 +1,25 @@ +# Generated by openshift-pipelines/hack. DO NOT EDIT. +--- +apiVersion: appstudio.redhat.com/v1beta2 +kind: IntegrationTestScenario +metadata: + name: tekton-caches-next-enterprise-contract +spec: + application: tekton-caches-next + 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