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
25 changes: 25 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"github>konflux-ci/mintmaker//config/renovate/renovate.json"
],
"enabledManagers": [
"tekton",
"dockerfile",
"rpm-lockfile"
],
"addLabels": [
"approved",
"lgtm",
"konflux",
"mintmaker"
],
"ignorePaths": ["upstream/**"],
"autoApprove": true,
"packageRules": [
{
"matchPackageNames": ["*"],
"automerge": true
}
]
}
28 changes: 28 additions & 0 deletions .github/workflows/auto-merge-upstream-tektoncd-git-clone.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-tektoncd-git-clone

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-tektoncd-git-clone
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-tektoncd-git-clone" --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-tektoncd-git-clone.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-tektoncd-git-clone

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 tektoncd-catalog/git-clone
run: |
rm -fR upstream
git clone https://github.com/tektoncd-catalog/git-clone 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 tektoncd-catalog/git-clone to ${NEW_COMMIT}

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

https://github.com/tektoncd-catalog/git-clone/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 tektoncd-catalog/git-clone to ${NEW_COMMIT}" --body "$(cat /tmp/diff.txt | sed 's/^/ /' | head -c 55555)"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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/tektoncd-git-clone.git?rev={{revision}}
build.appstudio.openshift.io/repo: https://github.com/openshift-pipelines-konflux/tektoncd-git-clone.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
== "next" &&
== "release-v1.22.x" &&
("upstream/***".pathChanged() || ".konflux/patches/***".pathChanged() || ".konflux/rpms/***".pathChanged() ||
".konflux/dockerfiles/git-init.Dockerfile".pathChanged() ||
".tekton/tektoncd-git-clone-next-git-init-pull-request.yaml".pathChanged())
creationTimestamp: null
".tekton/tektoncd-git-clone-1-22-git-init-pull-request.yaml".pathChanged())
labels:
appstudio.openshift.io/application: openshift-pipelines-core-next
appstudio.openshift.io/component: tektoncd-git-clone-next-git-init
appstudio.openshift.io/application: openshift-pipelines-core-1-22
appstudio.openshift.io/component: tektoncd-git-clone-1-22-git-init
pipelines.appstudio.openshift.io/type: build
name: tektoncd-git-clone-next-git-init-on-pull-request
name: tektoncd-git-clone-1-22-git-init-on-pull-request
namespace: tekton-ecosystem-tenant
spec:
params:
Expand All @@ -29,7 +28,7 @@ spec:
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/next/git-init-rhel9:on-pr-{{revision}}
value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/git-init-rhel9:on-pr-{{revision}}
- name: image-expires-after
value: 5d
- name: dockerfile
Expand All @@ -43,7 +42,7 @@ spec:
pipelineRef:
name: docker-build-ta
taskRunTemplate:
serviceAccountName: build-pipeline-tektoncd-git-clone-next-git-init
serviceAccountName: build-pipeline-tektoncd-git-clone-git-init-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-next by openshift-pipelines/hack. DO NOT EDIT
apiVersion: tekton.dev/v1
# 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/tektoncd-git-clone.git?rev={{revision}}
build.appstudio.openshift.io/repo: https://github.com/openshift-pipelines-konflux/tektoncd-git-clone.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
== "next" &&
== "release-v1.22.x" &&
("upstream/***".pathChanged() || ".konflux/patches/***".pathChanged() || ".konflux/rpms/***".pathChanged() ||
".konflux/dockerfiles/git-init.Dockerfile".pathChanged() ||
".tekton/tektoncd-git-clone-next-git-init-push.yaml".pathChanged())
".tekton/tektoncd-git-clone-1-22-git-init-push.yaml".pathChanged())
creationTimestamp: null
labels:
appstudio.openshift.io/application: openshift-pipelines-core-next
appstudio.openshift.io/component: tektoncd-git-clone-next-git-init
appstudio.openshift.io/application: openshift-pipelines-core-1-22
appstudio.openshift.io/component: tektoncd-git-clone-1-22-git-init
pipelines.appstudio.openshift.io/type: build
name: tektoncd-git-clone-next-git-init-on-push
name: tektoncd-git-clone-1-22-git-init-on-push
namespace: tekton-ecosystem-tenant
spec:
params:
Expand All @@ -28,7 +28,7 @@ spec:
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/next/git-init-rhel9:{{revision}}
value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/git-init-rhel9:{{revision}}
- name: dockerfile
value: .konflux/dockerfiles/git-init.Dockerfile
- name: prefetch-input
Expand All @@ -37,7 +37,7 @@ spec:
pipelineRef:
name: docker-build-ta
taskRunTemplate:
serviceAccountName: build-pipeline-tektoncd-git-clone-next-git-init
serviceAccountName: build-pipeline-tektoncd-git-clone-git-init-1-22
workspaces:
- name: git-auth
secret:
Expand Down