Skip to content

Commit 814a985

Browse files
author
openshift-pipelines-bot
committed
[bot] Update main from openshift-pipelines/manual-approval-gate to 52a6c5e
$ git diff --stat 52a6c5e.. https://github.com/openshift-pipelines/manual-approval-gate/compare/52a6c5e8e3142f1d2c4d985a63bfc31e8da30cf4..
1 parent 52a6c5e commit 814a985

File tree

6,415 files changed

+1738684
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

6,415 files changed

+1738684
-0
lines changed

head

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
52a6c5e8e3142f1d2c4d985a63bfc31e8da30cf4

upstream/.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "gomod" # See documentation for possible values
4+
directory: "/" # Location of package manifests
5+
schedule:
6+
interval: "daily"
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
interval: "daily"

upstream/.github/renovate.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"github>konflux-ci/mintmaker//config/renovate/renovate.json"
5+
],
6+
"enabledManagers": [
7+
"tekton",
8+
"dockerfile",
9+
"rpm-lockfile"
10+
],
11+
"addLabels": [
12+
"approved",
13+
"lgtm",
14+
"konflux",
15+
"mintmaker"
16+
],
17+
"ignorePaths": ["upstream/**"],
18+
19+
"autoApprove": true,
20+
"packageRules": [
21+
{
22+
"matchPackageNames": ["*"],
23+
"automerge": true,
24+
"ignorePaths": ["upstream/**"]
25+
}
26+
]
27+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Generated for Konflux Application openshift-pipelines-core by openshift-pipelines/hack. DO NOT EDIT
2+
name: auto-merge-upstream-manual-approval-gate
3+
4+
on:
5+
workflow_dispatch: {}
6+
schedule:
7+
- cron: "*/30 * * * *" # At every 30 minutes
8+
9+
jobs:
10+
auto-approve:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
pull-requests: write
14+
steps:
15+
- name: Checkout the current repo
16+
uses: actions/checkout@v6
17+
- name: auto-merge-upstream-manual-approval-gate
18+
run: |
19+
gh auth status
20+
git config user.name openshift-pipelines-bot
21+
git config user.email [email protected]
22+
# Approve and merge pull-request with no reviews
23+
for p in $(gh pr list --search "head:actions/update/sources-manual-approval-gate" --json "number" | jq ".[].number"); do
24+
gh pr merge --rebase --delete-branch --auto $p
25+
done
26+
env:
27+
GH_TOKEN: ${{ secrets.OPENSHIFT_PIPELINES_ROBOT }}
28+
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
on:
2+
pull_request:
3+
branches: [ main ]
4+
push:
5+
branches: [ main ]
6+
schedule:
7+
- cron: '0 0 * * *'
8+
9+
name: build-test-publish
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v6
16+
- name: Set up Go
17+
uses: actions/setup-go@v5
18+
with:
19+
go-version: 1.21
20+
- uses: actions/cache@v4
21+
with:
22+
path: |
23+
~/.cache/go-build
24+
~/go/pkg/mod
25+
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }}
26+
restore-keys: |
27+
${{ runner.os }}-golang-
28+
- run: go env
29+
- name: go build
30+
run: go build -v ./...
31+
- name: go test
32+
run: go test -v ./...
33+
34+
e2e:
35+
name: e2e tests
36+
runs-on: ubuntu-latest
37+
needs: [ build ]
38+
env:
39+
KO_DOCKER_REPO: registry.local:5000/knative
40+
41+
steps:
42+
- uses: actions/setup-go@v5
43+
with:
44+
go-version: 1.21
45+
- uses: imjasonh/[email protected]
46+
- uses: actions/checkout@v6
47+
- uses: actions/cache@v4
48+
with:
49+
path: |
50+
~/.cache/go-build
51+
~/go/pkg/mod
52+
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }}
53+
restore-keys: |
54+
${{ runner.os }}-golang-
55+
- name: install manual-approval-gate custom task
56+
run: |
57+
chmod +x test/e2e-test.sh
58+
./test/e2e-test.sh
59+
60+
publish:
61+
name: publish latest
62+
runs-on: ubuntu-latest
63+
needs: [ build ]
64+
65+
# https://docs.github.com/en/actions/reference/authentication-in-a-workflow
66+
permissions:
67+
id-token: write
68+
packages: write
69+
contents: read
70+
71+
steps:
72+
- uses: actions/setup-go@v5
73+
with:
74+
go-version: 1.21
75+
- uses: actions/checkout@v6
76+
- uses: actions/cache@v4
77+
with:
78+
path: |
79+
~/.cache/go-build
80+
~/go/pkg/mod
81+
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }}
82+
restore-keys: |
83+
${{ runner.os }}-golang-
84+
- uses: docker/login-action@v3
85+
with:
86+
registry: ghcr.io
87+
username: ${{ github.actor }}
88+
password: ${{ secrets.GITHUB_TOKEN }}
89+
- uses: imjasonh/[email protected]
90+
- run: |
91+
ko publish --platform=linux/amd64,linux/s390x,linux/ppc64le,linux/arm64 --push=${{ github.event_name != 'pull_request' }} --base-import-paths ./cmd/controller
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
on:
2+
push:
3+
tags:
4+
- '**'
5+
env:
6+
GH_TOKEN: ${{ github.token }}
7+
8+
jobs:
9+
release:
10+
name: manual approval gate release
11+
runs-on: ubuntu-latest
12+
13+
# https://docs.github.com/en/actions/reference/authentication-in-a-workflow
14+
permissions:
15+
id-token: write
16+
packages: write
17+
contents: write
18+
repository-projects: write
19+
20+
steps:
21+
- uses: actions/checkout@v6
22+
- uses: docker/login-action@v3
23+
with:
24+
registry: ghcr.io
25+
username: ${{ github.actor }}
26+
password: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- name: Setup KO
29+
uses: imjasonh/[email protected]
30+
31+
- name: Manual Approval Gate Release Started...
32+
run: |
33+
git fetch --tags
34+
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`)
35+
echo "***********************************"
36+
echo "Latest tag is: ${latest_tag}"
37+
echo "***********************************"
38+
39+
chmod +x ./release.sh
40+
./release.sh "${latest_tag}"
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Generated for Konflux Application openshift-pipelines-core by openshift-pipelines/hack. DO NOT EDIT
2+
name: update-sources-manual-approval-gate
3+
4+
on:
5+
workflow_dispatch: {}
6+
schedule:
7+
- cron: "0 1 * * *" # At 1AM everyday
8+
9+
jobs:
10+
11+
update-sources:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
steps:
17+
- name: Checkout the current repo
18+
uses: actions/checkout@v6
19+
with:
20+
ref: main
21+
22+
- name: Clone openshift-pipelines/manual-approval-gate
23+
run: |
24+
rm -fR upstream
25+
git clone https://github.com/openshift-pipelines/manual-approval-gate upstream
26+
pushd upstream
27+
git checkout -B main origin/main
28+
popd
29+
- name: Commit new changes
30+
run: |
31+
32+
set -x
33+
34+
git config user.name openshift-pipelines-bot
35+
git config user.email [email protected]
36+
git checkout -b actions/update/sources-main
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 main from openshift-pipelines/manual-approval-gate 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/openshift-pipelines/manual-approval-gate/compare/${NEW_COMMIT}..${OLD_COMMIT}
63+
EOF
64+
65+
git push -f origin actions/update/sources-main
66+
67+
if [ "$(gh pr list --base main --head actions/update/sources-main --json url --jq 'length')" = "0" ]; then
68+
echo "creating PR..."
69+
gh pr create -B main -H actions/update/sources-main --label=automated --label=upstream --fill
70+
else
71+
echo "a PR already exists, editing..."
72+
gh pr edit --title "[bot] Update main from openshift-pipelines/manual-approval-gate to ${NEW_COMMIT}" --body "$(cat /tmp/diff.txt | sed 's/^/ /' | head -c 55555)"
73+
fi
74+
env:
75+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

upstream/.ko.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
defaultBaseImage: gcr.io/distroless/static:nonroot
2+
baseImageOverrides:
3+
github.com/openshift-pipelines/manual-approval-gate/cmd/approver: registry.access.redhat.com/ubi8/ubi-minimal
4+
github.com/openshift-pipelines/manual-approval-gate/cmd/controller: registry.access.redhat.com/ubi8/ubi-minimal

upstream/.konflux/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# `konflux-ci` manifests This folder contains [`konflux-ci`](konfluxci) configuration that is synced with the konflux-ci cluster.
2+
3+
[konfluxci]: https://konflux-ci.dev/

upstream/.konflux/dockerfiles/.placeholder

Whitespace-only changes.

0 commit comments

Comments
 (0)