Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: better support PR from fork for preview build and ref validation #698

Merged

Conversation

tbouffard
Copy link
Member

@tbouffard tbouffard commented Apr 16, 2024

Let pass the git repo url to the preview script:

  • Only valid for a branch preview for a component.
  • This allows you to use an alternative URL to the one configured for the component, in particular to use a fork.

The "build-and-publish-pr-preview" and the "build-pr-site" (used for references validation) actions set this new argument to use the git URL of the branch of the PR
This ensures that the git URL of the repository whose the PR is originated from is used (fork or upstream repository).

Covers #402

Notes

Validation done for

Only valid for a branch preview for a component.
This allows you to use an alternative URL to the one configured for the component, in particular to
use a fork.
Copy link
Contributor

github-actions bot commented Apr 16, 2024

♻️ PR Preview 1bd62c0 has been successfully destroyed since this PR has been closed.

🤖 By surge-preview

Copy link
Contributor

github-actions bot commented Apr 16, 2024

♻️ PR Preview 1bd62c0 has been successfully destroyed since this PR has been closed.

🤖 By surge-preview

@tbouffard tbouffard changed the title ci: let pass the git repo url to the preview script ci: better support PR from fork for preview build and ref validation Apr 16, 2024
Copy link
Contributor

@benjaminParisel benjaminParisel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job 👍

.github/actions/build-pr-site/action.yml Show resolved Hide resolved
.github/actions/build-pr-site/action.yml Outdated Show resolved Hide resolved
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@benjaminParisel benjaminParisel marked this pull request as ready for review April 17, 2024 09:21
@benjaminParisel benjaminParisel added the enhancement New feature or request label Apr 17, 2024
@benjaminParisel benjaminParisel merged commit ad588f0 into master Apr 17, 2024
6 checks passed
@benjaminParisel benjaminParisel deleted the feat/build_single_component_with_branch_from_forked_repo branch April 17, 2024 09:29
benjaminParisel pushed a commit to bonitasoft/bonita-doc that referenced this pull request Apr 17, 2024
This applies to the "build preview" and the "references validation".

The content of the branch of the fork is now correctly used. Previously, the branch of the fork wasn't found by Antora, so the content of the generated site was empty.

### Notes

Covers
bonitasoft/bonita-documentation-site#402
This depends on
bonitasoft/bonita-documentation-site#698
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI ⚙️ enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants