You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/04/08 11:05:13 UTC
[GitHub] [ozone] adoroszlai opened a new pull request, #3287: HDDS-6512. Install Hugo during build if needed
adoroszlai opened a new pull request, #3287:
URL: https://github.com/apache/ozone/pull/3287
## What changes were proposed in this pull request?
Install Hugo if necessary during build. Advantages:
* one fewer dependency to manually install
* improve stability by using fixed Hugo version, newer ones might break compatibility
Reuse existing `docs.sh` (run in CI by _basic (docs)_ check) for this purpose.
Allow skipping the execution of `docs.sh` via the new `skipDocs` property. This is set by `build.sh`, so that other checks do not fail in case of doc validation problems, which should be caught by the _basic (docs)_ check.
https://issues.apache.org/jira/browse/HDDS-6512
## How was this patch tested?
### Hugo available
```
$ rm -fr .dev-tools/hugo
$ which hugo
/usr/local/bin/hugo
$ mvn -am -pl :hdds-docs clean compile
...
[INFO] --- exec-maven-plugin:1.3.1:exec (default) @ hdds-docs ---
Skip installing hugo, as it's already available on PATH.
Start building sites …
| EN | ZH
-------------------+----+-----
Pages | 86 | 50
Paginator pages | 0 | 0
Non-page files | 26 | 26
Static files | 26 | 26
Processed images | 0 | 0
Aliases | 1 | 0
Sitemaps | 2 | 1
Cleaned | 0 | 0
...
[INFO] BUILD SUCCESS
```
### Force Ozone-specific tool
```
$ rm -fr .dev-tools/hugo
$ which hugo
/usr/local/bin/hugo
$ OZONE_PREFER_LOCAL_TOOL=false mvn -am -pl :hdds-docs clean compile
...
[INFO] --- exec-maven-plugin:1.3.1:exec (default) @ hdds-docs ---
Installed hugo in .dev-tools/hugo
Start building sites …
| EN | ZH
-------------------+----+-----
Pages | 86 | 50
Paginator pages | 0 | 0
Non-page files | 26 | 26
Static files | 26 | 26
Processed images | 0 | 0
Aliases | 1 | 0
Sitemaps | 2 | 1
Cleaned | 0 | 0
...
[INFO] BUILD SUCCESS
```
### Hugo not available
Verified that docs are built even if Hugo is not installed:
```
$ rm -fr .dev-tools/hugo
$ chmod 600 /usr/local/bin/hugo
$ which hugo
hugo not found
$ mvn -am -pl :hdds-docs clean compile
...
[INFO] --- exec-maven-plugin:1.3.1:exec (default) @ hdds-docs ---
Installed hugo in .dev-tools/hugo
Start building sites …
| EN | ZH
-------------------+----+-----
Pages | 86 | 50
Paginator pages | 0 | 0
Non-page files | 26 | 26
Static files | 26 | 26
Processed images | 0 | 0
Aliases | 1 | 0
Sitemaps | 2 | 1
Cleaned | 0 | 0
...
[INFO] BUILD SUCCESS
```
### Skipping docs build
Verified that Hugo is not installed or executed with `-DskipDocs`:
```
$ rm -fr .dev-tools/hugo
$ which hugo
hugo not found
$ mvn -DskipDocs -am -pl :hdds-docs clean compile
...
[INFO] --- exec-maven-plugin:1.3.1:exec (default) @ hdds-docs ---
[INFO] skipping execute as per configuraion
...
[INFO] BUILD SUCCESS
```
Regular CI:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] JyotinderSingh commented on pull request #3287: HDDS-6512. Install Hugo during build if needed
Posted by GitBox <gi...@apache.org>.
JyotinderSingh commented on PR #3287:
URL: https://github.com/apache/ozone/pull/3287#issuecomment-1093113614
Thank you for the DX and stability improvement @adoroszlai. Just to understand the flow - the Hugo version that is installed here depends on what is defined inside `dev-support/checks/_lib.sh`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] adoroszlai commented on pull request #3287: HDDS-6512. Install Hugo during build if needed
Posted by GitBox <gi...@apache.org>.
adoroszlai commented on PR #3287:
URL: https://github.com/apache/ozone/pull/3287#issuecomment-1093122698
> does the Hugo version that is installed here depend on what is defined inside `dev-support/checks/_lib.sh`?
Correct. It can be overridden by setting the `HUGO_VERSION` environment variable, if you would like to try other versions.
```
$ OZONE_PREFER_LOCAL_TOOLS=false HUGO_VERSION=0.96.0 mvn -DskipTests -am -pl :hdds-docs clean compile
...
Installed hugo in .dev-tools/hugo
...
Start building sites …
hugo v0.96.0-2fd4a7d3d6845e75f8b8ae3a2a7bd91438967bbb ...
...
[INFO] BUILD SUCCESS
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] adoroszlai commented on pull request #3287: HDDS-6512. Install Hugo during build if needed
Posted by GitBox <gi...@apache.org>.
adoroszlai commented on PR #3287:
URL: https://github.com/apache/ozone/pull/3287#issuecomment-1109379775
Thanks @JyotinderSingh and @smengcl for the review.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] adoroszlai merged pull request #3287: HDDS-6512. Install Hugo during build if needed
Posted by GitBox <gi...@apache.org>.
adoroszlai merged PR #3287:
URL: https://github.com/apache/ozone/pull/3287
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org