Skip to content

Commit 852b097

Browse files
authored
Merge branch 'main' into skip-duplicate-pipelineruns
2 parents 4a2759f + 5a5f4e8 commit 852b097

7 files changed

Lines changed: 75 additions & 83 deletions

File tree

.github/workflows/e2e.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
runs-on: ubuntu-latest
4141
strategy:
4242
matrix:
43-
provider: [providers, gitea_others]
43+
provider: [github, github_second_controller, gitlab_bitbucket, gitea_others, concurrency]
4444

4545
env:
4646
CONTROLLER_DOMAIN_URL: paac.paac-127-0-0-1.nip.io
@@ -292,7 +292,7 @@ jobs:
292292
nohup gosmee client --saveDir /tmp/gosmee-replay ${{ secrets.TEST_GITEA_SMEEURL }} "https://${CONTROLLER_DOMAIN_URL}" &
293293
294294
- name: Run gosmee for second controller (GHE)
295-
if: matrix.provider == 'providers'
295+
if: matrix.provider == 'github_second_controller' || matrix.provider == 'concurrency'
296296
run: |
297297
nohup gosmee client --saveDir /tmp/gosmee-replay-ghe ${{ secrets.TEST_GITHUB_SECOND_SMEE_URL }} "https://ghe.paac-127-0-0-1.nip.io" &
298298

docs/content/docs/dev/_index.md

Lines changed: 7 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,13 @@ When submitting a pull request to Pipelines-as-Code, contributors must disclose
396396
any AI/LLM assistance used during development. This promotes transparency and
397397
proper attribution in our collaborative development environment.
398398

399+
### Python dependencies
400+
401+
```shell
402+
cd ./hack/pr-ci
403+
uv lock -U
404+
```
405+
399406
### Required Disclosure
400407

401408
All contributors must:
@@ -444,47 +451,3 @@ Co-authored-by: Gemini <gemini@google.com>
444451

