Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/auto-merge-upstream.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Generated for Konflux Application openshift-pipelines-core by openshift-pipelines/hack. DO NOT EDIT
name: auto-merge-upstream-p12n-console-plugin

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

jobs:
auto-approve:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout the current repo
uses: actions/checkout@v4
- name: auto-merge-upstream-p12n-console-plugin
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-p12n-console-plugin" --json "number" | jq ".[].number"); do
gh pr merge --rebase --delete-branch --auto $p
done
env:
GH_TOKEN: ${{ secrets.OPENSHIFT_PIPELINES_ROBOT }}

75 changes: 75 additions & 0 deletions .github/workflows/update-sources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Generated for Konflux Application openshift-pipelines-core by openshift-pipelines/hack. DO NOT EDIT
name: update-sources-p12n-console-plugin

on:
workflow_dispatch: {}
schedule:
- cron: "0 1 * * *" # At 1AM everyday

jobs:

update-sources:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout the current repo
uses: actions/checkout@v4
with:
ref: release-v1.22.x

- name: Clone openshift-pipelines/console-plugin
run: |
rm -fR upstream
git clone https://github.com/openshift-pipelines/console-plugin upstream
pushd upstream
git checkout -B main origin/main
popd
- name: Commit new changes
run: |

set -x

git config user.name openshift-pipelines-bot
git config user.email [email protected]
git checkout -b actions/update/sources-release-v1.22.x
touch head
pushd upstream
OLD_COMMIT=$(cat ../head)
NEW_COMMIT=$(git rev-parse HEAD)
echo Previous commit: ${OLD_COMMIT}
git show --stat ${OLD_COMMIT}
echo New commit: ${NEW_COMMIT}
git show --stat ${NEW_COMMIT}
git diff --stat ${NEW_COMMIT}..${OLD_COMMIT} > /tmp/diff.txt
git rev-parse HEAD > ../head
popd
rm -rf upstream/.git
git add -f upstream head .konflux

if [[ -z $(git status --porcelain --untracked-files=no) ]]; then
echo "No change, exiting"
exit 0
fi

git commit -F- <<EOF
[bot] Update release-v1.22.x from openshift-pipelines/console-plugin to ${NEW_COMMIT}

$ git diff --stat ${NEW_COMMIT}..${OLD_COMMIT}
$(cat /tmp/diff.txt | sed 's/^/ /' | head -c 55555)

https://github.com/openshift-pipelines/console-plugin/compare/${NEW_COMMIT}..${OLD_COMMIT}
EOF

git push -f origin actions/update/sources-release-v1.22.x

if [ "$(gh pr list --base release-v1.22.x --head actions/update/sources-release-v1.22.x --json url --jq 'length')" = "0" ]; then
echo "creating PR..."
gh pr create -B release-v1.22.x -H actions/update/sources-release-v1.22.x --label=automated --label=upstream --fill
else
echo "a PR already exists, editing..."
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)"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51 changes: 0 additions & 51 deletions .tekton/console-plugin-main-console-plugin-pull-request.yaml

This file was deleted.

