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

fix: disable profile CI when building reference docs #2367

Merged
merged 3 commits into from Nov 21, 2023

Conversation

JoeWang1127
Copy link
Contributor

@JoeWang1127 JoeWang1127 commented Nov 20, 2023

Fix #2101

@@ -24,12 +24,8 @@

<!--maven-resources-plugin:3.2.0:copy-resources fails: https://issues.apache.org/jira/browse/MSHARED-966-->
<maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
<!-- override version inherited from spring-cloud-build parent to one that is available on Maven Central -->
<spring-asciidoctor-backends.version>0.0.4</spring-asciidoctor-backends.version>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not needed because asciidoctor backend version is 0.0.5 and available on Maven central.

@JoeWang1127
Copy link
Contributor Author

The GH action to update reference docs ran successfully: https://github.com/GoogleCloudPlatform/spring-cloud-gcp/actions/runs/6937045526/job/18870340753

# there's env.GITHUB_API_URL defined in the environment by
# default.
# See https://github.com/spring-cloud/spring-cloud-build/blob/main/pom.xml#L1406C12-L1419.
./mvnw clean install -P docs -P '!CI' -pl docs -DskipTests
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @lqiu96's help for debugging the root cause of process-asciidoc is not executed in GH action runner.

I intended to remove -q from the maven command for logging purpose.

@JoeWang1127 JoeWang1127 marked this pull request as ready for review November 21, 2023 00:06
@JoeWang1127 JoeWang1127 requested a review from a team as a code owner November 21, 2023 00:06
@JoeWang1127 JoeWang1127 changed the title fix: fix reference-doc fix: disable profile CI when building reference docs Nov 21, 2023
Copy link

sonarcloud bot commented Nov 21, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

./mvnw clean install -P docs -pl docs -DskipTests -q
# Disable profile CI (inherited from spring-cloud-build/pom.xml) so
# process-asciidoc can be executed in GH action runner.
# Profile CI will be activated in GH action runner because
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel the profile name "CI" and its activation condition are bad. Is it clear why the profile "CI" is set up like that?

Copy link
Member

Choose a reason for hiding this comment

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

CI profile was introduced based on this issue:
spring-cloud/spring-cloud-build#239

Don't access spring-doc-resources in CI builds[, because it] requires authentication to retrieve.

Copy link
Contributor

Choose a reason for hiding this comment

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

That assumption (pull request builds = GitHub Actions) is wrong. Now I know it's outside our codebase.

@JoeWang1127 JoeWang1127 merged commit d207fd8 into main Nov 21, 2023
51 checks passed
@JoeWang1127 JoeWang1127 deleted the fix/fix-reference-doc branch November 21, 2023 15:13
@JoeWang1127 JoeWang1127 linked an issue Nov 22, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Currently 4.x refdoc generation is failing Reference Documentation issues
5 participants