445452
See the [PR template](.github/pull_request_template.md) for complete details on
446453
the AI assistance disclosure requirements.
447-
448-
## Testing External contributor Pull Requests for E2E Testing
449-
450-
When an external contributor submits a pull request (PR), E2E tests may not run
451-
automatically due to security restrictions. To work around this, maintainers
452-
can use a script to mirror the external PR to their own fork, allowing E2E
453-
tests to run safely.
454-
455-
### Usage
456-
457-
1. Ensure you have the [GitHub CLI (`gh`)](https://cli.github.com/) installed and authenticated and fzf installed.
458-
2. Fork the repository and configure your fork as a git remote.
459-
3. Run the script:
460-
461-
```bash
462-
./hack/mirror-pr.sh <PR_NUMBER> <YOUR_FORK_REMOTE>
463-
```
464-
465-
If you omit the PR number, you'll be prompted to select one interactively.
466-
Same for the fork remote, if you omit it, it will get asked with fzf.
467-
468-
### What the Script Does
469-
470-
- Checks out the external PR locally.
471-
- Pushes the branch to your fork with a unique name.
472-
- Creates a draft pull request on the upstream repository with a `[MIRRORED] DO NOT MERGE` title and a `do-not-merge` label.
473-
- Comments on the original PR with a link to the mirrored PR.
474-
475-
This process allows E2E tests to run on the mirrored PR, while preventing accidental merges. Once the original PR is merged, the mirrored PR can be closed.
476-
477-
See the script (`./hack/mirror-pr.sh`) in the repository for details.
478-
479-
### When all is green in the mirrored PR pull request
480-
481-
- You can merge the external contributor original PR.
482-
- Close the mirrored PR.
483-
- Cleanup the branches on your fork or on your local repo
484-
485-
# Links
486-
487-
- [Jira Backlog](https://issues.redhat.com/browse/SRVKP-2144?jql=component%20%3D%20%22Pipeline%20as%20Code%22%20%20AND%20status%20!%3D%20Done)
488-
- [Bitbucket Data Center Rest API](https://docs.atlassian.com/bitbucket-server/rest/7.17.0/bitbucket-rest.html)
489-
- [GitHub API](https://docs.github.com/en/rest/reference)
490-
- [GitLab API](https://docs.gitlab.com/ee/api/api_resources.html)

docs/content/docs/dev/release-process.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,34 @@ git tag v1.2.3
1919
* And pushing it directly to the repo (you need access) :
2020

2121
```shell
22-
% NOTESTS=ci git push git@github.com:openshift-pipelines/pipelines-as-code refs/tags/1.2.3
22+
% git push --no-verify git@github.com:openshift-pipelines/pipelines-as-code refs/tags/1.2.3
2323
```
2424

2525
* When it started you can follow it on the pac cluster :
2626

2727
`tkn pr logs -n pipelines-as-code-ci -Lf`
2828

2929
* After a while (gorelease takes sometime) If everything is fine you should
30-
have the new version set as pre-release in
30+
have the new version set as pre-release inside:
31+
3132
<https://github.com/openshift-pipelines/pipelines-as-code/releases>
3233

3334
* Edit the release like the other releases has been done with a snippet of the highlight of the release.
3435

35-
* Announce it on Slack (upstream/downstream) and twitter.
36-
37-
## Packages
36+
* If you use AI:
37+
* make sure to verify the content as it may contains some mistakes.
38+
* don't make it overusing emojis, let's make it professional.
39+
* make sure to categorize the changes properly. sometime it would expose
40+
internal changes as major features.
3841

39-
* [Arch AUR](https://aur.archlinux.org/packages/tkn-pac): Ping chmouel for an update
42+
* Announce it on Slack (upstream/downstream) and twitter.
4043

41-
# Issues you may see
44+
## Packages
4245

4346
* Sometimes, there may be some issues with system or others. If you need to re-kick the release process you need to :
4447

4548
```shell
46-
git tag --sign --force v1.2.3
49+
git tag --force v1.2.3
4750
git push --force git@github.com:openshift-pipelines/pipelines-as-code v1.2.3
4851
```
4952

hack/gh-workflow-ci.sh

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,33 @@ create_second_github_app_controller_on_ghe() {
7171
}
7272

7373
get_tests() {
74-
target=$1
74+
local target="$1"
75+
local -a testfiles
76+
local all_tests
7577
mapfile -t testfiles < <(find test/ -maxdepth 1 -name '*.go')
76-
ghglabre="Github|Gitlab|Bitbucket"
77-
if [[ ${target} == "providers" ]]; then
78-
grep -hioP "^func Test.*(${ghglabre})(\w+)\(" "${testfiles[@]}" | sed -e 's/func[ ]*//' -e 's/($//'
79-
elif [[ ${target} == "gitea_others" ]]; then
80-
grep -hioP '^func Test(\w+)\(' "${testfiles[@]}" | grep -iPv "(${ghglabre})" | sed -e 's/func[ ]*//' -e 's/($//'
81-
else
82-
echo "Invalid target: ${target}"
83-
echo "supported targets: githubgitlab, others"
84-
fi
78+
all_tests=$(grep -hioP '^func[[:space:]]+Test[[:alnum:]_]+' "${testfiles[@]}" | sed -E 's/^func[[:space:]]+//')
79+
80+
case "${target}" in
81+
concurrency)
82+
printf '%s\n' "${all_tests}" | grep -iP 'Concurrency'
83+
;;
84+
github)
85+
printf '%s\n' "${all_tests}" | grep -iP 'Github' | grep -ivP 'Concurrency|GithubSecond|SecondController'
86+
;;
87+
github_second_controller)
88+
printf '%s\n' "${all_tests}" | grep -iP 'GithubSecond|SecondController' | grep -ivP 'Concurrency'
89+
;;
90+
gitlab_bitbucket)
91+
printf '%s\n' "${all_tests}" | grep -iP 'Gitlab|Bitbucket' | grep -ivP 'Concurrency'
92+
;;
93+
gitea_others)
94+
printf '%s\n' "${all_tests}" | grep -ivP 'Github|Gitlab|Bitbucket|Concurrency'
95+
;;
96+
*)
97+
echo "Invalid target: ${target}"
98+
echo "supported targets: github, github_second_controller, gitlab_bitbucket, gitea_others, concurrency"
99+
;;
100+
esac
85101
}
86102

87103
run_e2e_tests() {

hack/pr-ci/uv.lock

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hack/second-controller.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
#!/usr/bin/env python3
1+
#!/usr/bin/env -S uv --quiet run --script
2+
# /// script
3+
# requires-python = ">=3.12"
4+
# dependencies = [
5+
# "requests",
6+
# "PyYAML",
7+
# ]
8+
# ///
29
# Author: Chmouel Boudjnah <chmouel@redhat.com>
310
#
411
# Licensed under the Apache License, Version 2.0 (the "License"); you may

test/README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,13 @@ Tests run on:
128128

129129
### Test Categories
130130

131-
The tests are separated into two main categories (matrix strategy):
131+
The tests are separated into provider categories (matrix strategy):
132132

133-
- `providers` - Tests for GitHub, GitLab, and Bitbucket
134-
- `gitea_others` - Tests for Gitea and other non-provider specific functionality
133+
- `github` - GitHub tests (excluding second controller and concurrency)
134+
- `github_second_controller` - GitHub second controller tests
135+
- `gitlab_bitbucket` - GitLab and Bitbucket tests
136+
- `gitea_others` - Gitea and other non-provider specific functionality
137+
- `concurrency` - Concurrency-specific tests
135138

136139
This split helps reduce the load on external APIs during testing and provides more focused test results.
137140

0 commit comments

Comments
 (0)