45 changes: 0 additions & 45 deletions .tekton/console-plugin-next-console-plugin-push.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
# Generated for Konflux Application openshift-pipelines-core-next by openshift-pipelines/hack. DO NOT EDIT
# Generated for Konflux Application openshift-pipelines-core by openshift-pipelines/hack. DO NOT EDIT
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
pipelinesascode.tekton.dev/cancel-in-progress: "true" # Cancel in-progress pipelines
pipelinesascode.tekton.dev/pipeline: "https://raw.githubusercontent.com/openshift-pipelines/operator/refs/heads/main/.tekton/docker-build-ta.yaml"
build.appstudio.openshift.io/repo: https://github.com/openshift-pipelines/console-plugin.git?rev={{revision}}
build.appstudio.openshift.io/repo: https://github.com/openshift-pipelines/p12n-console-plugin.git?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch
== "main" &&
("***".pathChanged() ||
== "release-v1.22.x" &&
("upstream/***".pathChanged() || ".konflux/patches/***".pathChanged() || ".konflux/rpms/***".pathChanged() ||
".konflux/dockerfiles/console-plugin.Dockerfile".pathChanged() ||
".tekton/console-plugin-next-console-plugin-pull-request.yaml".pathChanged())
creationTimestamp: null
".tekton/p12n-console-plugin-1-22-console-plugin-pull-request.yaml".pathChanged())
labels:
appstudio.openshift.io/application: openshift-pipelines-core-next
appstudio.openshift.io/component: console-plugin-next-console-plugin
appstudio.openshift.io/application: openshift-pipelines-core-1-22
appstudio.openshift.io/component: p12n-console-plugin-console-plugin-1-22
pipelines.appstudio.openshift.io/type: build
name: console-plugin-next-console-plugin-on-pull-request
name: p12n-console-plugin-1-22-console-plugin-on-pull-request
namespace: tekton-ecosystem-tenant
spec:
params:
Expand All @@ -29,21 +28,25 @@ spec:
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/next/console-plugin-rhel9:on-pr-{{revision}}
value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/console-plugin-rhel9:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: dockerfile
value: .konflux/dockerfiles/console-plugin.Dockerfile
- name: additional-tags
value:
- "on-pr1.22"
- "on-pr-1.22.0"
- name: build-platforms
value:
- linux/x86_64
- name: prefetch-input
value: |
{"type": "rpm", "path": ".konflux/rpms"}
[{"type": "rpm", "path": ".konflux/rpms"}, {"type": "yarn", "path": "upstream"}]
pipelineRef:
name: docker-build-ta
taskRunTemplate:
serviceAccountName: build-pipeline-console-plugin-next-console-plugin
serviceAccountName: build-pipeline-p12n-console-plugin-console-plugin-1-22
workspaces:
- name: git-auth
secret:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# Generated for Konflux Application openshift-pipelines-core-main by openshift-pipelines/hack. DO NOT EDIT
# Generated for Konflux Application openshift-pipelines-core by openshift-pipelines/hack. DO NOT EDIT
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
pipelinesascode.tekton.dev/cancel-in-progress: "true" # Cancel in-progress pipelines
pipelinesascode.tekton.dev/pipeline: "https://raw.githubusercontent.com/openshift-pipelines/operator/refs/heads/main/.tekton/docker-build-ta.yaml"
build.appstudio.openshift.io/repo: https://github.com/openshift-pipelines/console-plugin.git?rev={{revision}}
build.appstudio.openshift.io/repo: https://github.com/openshift-pipelines/p12n-console-plugin.git?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch
== "main" &&
("***".pathChanged() ||
== "release-v1.22.x" &&
("upstream/***".pathChanged() || ".konflux/patches/***".pathChanged() || ".konflux/rpms/***".pathChanged() ||
".konflux/dockerfiles/console-plugin.Dockerfile".pathChanged() ||
".tekton/console-plugin-main-console-plugin-push.yaml".pathChanged())
".tekton/p12n-console-plugin-1-22-console-plugin-push.yaml".pathChanged())
creationTimestamp: null
labels:
appstudio.openshift.io/application: openshift-pipelines-core-main
appstudio.openshift.io/component: console-plugin-main-console-plugin
appstudio.openshift.io/application: openshift-pipelines-core-1-22
appstudio.openshift.io/component: p12n-console-plugin-console-plugin-1-22
pipelines.appstudio.openshift.io/type: build
name: console-plugin-main-console-plugin-on-push
name: p12n-console-plugin-1-22-console-plugin-on-push
namespace: tekton-ecosystem-tenant
spec:
params:
Expand All @@ -28,20 +28,20 @@ spec:
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/main/console-plugin-rhel9:{{revision}}
value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/console-plugin-rhel9:{{revision}}
- name: dockerfile
value: .konflux/dockerfiles/console-plugin.Dockerfile
- name: build-platforms
- name: additional-tags
value:
- linux/x86_64
- linux-m2xlarge/arm64
- "1.22"
- "1.22.0"
- name: prefetch-input
value: |
{"type": "rpm", "path": ".konflux/rpms"}
[{"type": "rpm", "path": ".konflux/rpms"}, {"type": "yarn", "path": "upstream"}]
pipelineRef:
name: docker-build-ta
taskRunTemplate:
serviceAccountName: build-pipeline-console-plugin-main-console-plugin
serviceAccountName: build-pipeline-p12n-console-plugin-console-plugin-1-22
workspaces:
- name: git-auth
secret:
Expand Down