Skip to content

Commit 3a2ba03

Browse files
openshift-pipelines-botopenshift-pipelines-bot
authored andcommitted
[bot:release-v1.20.x] update konflux configuration
Generated by workflow [Generate konflux configurations](https://github.com/openshift-pipelines/hack/actions/runs/28242208923) Triggered by khrm
1 parent ce54fbd commit 3a2ba03

5 files changed

Lines changed: 65 additions & 90 deletions

File tree

.github/workflows/auto-merge-upstream.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ jobs:
2525
pr_list=$(gh pr list \
2626
--state open \
2727
--base release-v1.20.x \
28-
--search 'label:upstream,hack,automated -label:do-not-merge/hold' \
28+
--search 'label:upstream,label:hack -label:do-not-merge/hold' \
2929
--json number \
3030
--jq '.[]|.number')
3131
3232
success_pr_list=$(gh pr list \
3333
--state open \
3434
--base release-v1.20.x \
35-
--search 'label:upstream,hack,automated -label:do-not-merge/hold' \
35+
--search 'label:upstream,label:hack -label:do-not-merge/hold' \
3636
--json number,title,statusCheckRollup \
37-
--jq ' .[]| select((.statusCheckRollup // [])| all(.conclusion == "SUCCESS" or .conclusion == "SKIPPED" or .conclusion == "NEUTRAL"))| "\(.number)"')
37+
--jq ' .[]| select((.statusCheckRollup // [])| all(.conclusion == "SUCCESS" or .conclusion == "SKIPPED"))| "\(.number)"')
3838
3939
echo "pr_list=$pr_list" >> "$GITHUB_OUTPUT"
4040
echo "success_pr_list=$success_pr_list" >> "$GITHUB_OUTPUT"

.github/workflows/update-sources.yaml

Lines changed: 58 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -4,92 +4,72 @@ on:
44
workflow_dispatch: {}
55
push:
66
branches:
7-
- release-v1.20.x
7+
- release-v1.20.x
88
paths:
9-
- .github/workflows/update-sources.yaml
9+
- .github/workflows/update-sources.yaml
1010
jobs:
1111
update-sources:
12-
# This line prevents the job from running if CodeFreeze is true
13-
if: false
1412
runs-on: ubuntu-latest
1513
permissions:
1614
contents: write
1715
pull-requests: write
1816
steps:
19-
- name: Checkout the current repo
20-
uses: actions/checkout@v4
21-
with:
22-
ref: release-v1.20.x
17+
- name: Checkout the current repo
18+
uses: actions/checkout@v4
19+
with:
20+
ref: release-v1.20.x
2321

24-
- name: Clone tektoncd-catalog/git-clone
25-
run: |
26-
rm -fR upstream
27-
git clone https://github.com/tektoncd-catalog/git-clone upstream
28-
pushd upstream
29-
git checkout -B release-v1.2.x origin/release-v1.2.x
30-
popd
31-
- name: update-rpms
32-
continue-on-error: true
33-
run: |
34-
set -x
35-
export BASE_IMAGE=$(grep -h "RUNTIME=" .konflux/dockerfiles/* | sed -E 's/.*RUNTIME=["'\'']?([^"'\'' ]+).*/\1/' | head -n 1)
36-
docker run --rm\
37-
-e BASE_IMAGE=$BASE_IMAGE \
38-
-v ./.konflux/rpms/:/rpms -w /rpms $BASE_IMAGE sh -c "
39-
cp -f /etc/yum.repos.d/*.repo ./
40-
sed -i 's/^\[ubi-9-/\[ubi-9-for-\$basearch-/' *.repo
41-
"
42-
docker run --rm\
43-
-e BASE_IMAGE=$BASE_IMAGE \
44-
-v ./.konflux/rpms/:/rpms -w /rpms registry.access.redhat.com/ubi9/ubi-minimal:latest sh -c "
45-
microdnf update -y && microdnf install -y python3-dnf skopeo pip
46-
python3 -m pip install https://github.com/konflux-ci/rpm-lockfile-prototype/archive/refs/tags/v0.21.0.tar.gz
47-
rpm-lockfile-prototype --image $BASE_IMAGE rpms.in.yaml
48-
"
49-
- name: Commit new changes
50-
run: |
22+
- name: Clone tektoncd-catalog/git-clone
23+
run: |
24+
rm -fR upstream
25+
git clone https://github.com/tektoncd-catalog/git-clone upstream
26+
pushd upstream
27+
git checkout -B release-v1.2.x origin/release-v1.2.x
28+
popd
29+
- name: Commit new changes
30+
run: |
5131
52-
set -x
32+
set -x
5333
54-
git config user.name openshift-pipelines-bot
55-
git config user.email pipelines-extcomm@redhat.com
56-
git checkout -b actions/update/sources-release-v1.20.x
57-
touch head
58-
pushd upstream
59-
OLD_COMMIT=$(cat ../head)
60-
NEW_COMMIT=$(git rev-parse HEAD)
61-
echo Previous commit: ${OLD_COMMIT}
62-
git show --stat ${OLD_COMMIT}
63-
echo New commit: ${NEW_COMMIT}
64-
git show --stat ${NEW_COMMIT}
65-
git diff --stat ${NEW_COMMIT}..${OLD_COMMIT} > /tmp/diff.txt
66-
git rev-parse HEAD > ../head
67-
popd
68-
rm -rf upstream/.git
69-
git add -f upstream head .konflux
70-
71-
if [[ -z $(git status --porcelain --untracked-files=no) ]]; then
72-
echo "No change, exiting"
73-
exit 0
74-
fi
75-
76-
git commit -F- <<EOF
77-
[bot] Update release-v1.20.x from tektoncd-catalog/git-clone:release-v1.2.x to ${NEW_COMMIT}
78-
79-
$ git diff --stat ${NEW_COMMIT}..${OLD_COMMIT}
80-
$(cat /tmp/diff.txt | sed 's/^/ /' | head -c 55555)
81-
82-
https://github.com/tektoncd-catalog/git-clone/compare/${NEW_COMMIT}..${OLD_COMMIT}
83-
EOF
84-
85-
git push -f origin actions/update/sources-release-v1.20.x
86-
87-
if [ "$(gh pr list --base release-v1.20.x --head actions/update/sources-release-v1.20.x --json url --jq 'length')" = "0" ]; then
88-
echo "creating PR..."
89-
gh pr create -B release-v1.20.x -H actions/update/sources-release-v1.20.x --label=automated --label=upstream --fill
90-
else
91-
echo "a PR already exists, editing..."
92-
gh pr edit --title "[bot] Update release-v1.20.x from tektoncd-catalog/git-clone:release-v1.2.x to ${NEW_COMMIT}" --body "$(cat /tmp/diff.txt | sed 's/^/ /' | head -c 55555)"
93-
fi
94-
env:
95-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
git config user.name openshift-pipelines-bot
35+
git config user.email pipelines-extcomm@redhat.com
36+
git checkout -b actions/update/sources-release-v1.20.x
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 release-v1.20.x from tektoncd-catalog/git-clone 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/tektoncd-catalog/git-clone/compare/${NEW_COMMIT}..${OLD_COMMIT}
63+
EOF
64+
65+
git push -f origin actions/update/sources-release-v1.20.x
66+
67+
if [ "$(gh pr list --base release-v1.20.x --head actions/update/sources-release-v1.20.x --json url --jq 'length')" = "0" ]; then
68+
echo "creating PR..."
69+
gh pr create -B release-v1.20.x -H actions/update/sources-release-v1.20.x --label=automated --label=upstream --fill
70+
else
71+
echo "a PR already exists, editing..."
72+
gh pr edit --title "[bot] Update release-v1.20.x from tektoncd-catalog/git-clone to ${NEW_COMMIT}" --body "$(cat /tmp/diff.txt | sed 's/^/ /' | head -c 55555)"
73+
fi
74+
env:
75+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.konflux/dockerfiles/git-init.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG GO_BUILDER=registry.access.redhat.com/ubi9/go-toolset:latest
1+
ARG GO_BUILDER=registry.access.redhat.com/ubi9/go-toolset:1.25
22
ARG RUNTIME=registry.access.redhat.com/ubi9/ubi-minimal:latest
33

44
FROM $GO_BUILDER AS builder
@@ -36,7 +36,7 @@ LABEL \
3636
maintainer="pipelines-extcomm@redhat.com" \
3737
name="openshift-pipelines/pipelines-git-init-rhel9" \
3838
summary="Red Hat OpenShift Pipelines tektoncd-git-clone git-init" \
39-
version="v1.20.5"
39+
version="v1.20.4"
4040

4141
RUN groupadd -r -g 65532 nonroot && useradd --no-log-init -r -u 65532 -g nonroot -d /home/git -m nonroot
4242
USER 65532

.tekton/tektoncd-git-clone-1-20-git-init-pull-request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ spec:
3737
value: .konflux/dockerfiles/git-init.Dockerfile
3838
- name: additional-tags
3939
value:
40-
- "on-pr-v1.20.5"
40+
- "on-pr-v1.20.4"
4141
- name: build-platforms
4242
value:
4343
- linux/x86_64

.tekton/tektoncd-git-clone-1-20-git-init-push.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,10 @@ spec:
3535
value: .konflux/dockerfiles/git-init.Dockerfile
3636
- name: additional-tags
3737
value:
38-
- "v1.20.5"
38+
- "v1.20.4"
3939
- name: prefetch-input
4040
value: |
4141
{"type": "rpm", "path": ".konflux/rpms"}
42-
- name: repo-name
43-
value: "tektoncd-git-clone"
44-
- name: slack-group-ids
45-
value:
46-
- "S04UX12MX8B"
4742
pipelineRef:
4843
name: docker-build-ta
4944
taskRunTemplate:

0 commit comments

Comments
 (0)