From ed6375f17e6b8ec326c89918febdeee618434113 Mon Sep 17 00:00:00 2001 From: Kin Ueng Date: Mon, 28 Aug 2023 08:51:52 -0500 Subject: [PATCH 1/5] build: avoid using Maven to copy javadoc files --- docker/Dockerfile.staging | 2 ++ scripts/build/docs_part_2.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile.staging b/docker/Dockerfile.staging index b61a9d9b93..96963a0e1b 100644 --- a/docker/Dockerfile.staging +++ b/docker/Dockerfile.staging @@ -62,6 +62,8 @@ RUN features.sh COPY --from=war --chown=1001:0 target/openliberty-website-1.0-SNAPSHOT /config/apps/openliberty.war +COPY --from=docs --chown=1001:0 src/main/content/docs-javadoc/modules /config/apps/openliberty.war/docs + # This script will add the requested server configurations, apply any interim fixes and populate caches to # optimize runtime ARG VERBOSE=true diff --git a/scripts/build/docs_part_2.sh b/scripts/build/docs_part_2.sh index c2940649c8..91c81d5b77 100755 --- a/scripts/build/docs_part_2.sh +++ b/scripts/build/docs_part_2.sh @@ -14,7 +14,7 @@ $BUILD_SCRIPTS_DIR/javadoc_clone.sh # Move the javadocs into the web app echo "Moving javadocs to the jekyll webapp" timer_start=$(date +%s) -cp -r src/main/content/docs-javadoc/modules target/jekyll-webapp/docs +# cp -r src/main/content/docs-javadoc/modules target/jekyll-webapp/docs timer_end=$(date +%s) echo "Total execution time for copying javadoc to webapp: '$(date -u --date @$(( $timer_end - $timer_start )) +%H:%M:%S)'" From 622c34df77830251fbe93c976ffe9d299e2abf29 Mon Sep 17 00:00:00 2001 From: Kin Ueng Date: Mon, 28 Aug 2023 08:58:18 -0500 Subject: [PATCH 2/5] build: change javadoc location --- scripts/build/javadoc_modify.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/build/javadoc_modify.sh b/scripts/build/javadoc_modify.sh index 611036ff00..a833ed1a01 100755 --- a/scripts/build/javadoc_modify.sh +++ b/scripts/build/javadoc_modify.sh @@ -41,12 +41,12 @@ export -f modifyStylesheetFrameless export -f modifySearch export -f modifyRedirect -find target/jekyll-webapp/docs -path "*microprofile*/stylesheet.css" -exec bash -c 'modifyStylesheet {}' \; -find target/jekyll-webapp/docs -path "*liberty-*/stylesheet.css" -exec bash -c 'modifyStylesheet {}' \; -find target/jekyll-webapp/docs -path "*io.openliberty*/stylesheet.css" -exec bash -c 'modifyStylesheetFrameless {}' \; -find target/jekyll-webapp/docs -path "*com.ibm.websphere.appserver*/stylesheet.css" -exec bash -c 'modifyStylesheetFrameless {}' \; -find target/jekyll-webapp/docs -name search.js -exec bash -c 'modifySearch {}' \; -find target/jekyll-webapp/docs -name script.js -exec bash -c 'modifyRedirect {}' \; +find src/main/content/docs-javadoc/modules -path "*microprofile*/stylesheet.css" -exec bash -c 'modifyStylesheet {}' \; +find src/main/content/docs-javadoc/modules -path "*liberty-*/stylesheet.css" -exec bash -c 'modifyStylesheet {}' \; +find src/main/content/docs-javadoc/modules -path "*io.openliberty*/stylesheet.css" -exec bash -c 'modifyStylesheetFrameless {}' \; +find src/main/content/docs-javadoc/modules -path "*com.ibm.websphere.appserver*/stylesheet.css" -exec bash -c 'modifyStylesheetFrameless {}' \; +find src/main/content/docs-javadoc/modules -name search.js -exec bash -c 'modifySearch {}' \; +find src/main/content/docs-javadoc/modules -name script.js -exec bash -c 'modifyRedirect {}' \; timer_end=$(date +%s) echo "Total execution time for modifying the javadoc: '$(date -u --date @$(( $timer_end - $timer_start )) +%H:%M:%S)'" \ No newline at end of file From af3243e856ae3a6cc8f08c2064315bd245bbe695 Mon Sep 17 00:00:00 2001 From: Kin Ueng Date: Mon, 28 Aug 2023 08:58:45 -0500 Subject: [PATCH 3/5] chore: add end of file --- scripts/build/javadoc_modify.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build/javadoc_modify.sh b/scripts/build/javadoc_modify.sh index a833ed1a01..94eebd5561 100755 --- a/scripts/build/javadoc_modify.sh +++ b/scripts/build/javadoc_modify.sh @@ -49,4 +49,4 @@ find src/main/content/docs-javadoc/modules -name search.js -exec bash -c 'modif find src/main/content/docs-javadoc/modules -name script.js -exec bash -c 'modifyRedirect {}' \; timer_end=$(date +%s) -echo "Total execution time for modifying the javadoc: '$(date -u --date @$(( $timer_end - $timer_start )) +%H:%M:%S)'" \ No newline at end of file +echo "Total execution time for modifying the javadoc: '$(date -u --date @$(( $timer_end - $timer_start )) +%H:%M:%S)'" From 4f915a4a6585c679fb044616136764ebf14728d1 Mon Sep 17 00:00:00 2001 From: Kin Ueng Date: Mon, 28 Aug 2023 11:24:07 -0500 Subject: [PATCH 4/5] chore: remove dead build code --- scripts/build/docs_part_2.sh | 8 -------- 1 file changed, 8 deletions(-) diff --git a/scripts/build/docs_part_2.sh b/scripts/build/docs_part_2.sh index 91c81d5b77..ec26a6caea 100755 --- a/scripts/build/docs_part_2.sh +++ b/scripts/build/docs_part_2.sh @@ -11,14 +11,6 @@ echo "Total execution time for parsing the features toc: '$(date -u --date @$(( echo "Begin building javadoc content" $BUILD_SCRIPTS_DIR/javadoc_clone.sh -# Move the javadocs into the web app -echo "Moving javadocs to the jekyll webapp" -timer_start=$(date +%s) -# cp -r src/main/content/docs-javadoc/modules target/jekyll-webapp/docs -timer_end=$(date +%s) -echo "Total execution time for copying javadoc to webapp: '$(date -u --date @$(( $timer_end - $timer_start )) +%H:%M:%S)'" - - # Special handling for javadocs $BUILD_SCRIPTS_DIR/javadoc_modify.sh From 6d87959d3bda366eaebc7dd2ff9e0c62ec137fde Mon Sep 17 00:00:00 2001 From: natalie-bernhard Date: Mon, 28 Aug 2023 11:27:44 -0500 Subject: [PATCH 5/5] copy javadocs via docker --- docker/Dockerfile.demo | 2 ++ docker/Dockerfile.draft | 2 ++ docker/Dockerfile.prod | 2 ++ docker/docs/Dockerfile.docs.draft | 2 ++ docker/docs/Dockerfile.docs.staging | 2 ++ 5 files changed, 10 insertions(+) diff --git a/docker/Dockerfile.demo b/docker/Dockerfile.demo index d6daae1694..931b7e7482 100644 --- a/docker/Dockerfile.demo +++ b/docker/Dockerfile.demo @@ -61,6 +61,8 @@ RUN features.sh COPY --from=war --chown=1001:0 target/openliberty-website-1.0-SNAPSHOT /config/apps/openliberty.war +COPY --from=docs --chown=1001:0 src/main/content/docs-javadoc/modules /config/apps/openliberty.war/docs + # This script will add the requested server configurations, apply any interim fixes and populate caches to # optimize runtime RUN configure.sh diff --git a/docker/Dockerfile.draft b/docker/Dockerfile.draft index 88e6492626..e830d3d4de 100644 --- a/docker/Dockerfile.draft +++ b/docker/Dockerfile.draft @@ -62,6 +62,8 @@ RUN features.sh COPY --from=war --chown=1001:0 target/openliberty-website-1.0-SNAPSHOT /config/apps/openliberty.war +COPY --from=docs --chown=1001:0 src/main/content/docs-javadoc/modules /config/apps/openliberty.war/docs + # This script will add the requested server configurations, apply any interim fixes and populate caches to # optimize runtime RUN configure.sh diff --git a/docker/Dockerfile.prod b/docker/Dockerfile.prod index 1402266a47..72ec7a9b51 100644 --- a/docker/Dockerfile.prod +++ b/docker/Dockerfile.prod @@ -65,6 +65,8 @@ RUN features.sh COPY --from=war --chown=1001:0 target/openliberty-website-1.0-SNAPSHOT /config/apps/openliberty.war +COPY --from=docs --chown=1001:0 src/main/content/docs-javadoc/modules /config/apps/openliberty.war/docs + # This script will add the requested server configurations, apply any interim fixes and populate caches to # optimize runtime ARG VERBOSE=true diff --git a/docker/docs/Dockerfile.docs.draft b/docker/docs/Dockerfile.docs.draft index 82980ee1e1..a2242367f6 100644 --- a/docker/docs/Dockerfile.docs.draft +++ b/docker/docs/Dockerfile.docs.draft @@ -66,6 +66,8 @@ RUN features.sh COPY --from=war --chown=1001:0 target/openliberty-website-1.0-SNAPSHOT /config/apps/openliberty.war +COPY --from=docs --chown=1001:0 src/main/content/docs-javadoc/modules /config/apps/openliberty.war/docs + # This script will add the requested server configurations, apply any interim fixes and populate caches to # optimize runtime RUN configure.sh diff --git a/docker/docs/Dockerfile.docs.staging b/docker/docs/Dockerfile.docs.staging index 1d2cdd6c9f..c3838597b6 100644 --- a/docker/docs/Dockerfile.docs.staging +++ b/docker/docs/Dockerfile.docs.staging @@ -66,6 +66,8 @@ RUN features.sh COPY --from=war --chown=1001:0 target/openliberty-website-1.0-SNAPSHOT /config/apps/openliberty.war +COPY --from=docs --chown=1001:0 src/main/content/docs-javadoc/modules /config/apps/openliberty.war/docs + # This script will add the requested server configurations, apply any interim fixes and populate caches to # optimize runtime RUN configure.sh