├── .github └── workflows │ ├── drafts-to-test-java17.json │ ├── drafts-to-test.json │ ├── drafts-to-test-java21.json │ ├── guides-java21.json │ ├── get-docker-guides.py │ ├── guides-java17.json │ ├── get-guides-java17.py │ ├── get-guides-java21.py │ ├── add-to-projects.yml │ ├── docker-guides.json │ ├── get-repos.py │ ├── get-builds.py │ ├── license.yml │ ├── slack-alert.py │ ├── trigger-docker-daily-test.yml │ ├── trigger-pre-daily-build.yml │ ├── docker-daily-test-java21.yml │ ├── docker-daily-test-java17.yml │ ├── pre-daily-build.yml │ ├── manual-gm-candidate-container-test-java21.yml │ ├── manual-gm-candidate-container-test-java17.yml │ ├── docker-daily-test.yml │ ├── manual-gm-candidate-container-test.yml │ ├── daily-build-java21.yml │ ├── manual-docker-build-test-java17.yml │ ├── daily-build-java17.yml │ ├── manual-docker-build-test.yml │ └── daily-build.yml ├── os-tabs.adoc ├── cloud-hosted ├── new-terminal.md ├── before-start-information.md ├── gitclone.adoc └── skills-network-kube-setup.adoc ├── devmode-quit-ctrlc.adoc ├── trywhatyoubuild-end.adoc ├── devmode-build.adoc ├── ol-docker-pull.adoc ├── devmode-quit.adoc ├── devmode-test.adoc ├── ol-full-docker-pull.adoc ├── ol-kernel-docker-pull.adoc ├── ol-icr-full-docker-pull.adoc ├── ol-icr-kernel-docker-pull.adoc ├── .gitignore ├── finish.adoc ├── twyb-end.adoc ├── pr-checker ├── warning_list.json ├── linters │ ├── config │ │ └── java.header │ ├── .htmlhintrc │ ├── .yaml-lint.yml │ ├── .dockerfilelintrc │ ├── sun_checks.xml │ └── sun_check_skip_header.xml ├── deny_list.json ├── rules.json ├── checker.sh └── checker.py ├── trywhatyoubuild-intro.adoc ├── attribution.adoc ├── trywhatyoubuild-beg.adoc ├── mvncompile.adoc ├── twyb-intro.adoc ├── twyb-end-mvnw.adoc ├── devmode-start.adoc ├── devmode-start-cd.adoc ├── devmode-lmp33-start.adoc ├── mvnverify.adoc ├── devmode-lmp33-start-cd.adoc ├── gitclone-no-prereqs.adoc ├── gitclonedraft-no-prereqs.adoc ├── gitclone.adoc ├── mvnbuild.adoc ├── gitclonedraft.adoc ├── twyb-intro-mvnw.adoc ├── kube-minikube-teardown.adoc ├── devmode-mvnw-start.adoc ├── devmode-mvnw-start-cd.adoc ├── guide-redirects.properties ├── skills-network-kube-setup.adoc ├── guide_prereqs.json ├── README.md ├── kube-start.adoc ├── kube-prereq.adoc ├── istio-start.adoc ├── CONTRIBUTING.md ├── guide_categories.json ├── cloud-hosted-guides.json ├── guide_tags.json └── LICENSE /.github/workflows/drafts-to-test-java17.json: -------------------------------------------------------------------------------- 1 | [ 2 | ] 3 | -------------------------------------------------------------------------------- /.github/workflows/drafts-to-test.json: -------------------------------------------------------------------------------- 1 | [ 2 | "draft-guide-jakarta-concurrency" 3 | ] 4 | -------------------------------------------------------------------------------- /.github/workflows/drafts-to-test-java21.json: -------------------------------------------------------------------------------- 1 | [ 2 | "draft-guide-jakarta-concurrency" 3 | ] 4 | -------------------------------------------------------------------------------- /.github/workflows/guides-java21.json: -------------------------------------------------------------------------------- 1 | [ 2 | "guide-jpa-intro", 3 | "guide-spring-boot" 4 | ] 5 | -------------------------------------------------------------------------------- /os-tabs.adoc: -------------------------------------------------------------------------------- 1 | [.tab_link.windows_link] 2 | `*WINDOWS*` 3 | [.tab_link.mac_link] 4 | `*MAC*` 5 | [.tab_link.linux_link] 6 | `*LINUX*` 7 | -------------------------------------------------------------------------------- /cloud-hosted/new-terminal.md: -------------------------------------------------------------------------------- 1 | Open another command-line session by selecting ***Terminal*** > ***New Terminal*** from the menu of the IDE. 2 | -------------------------------------------------------------------------------- /devmode-quit-ctrlc.adoc: -------------------------------------------------------------------------------- 1 | When you are done checking out the service, exit dev mode by pressing `CTRL+C` in the command-line session where you ran Liberty. 2 | -------------------------------------------------------------------------------- /trywhatyoubuild-end.adoc: -------------------------------------------------------------------------------- 1 | After you are done checking out the application, stop the Open Liberty instance: 2 | 3 | ``` 4 | mvn liberty:stop-server 5 | ``` 6 | -------------------------------------------------------------------------------- /devmode-build.adoc: -------------------------------------------------------------------------------- 1 | == Running the application 2 | 3 | You started the Open Liberty in dev mode at the beginning of the guide, so all the changes were automatically picked up. 4 | -------------------------------------------------------------------------------- /ol-docker-pull.adoc: -------------------------------------------------------------------------------- 1 | Run the following command to download or update to the latest `open-liberty` Docker image: 2 | 3 | [role='command'] 4 | ``` 5 | docker pull open-liberty 6 | ``` -------------------------------------------------------------------------------- /.github/workflows/get-docker-guides.py: -------------------------------------------------------------------------------- 1 | import json 2 | 3 | JSON_PATH = ".github/workflows/docker-guides.json" 4 | 5 | if __name__ == "__main__": 6 | print(json.load(open(JSON_PATH))) 7 | -------------------------------------------------------------------------------- /devmode-quit.adoc: -------------------------------------------------------------------------------- 1 | When you are done checking out the service, exit dev mode by pressing `CTRL+C` in the command-line session where you ran Liberty, or by typing `q` and then pressing the `enter/return` key. 2 | -------------------------------------------------------------------------------- /devmode-test.adoc: -------------------------------------------------------------------------------- 1 | === Running the tests 2 | 3 | Because you started Open Liberty in dev mode, you can run the tests by pressing the `enter/return` key from the command-line session where you started dev mode. 4 | -------------------------------------------------------------------------------- /ol-full-docker-pull.adoc: -------------------------------------------------------------------------------- 1 | Run the following command to download or update to the latest Open Liberty Docker image: 2 | 3 | [role='command'] 4 | ``` 5 | docker pull openliberty/open-liberty:full-java11-openj9-ubi 6 | ``` 7 | -------------------------------------------------------------------------------- /ol-kernel-docker-pull.adoc: -------------------------------------------------------------------------------- 1 | Run the following command to download or update to the latest Open Liberty Docker image: 2 | 3 | [role='command'] 4 | ``` 5 | docker pull openliberty/open-liberty:kernel-java8-openj9-ubi 6 | ``` 7 | -------------------------------------------------------------------------------- /ol-icr-full-docker-pull.adoc: -------------------------------------------------------------------------------- 1 | Run the following command to download or update to the latest Open Liberty Docker image: 2 | 3 | [role='command'] 4 | ``` 5 | docker pull icr.io/appcafe/open-liberty:full-java11-openj9-ubi 6 | ``` 7 | -------------------------------------------------------------------------------- /ol-icr-kernel-docker-pull.adoc: -------------------------------------------------------------------------------- 1 | Run the following command to download or update to the latest Open Liberty Docker image: 2 | 3 | [role='command'] 4 | ``` 5 | docker pull icr.io/appcafe/open-liberty:kernel-java8-openj9-ubi 6 | ``` 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Maven generated 2 | target/ 3 | 4 | # Eclipse generated 5 | .apt_generated/ 6 | .settings/ 7 | .project 8 | .classpath 9 | .factorypath 10 | MANIFEST.MF 11 | 12 | # MacOS system files 13 | .DS_Store 14 | 15 | # Asciidoc rendered 16 | README.html 17 | 18 | # Zip files 19 | *.zip 20 | -------------------------------------------------------------------------------- /finish.adoc: -------------------------------------------------------------------------------- 1 | == Contribute to this guide 2 | 3 | Is something missing or broken? Raise an https://github.com/OpenLiberty/guide-{projectid}/issues[issue], 4 | or send us a https://github.com/OpenLiberty/guide-{projectId}/pulls[pull request]. 5 | 6 | https://github.com/OpenLiberty/guide-{projectId}[View this guide on GitHub]. 7 | -------------------------------------------------------------------------------- /twyb-end.adoc: -------------------------------------------------------------------------------- 1 | After you are finished checking out the application, stop the Liberty instance by pressing `CTRL+C` in the command-line session where you ran Liberty. Alternatively, you can run the `liberty:stop` goal from the `finish` directory in another shell session: 2 | 3 | [role='command'] 4 | ``` 5 | mvn liberty:stop 6 | ``` 7 | -------------------------------------------------------------------------------- /pr-checker/warning_list.json: -------------------------------------------------------------------------------- 1 | [ 2 | "we ", 3 | " we", 4 | "our ", 5 | " our", 6 | "since ", 7 | " since", 8 | "black ", 9 | " black", 10 | "white ", 11 | " white", 12 | "I ", 13 | " I", 14 | "master ", 15 | " master", 16 | "OpenLiberty ", 17 | " OpenLiberty" 18 | ] 19 | -------------------------------------------------------------------------------- /.github/workflows/guides-java17.json: -------------------------------------------------------------------------------- 1 | [ 2 | "guide-contract-testing", 3 | "guide-jakarta-faces", 4 | "guide-jakarta-websocket", 5 | "guide-jms-intro", 6 | "guide-liberty-deep-dive", 7 | "guide-liberty-deep-dive-gradle", 8 | "guide-microprofile-telemetry-grafana-automatic", 9 | "guide-microprofile-telemetry-grafana-custom" 10 | ] 11 | 12 | -------------------------------------------------------------------------------- /.github/workflows/get-guides-java17.py: -------------------------------------------------------------------------------- 1 | import json 2 | 3 | JSON_PATH = ".github/workflows/guides-java17.json" 4 | DRAFT_JSON_PATH = ".github/workflows/drafts-to-test-java17.json" 5 | 6 | if __name__ == "__main__": 7 | output = json.load(open(JSON_PATH)) 8 | draft = json.load(open(DRAFT_JSON_PATH)) 9 | output += draft 10 | print(output) 11 | -------------------------------------------------------------------------------- /.github/workflows/get-guides-java21.py: -------------------------------------------------------------------------------- 1 | import json 2 | 3 | JSON_PATH = ".github/workflows/guides-java21.json" 4 | DRAFT_JSON_PATH = ".github/workflows/drafts-to-test-java21.json" 5 | 6 | if __name__ == "__main__": 7 | output = json.load(open(JSON_PATH)) 8 | draft = json.load(open(DRAFT_JSON_PATH)) 9 | output += draft 10 | print(output) 11 | -------------------------------------------------------------------------------- /trywhatyoubuild-intro.adoc: -------------------------------------------------------------------------------- 1 | === Try what you'll build 2 | 3 | The `finish` directory in the root of this guide contains the finished application. Give it a try before you proceed. 4 | 5 | To try out the application, first navigate to the `finish` directory and then run the following 6 | Maven goal to build the application and run it inside Open Liberty: 7 | 8 | ``` 9 | cd finish 10 | mvn install liberty:start-server 11 | ``` 12 | -------------------------------------------------------------------------------- /attribution.adoc: -------------------------------------------------------------------------------- 1 | //// 2 | Copyright (c) 2018 IBM Corporation and others. 3 | Licensed under Creative Commons Attribution-NoDerivatives 4 | 4.0 International (CC BY-ND 4.0) 5 | https://creativecommons.org/licenses/by-nd/4.0/ 6 | 7 | Contributors: 8 | IBM Corporation 9 | //// 10 | == Guide Attribution 11 | 12 | // Specify where the guide is attributed to. 13 | {doctitle} [licensedClass]#by# {guide-author} [licensedClass]#is licensed under# CC BY-ND 4.0 -------------------------------------------------------------------------------- /.github/workflows/add-to-projects.yml: -------------------------------------------------------------------------------- 1 | name: Add issues to Liberty guides backlog project 2 | 3 | on: 4 | issues: 5 | types: 6 | - opened 7 | - transferred 8 | 9 | jobs: 10 | add-to-project: 11 | name: Add issue to backlog 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/add-to-project@v0.4.0 15 | with: 16 | project-url: https://github.com/orgs/OpenLiberty/projects/11 17 | github-token: ${{ secrets.ADMIN_BACKLOG }} 18 | -------------------------------------------------------------------------------- /pr-checker/linters/config/java.header: -------------------------------------------------------------------------------- 1 | ^// tag::copyright\[\]$ 2 | ^/\*{79}$ 3 | ^ \* Copyright \(c\) (\d\d\d\d, )?\d\d\d\d IBM Corporation and others.$ 4 | ^ \* All rights reserved. This program and the accompanying materials$ 5 | ^ \* are made available under the terms of the Eclipse Public License 2.0$ 6 | ^ \* which accompanies this distribution, and is available at$ 7 | ^ \* http://www.eclipse.org/legal/epl-2.0/$ 8 | ^ \*$ 9 | ^ \* SPDX-License-Identifier: EPL-2.0$ 10 | ^ \*{79}/$ 11 | ^// end::copyright\[\]$ 12 | -------------------------------------------------------------------------------- /pr-checker/deny_list.json: -------------------------------------------------------------------------------- 1 | [ 2 | "blacklist", 3 | "whitelist", 4 | "slave", 5 | "master repository", 6 | "black hat hacker", 7 | "white hat hacker", 8 | "Chinese wall", 9 | "man hour", 10 | "man day", 11 | "sanity test", 12 | "sanity check", 13 | "segregate", 14 | "segregation", 15 | "Scrum master", 16 | "tribe", 17 | " we ", 18 | " our ", 19 | " I ", 20 | " master ", 21 | " OpenLiberty ", 22 | " since ", 23 | " black ", 24 | " white " 25 | ] 26 | -------------------------------------------------------------------------------- /trywhatyoubuild-beg.adoc: -------------------------------------------------------------------------------- 1 | === Try what you'll build 2 | 3 | The `finish` directory in the root of this guide contains the finished application. Give it a try before you proceed. 4 | 5 | To try out the application, first go to the `finish` directory and run the following Maven goal to build the application inside Open Liberty: 6 | [role='command'] 7 | ``` 8 | mvn install 9 | ``` 10 | 11 | Next, run the Maven `liberty:start-server` goal to start the application inside Open Liberty: 12 | [role='command'] 13 | ``` 14 | mvn liberty:start-server 15 | ``` 16 | -------------------------------------------------------------------------------- /mvncompile.adoc: -------------------------------------------------------------------------------- 1 | //// 2 | Copyright (c) 2017 IBM Corporation and others. 3 | Licensed under Creative Commons Attribution-NoDerivatives 4 | 4.0 International (CC BY-ND 4.0) 5 | https://creativecommons.org/licenses/by-nd/4.0/ 6 | Contributors: 7 | IBM Corporation 8 | //// 9 | If you make changes to the code, use the Maven `compile` goal to rebuild the application and have the 10 | running Open Liberty instance pick them up automatically: 11 | 12 | ``` 13 | mvn compile 14 | ``` 15 | 16 | To stop the Open Liberty instance, run the Maven `liberty:stop-server` goal: 17 | 18 | ``` 19 | mvn liberty:stop-server 20 | ``` 21 | -------------------------------------------------------------------------------- /twyb-intro.adoc: -------------------------------------------------------------------------------- 1 | === Try what you'll build 2 | 3 | The `finish` directory in the root of this guide contains the finished application. Give it a try before you proceed. 4 | 5 | // tag::runCommand[] 6 | To try out the application, first go to the `finish` directory and run the following Maven goal to build the application and deploy it to Open Liberty: 7 | 8 | [role='command'] 9 | ``` 10 | cd finish 11 | mvn liberty:run 12 | ``` 13 | 14 | After you see the following message, your Liberty instance is ready: 15 | 16 | [role="no_copy"] 17 | ---- 18 | The defaultServer server is ready to run a smarter planet. 19 | ---- 20 | // end::runCommand[] 21 | -------------------------------------------------------------------------------- /cloud-hosted/before-start-information.md: -------------------------------------------------------------------------------- 1 | # Welcome to the cloud-hosted guide! 2 | 3 | In this guide, you will use a pre-configured environment that runs in containers on the cloud and includes everything that you need to complete the guide. 4 | 5 | This panel contains the step-by-step guide instructions. You can customize these instructions by using the toolbar at the top of this panel. Move between steps by using either the arrows or the buttons at the bottom of this panel. 6 | 7 | The other panel displays the IDE that you will use to create files, edit the code, and run commands. This IDE is based on Visual Studio Code. It includes pre-installed tools and a built-in terminal. 8 | -------------------------------------------------------------------------------- /twyb-end-mvnw.adoc: -------------------------------------------------------------------------------- 1 | After you are finished checking out the application, stop the Liberty instance by pressing `CTRL+C` in the command-line session where you ran Liberty. Alternatively, you can run the `liberty:stop` goal from the `finish` directory in another shell session: 2 | 3 | include::{common-includes}/os-tabs.adoc[] 4 | 5 | [.tab_content.windows_section] 6 | -- 7 | [role='command'] 8 | ``` 9 | mvnw.cmd liberty:stop 10 | ``` 11 | -- 12 | 13 | [.tab_content.mac_section] 14 | -- 15 | [role='command'] 16 | ``` 17 | ./mvnw liberty:stop 18 | ``` 19 | -- 20 | 21 | [.tab_content.linux_section] 22 | -- 23 | [role='command'] 24 | ``` 25 | ./mvnw liberty:stop 26 | ``` 27 | -- 28 | -------------------------------------------------------------------------------- /devmode-start.adoc: -------------------------------------------------------------------------------- 1 | When you run Open Liberty in https://openliberty.io/docs/latest/development-mode.html[dev mode^], dev mode listens for file changes and automatically recompiles and deploys your updates whenever you save a new change. Run the following goal to start Open Liberty in dev mode: 2 | 3 | [role=command] 4 | ``` 5 | mvn liberty:dev 6 | ``` 7 | 8 | After you see the following message, your Liberty instance is ready in dev mode: 9 | 10 | [role="no_copy"] 11 | ---- 12 | Press the Enter key to run tests on demand. 13 | ---- 14 | 15 | Dev mode holds your command-line session to listen for file changes. Open another command-line session to continue, or open the project in your editor. 16 | -------------------------------------------------------------------------------- /devmode-start-cd.adoc: -------------------------------------------------------------------------------- 1 | When you run Open Liberty in https://openliberty.io/docs/latest/development-mode.html[dev mode^], dev mode listens for file changes and automatically recompiles and deploys your updates whenever you save a new change. Run the following goal to start Open Liberty in dev mode: 2 | 3 | [role=command] 4 | ``` 5 | cd start 6 | mvn liberty:dev 7 | ``` 8 | 9 | After you see the following message, your Liberty instance is ready in dev mode: 10 | 11 | [role="no_copy"] 12 | ---- 13 | Press the Enter key to run tests on demand. 14 | ---- 15 | 16 | Dev mode holds your command-line session to listen for file changes. Open another command-line session to continue, or open the project in your editor. 17 | -------------------------------------------------------------------------------- /devmode-lmp33-start.adoc: -------------------------------------------------------------------------------- 1 | When you run Open Liberty in https://openliberty.io/docs/latest/development-mode.html[dev mode^], dev mode listens for file changes and automatically recompiles and deploys your updates whenever you save a new change. Run the following goal to start Open Liberty in dev mode: 2 | 3 | [role=command] 4 | ``` 5 | mvn liberty:dev 6 | ``` 7 | 8 | After you see the following message, your Liberty instance is ready in dev mode: 9 | 10 | [role="no_copy"] 11 | ---- 12 | ************************************************************** 13 | * Liberty is running in dev mode. 14 | ---- 15 | 16 | Dev mode holds your command-line session to listen for file changes. Open another command-line session to continue, or open the project in your editor. 17 | -------------------------------------------------------------------------------- /mvnverify.adoc: -------------------------------------------------------------------------------- 1 | //// 2 | Copyright (c) 2017 IBM Corporation and others. 3 | Licensed under Creative Commons Attribution-NoDerivatives 4 | 4.0 International (CC BY-ND 4.0) 5 | https://creativecommons.org/licenses/by-nd/4.0/ 6 | Contributors: 7 | IBM Corporation 8 | //// 9 | === Running the tests 10 | 11 | If the server is still running from the previous steps, stop it using the Maven `liberty:stop-server` goal from the active command-line session in the `start` directory: 12 | 13 | ``` 14 | mvn liberty:stop-server 15 | ``` 16 | 17 | Then, verify that the tests pass using the Maven `verify` goal: 18 | 19 | ``` 20 | mvn verify 21 | ``` 22 | 23 | It may take some time before build is complete. If the tests pass, you will see a similar output to the following: 24 | -------------------------------------------------------------------------------- /devmode-lmp33-start-cd.adoc: -------------------------------------------------------------------------------- 1 | When you run Open Liberty in https://openliberty.io/docs/latest/development-mode.html[dev mode^], dev mode listens for file changes and automatically recompiles and deploys your updates whenever you save a new change. Run the following goal to start Open Liberty in dev mode: 2 | 3 | [role=command] 4 | ``` 5 | cd start 6 | mvn liberty:dev 7 | ``` 8 | 9 | After you see the following message, your Liberty instance is ready in dev mode: 10 | 11 | [role="no_copy"] 12 | ---- 13 | ************************************************************** 14 | * Liberty is running in dev mode. 15 | ---- 16 | 17 | Dev mode holds your command-line session to listen for file changes. Open another command-line session to continue, or open the project in your editor. 18 | -------------------------------------------------------------------------------- /pr-checker/linters/.htmlhintrc: -------------------------------------------------------------------------------- 1 | { 2 | "tagname-lowercase": true, 3 | "attr-lowercase": false, 4 | "attr-value-double-quotes": true, 5 | "attr-value-not-empty": false, 6 | "attr-no-duplication": true, 7 | "doctype-first": false, 8 | "tag-pair": true, 9 | "tag-self-close": false, 10 | "spec-char-escape": true, 11 | "id-unique": true, 12 | "src-not-empty": true, 13 | "title-require": false, 14 | "alt-require": false, 15 | "doctype-html5": true, 16 | "id-class-value": "hump", 17 | "style-disabled": false, 18 | "inline-style-disabled": false, 19 | "inline-script-disabled": false, 20 | "space-tab-mixed-disabled": "space", 21 | "id-class-ad-disabled": false, 22 | "href-abs-or-rel": false, 23 | "attr-unsafe-chars": true, 24 | "head-script-disabled": false 25 | } 26 | -------------------------------------------------------------------------------- /gitclone-no-prereqs.adoc: -------------------------------------------------------------------------------- 1 | //// 2 | Copyright (c) 2025 IBM Corporation and others. 3 | Licensed under Creative Commons Attribution-NoDerivatives 4 | 4.0 International (CC BY-ND 4.0) 5 | https://creativecommons.org/licenses/by-nd/4.0/ 6 | Contributors: 7 | IBM Corporation 8 | //// 9 | == Getting started 10 | 11 | The fastest way to work through this guide is to clone the https://github.com/openliberty/guide-{projectid}.git[Git repository^] and use the projects that are provided inside: 12 | 13 | [source#git_clone, role="command", subs="attributes"] 14 | ---- 15 | git clone https://github.com/openliberty/guide-{projectid}.git 16 | cd guide-{projectid} 17 | ---- 18 | 19 | The `start` directory contains the starting project that you will build upon. 20 | 21 | The `finish` directory contains the finished project that you will build. 22 | -------------------------------------------------------------------------------- /gitclonedraft-no-prereqs.adoc: -------------------------------------------------------------------------------- 1 | //// 2 | Copyright (c) 2025 IBM Corporation and others. 3 | Licensed under Creative Commons Attribution-NoDerivatives 4 | 4.0 International (CC BY-ND 4.0) 5 | https://creativecommons.org/licenses/by-nd/4.0/ 6 | Contributors: 7 | IBM Corporation 8 | //// 9 | == Getting started 10 | 11 | The fastest way to work through this guide is to clone the https://github.com/openliberty/draft-guide-{projectid}.git[Git repository^] and use the projects that are provided inside: 12 | 13 | [source#git_clone, role="command", subs="attributes"] 14 | ---- 15 | git clone https://github.com/openliberty/draft-guide-{projectid}.git 16 | cd draft-guide-{projectid} 17 | ---- 18 | 19 | The `start` directory contains the starting project that you will build upon. 20 | 21 | The `finish` directory contains the finished project that you will build. 22 | -------------------------------------------------------------------------------- /pr-checker/rules.json: -------------------------------------------------------------------------------- 1 | { 2 | "-": { 3 | "log-level": "ERROR", 4 | "exception": [ 5 | "guide-microprofile-openapi", "guide-cloud-openshift-operator" 6 | ], 7 | "regex": "TO-DO add functionality to add new rules directly into this file" 8 | }, 9 | "license": { 10 | "log-level": "ERROR", 11 | "exception": [] 12 | }, 13 | "release_date": { 14 | "log-level": "ERROR", 15 | "exception": [] 16 | }, 17 | "page_tags": { 18 | "log-level": "ERROR", 19 | "exception": [] 20 | }, 21 | "line-length": { 22 | "log-level": "WARNING", 23 | "exception": [] 24 | }, 25 | "file_tags": { 26 | "log-level": "ERROR", 27 | "exception": [] 28 | }, 29 | "hotspots": { 30 | "log-level": "ERROR", 31 | "exception": [] 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /gitclone.adoc: -------------------------------------------------------------------------------- 1 | //// 2 | Copyright (c) 2017, 2021 IBM Corporation and others. 3 | Licensed under Creative Commons Attribution-NoDerivatives 4 | 4.0 International (CC BY-ND 4.0) 5 | https://creativecommons.org/licenses/by-nd/4.0/ 6 | Contributors: 7 | IBM Corporation 8 | //// 9 | == Getting started 10 | 11 | The fastest way to work through this guide is to clone the https://github.com/openliberty/guide-{projectid}.git[Git repository^] and use the projects that are provided inside: 12 | 13 | [source#git_clone, role="command", subs="attributes"] 14 | ---- 15 | git clone https://github.com/openliberty/guide-{projectid}.git 16 | cd guide-{projectid} 17 | ---- 18 | 19 | The `start` directory contains the starting project that you will build upon. 20 | 21 | The `finish` directory contains the finished project that you will build. 22 | 23 | Before you begin, make sure you have all the necessary [.prerequisites]#prerequisites#. 24 | -------------------------------------------------------------------------------- /mvnbuild.adoc: -------------------------------------------------------------------------------- 1 | //// 2 | Copyright (c) 2017, 2022 IBM Corporation and others. 3 | Licensed under Creative Commons Attribution-NoDerivatives 4 | 4.0 International (CC BY-ND 4.0) 5 | https://creativecommons.org/licenses/by-nd/4.0/ 6 | Contributors: 7 | IBM Corporation 8 | //// 9 | == Building and running the application 10 | 11 | To build the application, run the Maven `install` phase from the active command-line session in the `start` directory: 12 | 13 | ``` 14 | mvn install 15 | ``` 16 | 17 | This command builds the application and creates a `.war` file in the target directory. It also configures and installs Open Liberty into the `target/liberty/wlp` directory. 18 | 19 | Next, run the Maven `liberty:start-server` goal: 20 | 21 | ``` 22 | mvn liberty:start-server 23 | ``` 24 | 25 | This goal starts an Open Liberty server instance. Your Maven `pom.xml` is already configured to start the application in this server instance. 26 | -------------------------------------------------------------------------------- /gitclonedraft.adoc: -------------------------------------------------------------------------------- 1 | //// 2 | Copyright (c) 2017, 2025 IBM Corporation and others. 3 | Licensed under Creative Commons Attribution-NoDerivatives 4 | 4.0 International (CC BY-ND 4.0) 5 | https://creativecommons.org/licenses/by-nd/4.0/ 6 | Contributors: 7 | IBM Corporation 8 | //// 9 | == Getting started 10 | 11 | The fastest way to work through this guide is to clone the https://github.com/openliberty/draft-guide-{projectid}.git[Git repository^] and use the projects that are provided inside: 12 | 13 | [source#git_clone, role="command", subs="attributes"] 14 | ---- 15 | git clone https://github.com/openliberty/draft-guide-{projectid}.git 16 | cd draft-guide-{projectid} 17 | ---- 18 | 19 | The `start` directory contains the starting project that you will build upon. 20 | 21 | The `finish` directory contains the finished project that you will build. 22 | 23 | Before you begin, make sure you have all the necessary [.prerequisites]#prerequisites#. 24 | -------------------------------------------------------------------------------- /.github/workflows/docker-guides.json: -------------------------------------------------------------------------------- 1 | [ 2 | "guide-cloud-aws", 3 | "guide-cloud-google", 4 | "guide-cloud-ibm", 5 | "guide-cloud-openshift-operator", 6 | "guide-containerize", 7 | "guide-containerize-podman", 8 | "guide-docker", 9 | "guide-getting-started", 10 | "guide-graphql-client", 11 | "guide-istio-intro", 12 | "guide-kubernetes-intro", 13 | "guide-kubernetes-microprofile-config", 14 | "guide-kubernetes-microprofile-health", 15 | "guide-microprofile-config-profile", 16 | "guide-microprofile-reactive-messaging", 17 | "guide-microprofile-reactive-messaging-acknowledgment", 18 | "guide-microprofile-reactive-messaging-rest-integration", 19 | "guide-microprofile-rest-client-async", 20 | "guide-microprofile-istio-retry-fallback", 21 | "guide-reactive-messaging-sse", 22 | "guide-reactive-rest-client", 23 | "guide-reactive-service-testing", 24 | "guide-sessions", 25 | "guide-testcontainers" 26 | ] 27 | -------------------------------------------------------------------------------- /twyb-intro-mvnw.adoc: -------------------------------------------------------------------------------- 1 | === Try what you'll build 2 | 3 | The `finish` directory in the root of this guide contains the finished application. Give it a try before you proceed. 4 | 5 | // tag::runCommand[] 6 | To try out the application, first go to the `finish` directory and run the following Maven goal to build the application and deploy it to Open Liberty: 7 | 8 | include::{common-includes}/os-tabs.adoc[] 9 | 10 | [.tab_content.windows_section] 11 | -- 12 | [role='command'] 13 | ``` 14 | cd finish 15 | mvnw.cmd liberty:run 16 | ``` 17 | -- 18 | 19 | [.tab_content.mac_section] 20 | -- 21 | [role='command'] 22 | ``` 23 | cd finish 24 | ./mvnw liberty:run 25 | ``` 26 | -- 27 | 28 | [.tab_content.linux_section] 29 | -- 30 | [role='command'] 31 | ``` 32 | cd finish 33 | ./mvnw liberty:run 34 | ``` 35 | -- 36 | 37 | After you see the following message, your Liberty instance is ready: 38 | 39 | [role="no_copy"] 40 | ---- 41 | The defaultServer server is ready to run a smarter planet. 42 | ---- 43 | // end::runCommand[] 44 | -------------------------------------------------------------------------------- /kube-minikube-teardown.adoc: -------------------------------------------------------------------------------- 1 | //// 2 | Copyright (c) 2018, 2019 IBM Corporation and others. 3 | Licensed under Creative Commons Attribution-NoDerivatives 4 | 4.0 International (CC BY-ND 4.0) 5 | https://creativecommons.org/licenses/by-nd/4.0/ 6 | 7 | Contributors: 8 | IBM Corporation 9 | //// 10 | 11 | [.tab_link.windows_link] 12 | `*WINDOWS*` 13 | [.tab_link.mac_link] 14 | `*MAC*` 15 | [.tab_link.linux_link] 16 | `*LINUX*` 17 | 18 | [.tab_content.windows_section.mac_section] 19 | -- 20 | Nothing more needs to be done for Docker Desktop. 21 | -- 22 | 23 | [.tab_content.linux_section] 24 | -- 25 | Perform the following steps to return your environment to a clean state. 26 | 27 | . Point the Docker daemon back to your local machine: 28 | + 29 | [role=command] 30 | ``` 31 | eval $(minikube docker-env -u) 32 | ``` 33 | . Stop your Minikube cluster: 34 | + 35 | [role=command] 36 | ``` 37 | minikube stop 38 | ``` 39 | 40 | . Delete your cluster: 41 | + 42 | [role=command] 43 | ``` 44 | minikube delete 45 | ``` 46 | -- 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /devmode-mvnw-start.adoc: -------------------------------------------------------------------------------- 1 | When you run Open Liberty in https://openliberty.io/docs/latest/development-mode.html[dev mode^], dev mode listens for file changes and automatically recompiles and deploys your updates whenever you save a new change. Run the following goal to start Open Liberty in dev mode: 2 | 3 | include::{common-includes}/os-tabs.adoc[] 4 | 5 | [.tab_content.windows_section] 6 | -- 7 | [role='command'] 8 | ``` 9 | mvnw.cmd liberty:dev 10 | ``` 11 | -- 12 | 13 | [.tab_content.mac_section] 14 | -- 15 | [role='command'] 16 | ``` 17 | ./mvnw liberty:dev 18 | ``` 19 | -- 20 | 21 | [.tab_content.linux_section] 22 | -- 23 | [role='command'] 24 | ``` 25 | ./mvnw liberty:dev 26 | ``` 27 | -- 28 | 29 | After you see the following message, your Liberty instance is ready in dev mode: 30 | 31 | [role="no_copy"] 32 | ---- 33 | ************************************************************** 34 | * Liberty is running in dev mode. 35 | ---- 36 | 37 | Dev mode holds your command-line session to listen for file changes. Open another command-line session to continue, or open the project in your editor. 38 | -------------------------------------------------------------------------------- /cloud-hosted/gitclone.adoc: -------------------------------------------------------------------------------- 1 | //// 2 | Copyright (c) 2021, 2025 IBM Corporation and others. 3 | Licensed under Creative Commons Attribution-NoDerivatives 4 | 4.0 International (CC BY-ND 4.0) 5 | https://creativecommons.org/licenses/by-nd/4.0/ 6 | Contributors: 7 | IBM Corporation 8 | //// 9 | == Getting started 10 | 11 | To open a new command-line session, 12 | select ***Terminal*** > ***New Terminal*** from the menu of the IDE. 13 | 14 | Run the following command to navigate to the ***/home/project*** directory: 15 | 16 | ```bash 17 | cd /home/project 18 | ``` 19 | {: codeblock} 20 | 21 | The fastest way to work through this guide is to clone the https://github.com/openliberty/guide-{projectid}.git[Git repository^] and use the projects that are provided inside: 22 | 23 | [source, role="command", subs="attributes"] 24 | ---- 25 | git clone https://github.com/openliberty/guide-{projectid}.git 26 | cd guide-{projectid} 27 | ---- 28 | 29 | The `start` directory contains the starting project that you will build upon. 30 | 31 | The `finish` directory contains the finished project that you will build. 32 | -------------------------------------------------------------------------------- /.github/workflows/get-repos.py: -------------------------------------------------------------------------------- 1 | import json 2 | import requests 3 | 4 | BASE_REPO_URL = "https://api.github.com/orgs/OpenLiberty/repos" 5 | JSON_PATH = ".github/workflows/drafts-to-test.json" 6 | DEPRECATED = [ "guide-okd" ] 7 | HEADERS = { 8 | "Accept": "application/vnd.github.v3+json" 9 | } 10 | 11 | def published_guide_name(name): 12 | return "guide-" == name[:6] 13 | 14 | if __name__ == "__main__": 15 | output = [] 16 | 17 | r = requests.get(BASE_REPO_URL) 18 | 19 | if 'link' in r.headers: 20 | links = r.headers['link'].split(",") 21 | total_pages = int(links[1].split("page=")[1].split(">")[0]) 22 | else: 23 | total_pages = 1 24 | 25 | for page in range(1, total_pages): 26 | r = requests.get(f'{BASE_REPO_URL}?sort=full_name&page={page}') 27 | for repo in r.json(): 28 | repo_name = repo["name"] 29 | if published_guide_name(repo_name): 30 | if repo_name not in DEPRECATED: 31 | output.append(repo_name) 32 | 33 | drafts = json.load(open(JSON_PATH)) 34 | output += drafts 35 | 36 | print(output) 37 | -------------------------------------------------------------------------------- /devmode-mvnw-start-cd.adoc: -------------------------------------------------------------------------------- 1 | When you run Open Liberty in https://openliberty.io/docs/latest/development-mode.html[dev mode^], dev mode listens for file changes and automatically recompiles and deploys your updates whenever you save a new change. Run the following goal to start Open Liberty in dev mode: 2 | 3 | include::{common-includes}/os-tabs.adoc[] 4 | 5 | [.tab_content.windows_section] 6 | -- 7 | [role='command'] 8 | ``` 9 | cd start 10 | mvnw.cmd liberty:dev 11 | ``` 12 | -- 13 | 14 | [.tab_content.mac_section] 15 | -- 16 | [role='command'] 17 | ``` 18 | cd start 19 | ./mvnw liberty:dev 20 | ``` 21 | -- 22 | 23 | [.tab_content.linux_section] 24 | -- 25 | [role='command'] 26 | ``` 27 | cd start 28 | ./mvnw liberty:dev 29 | ``` 30 | -- 31 | 32 | After you see the following message, your Liberty instance is ready in dev mode: 33 | 34 | [role="no_copy"] 35 | ---- 36 | ************************************************************** 37 | * Liberty is running in dev mode. 38 | ---- 39 | 40 | Dev mode holds your command-line session to listen for file changes. Open another command-line session to continue, or open the project in your editor. 41 | -------------------------------------------------------------------------------- /cloud-hosted/skills-network-kube-setup.adoc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022 IBM Corporation and others. 2 | // Licensed under Creative Commons Attribution-NoDerivatives 3 | // 4.0 International (CC BY-ND 4.0) 4 | // https://creativecommons.org/licenses/by-nd/4.0/ 5 | // 6 | // Contributors: 7 | // IBM Corporation 8 | 9 | ifdef::cloud-hosted[] 10 | 11 | ::page{title="Logging into your cluster"} 12 | 13 | For this guide, you will use a container registry on IBM Cloud to deploy to Kubernetes. 14 | Get the name of your namespace with the following command: 15 | 16 | ``` 17 | bx cr namespace-list 18 | ``` 19 | 20 | Look for output that is similar to the following: 21 | 22 | ``` 23 | Listing namespaces for account 'QuickLabs - IBM Skills Network' in registry 'us.icr.io'... 24 | 25 | Namespace 26 | sn-labs-yourname 27 | ``` 28 | 29 | Run the following command to store the namespace name in a variable. 30 | 31 | ``` 32 | NAMESPACE_NAME=`bx cr namespace-list | grep sn-labs- | sed 's/ //g'` 33 | ``` 34 | 35 | Verify that the variable contains your namespace name: 36 | 37 | ``` 38 | echo $NAMESPACE_NAME 39 | ``` 40 | 41 | Log in to the registry with the following command: 42 | ``` 43 | bx cr login 44 | ``` 45 | 46 | endif::[] 47 | -------------------------------------------------------------------------------- /guide-redirects.properties: -------------------------------------------------------------------------------- 1 | # Redirects for Guides 2 | 3 | # A properties file for redirects. Should aim to be as specific as possible. 4 | # The key is the url pattern to match on. In general it is best to do specific 5 | # source to target redirects, so /index.html/ to /index.html rather than a 6 | # wildcard. You can do a wildcard by adding a * at the end. If you add a * at 7 | # the end, all instances of the string prior to the * are replaced by the property 8 | # value. Unlike servlet url patterns a * can be at the end of a string without 9 | # a preceeding / however, this should be done sparingly since it is more expensive. 10 | 11 | # If the pattern ends with [URI]* but the incoming request is for just [URI], 12 | # e.g. there's nothing for the * wildcard to match, then the redirect is not applied. 13 | # For example, if /a/*=/b/ and the incoming request is for "/a/" it will not be redirect to "/b/" 14 | # (for that to happen, /a/=/b/ will also need to be included in the redirect list. 15 | ################################################################################################ 16 | 17 | /guides/microprofile-intro.html=/guides/cdi-intro.html 18 | /guides/cloud-openshift.html=/guides/cloud-openshift-operator.html 19 | -------------------------------------------------------------------------------- /skills-network-kube-setup.adoc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021 IBM Corporation and others. 2 | // Licensed under Creative Commons Attribution-NoDerivatives 3 | // 4.0 International (CC BY-ND 4.0) 4 | // https://creativecommons.org/licenses/by-nd/4.0/ 5 | // 6 | // Contributors: 7 | // IBM Corporation 8 | 9 | ifdef::cloud-hosted[] 10 | 11 | == **Logging into your cluster** 12 | 13 | For this guide, you will use a container registry on IBM Cloud to deploy to Kubernetes. 14 | Get the name of your namespace with the following command: 15 | 16 | ``` 17 | bx cr namespace-list 18 | ``` 19 | {: codeblock} 20 | 21 | Look for output that is similar to the following: 22 | 23 | ``` 24 | Listing namespaces for account 'QuickLabs - IBM Skills Network' in registry 'us.icr.io'... 25 | 26 | Namespace 27 | sn-labs-yourname 28 | ``` 29 | 30 | Run the following command to store the namespace name in a variable. 31 | 32 | ``` 33 | NAMESPACE_NAME=`bx cr namespace-list | grep sn-labs- | sed 's/ //g'` 34 | ``` 35 | {: codeblock} 36 | 37 | Verify that the variable contains your namespace name: 38 | 39 | ``` 40 | echo $NAMESPACE_NAME 41 | ``` 42 | {: codeblock} 43 | 44 | Log in to the registry with the following command: 45 | ``` 46 | bx cr login 47 | ``` 48 | {: codeblock} 49 | 50 | endif::[] 51 | -------------------------------------------------------------------------------- /.github/workflows/get-builds.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | from datetime import date, timedelta 4 | 5 | BASE_DHE_URL = "https://public.dhe.ibm.com/ibmdl/export/pub/software/openliberty/runtime/nightly/" 6 | 7 | def yesterday(): 8 | return date.today() - timedelta(days=1) 9 | 10 | if __name__ == "__main__": 11 | date_to_get = yesterday().isoformat() 12 | builds = requests.get(f'{BASE_DHE_URL}/info.json').json() 13 | yesterdays_builds = [] 14 | 15 | if "versions" in builds: 16 | for build in builds["versions"]: 17 | if date_to_get in build: 18 | build_info = requests.get(f'{BASE_DHE_URL}/{build}/info.json') 19 | if build_info.ok: 20 | info = build_info.json() 21 | if "driver_location" in info: 22 | driver_location = info["driver_location"] 23 | build_level = driver_location[driver_location.find("cl") : driver_location.find(".zip")] 24 | build_info = { 25 | "date": build, 26 | "driver_location": driver_location, 27 | "build_level": build_level 28 | } 29 | yesterdays_builds.append(build_info) 30 | 31 | print(yesterdays_builds) 32 | -------------------------------------------------------------------------------- /guide_prereqs.json: -------------------------------------------------------------------------------- 1 | { 2 | "prereqs": [ 3 | { 4 | "name": "Java SDK", 5 | "link": "https://developer.ibm.com/languages/java/semeru-runtimes/downloads", 6 | "guides": ["*"], 7 | "exclude": ["contract-testing", "jakarta-faces", "jakarta-websocket", "jms-intro", "jpa-intro", "microprofile-telemetry-grafana-automatic", "microprofile-telemetry-grafana-custom", "spring-boot"] 8 | }, 9 | { 10 | "name": "Java SDK 17", 11 | "link": "https://developer.ibm.com/languages/java/semeru-runtimes/downloads", 12 | "guides": ["contract-testing", "jakarta-faces", "jakarta-websocket", "jms-intro", "microprofile-telemetry-grafana-automatic", "microprofile-telemetry-grafana-custom"] 13 | }, 14 | { 15 | "name": "Java SDK 21", 16 | "link": "https://developer.ibm.com/languages/java/semeru-runtimes/downloads", 17 | "guides": ["jpa-intro", "spring-boot"] 18 | }, 19 | { 20 | "name": "Git", 21 | "link": "https://git-scm.com/book/en/v2/Getting-Started-Installing-Git", 22 | "guides": ["*"] 23 | }, 24 | { 25 | "name": "Gradle", 26 | "link": "https://gradle.org/install", 27 | "guides": ["liberty-deep-dive-gradle"] 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Writing guides guidelines 2 | In this repository you will find a variety of common files and resources for writing the guides. 3 | 4 | The common files include: 5 | - `LICENSE` (to be placed in every guide). 6 | - [template.adoc](https://github.com/OpenLiberty/draft-guides-template#appendix-a-a-template-readmeadoc) guide template. 7 | - `.gitignore` common gitignore file (you should copy it into your guide repository. Feel free to edit it). 8 | - `gitclone.adoc` to place near the start of each guide for instructions on how to clone the guide repository and get started. 9 | - `finish.adoc` to place at the end of each guide. 10 | - `mvnbuild.adoc` to place near the end of the guide for maven build instructions. 11 | - `mvncompile.adoc` to place in the building section of the guide for instructions on how to repackage everything 12 | without having to restart the server. 13 | - `mvnverify.adoc` to place near the end of the guide for instructions on how to run the tests. 14 | - `guide_tags.json` to store tags for the guides. Full instructions for updating guide tags can be found in the [guides-template](https://github.com/OpenLiberty/draft-guides-template#step-4-create-a-new-guide). 15 | 16 | For additional instructions including formatting, styling, etc. of the guides, visit the Wiki located in this repository. 17 | 18 | **Please pay close attention to the "Getting started" Wiki page. It contains important information that will not only help you make decisions when writing your guides but will also help keep all the guides concise and clean.** 19 | -------------------------------------------------------------------------------- /.github/workflows/license.yml: -------------------------------------------------------------------------------- 1 | name: License Update 2 | on: 3 | schedule: 4 | - cron: 0 0 1 1 * 5 | jobs: 6 | Update-year: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v2 10 | with: 11 | token: ${{ secrets.ADMIN_TOKEN }} 12 | ref: qa 13 | - name: Update file 14 | run: | 15 | git ls-remote --exit-code --heads origin license-update && git push origin --delete license-update 16 | sed -i "3s/.*/^ \\\* Copyright \\\(c\\\) (\\\d\\\d\\\d\\\d, )?`date +"%Y"` IBM Corporation and others.$/" \ 17 | pr-checker/linters/config/java.header 18 | cat pr-checker/linters/config/java.header 19 | git config user.name github-actions 20 | git config user.email github-actions@github.com 21 | git add pr-checker/linters/config/java.header 22 | git commit -m "Update license year" 23 | git push origin pr-checker:license-update #change pr-checker to qa 24 | - name: Create pull request 25 | uses: actions/github-script@v3 26 | with: 27 | github-token: ${{ secrets.GITHUB_TOKEN }} 28 | script: | 29 | github.pulls.create({ 30 | owner: "${{ github.repository_owner }}", 31 | repo: "${{ github.event.repository.name }}", 32 | head: "${{ github.repository_owner }}:license-update", 33 | base: "qa", 34 | title: "Updating License Year", 35 | body: "Updating license year in java header", 36 | }) 37 | -------------------------------------------------------------------------------- /pr-checker/linters/.yaml-lint.yml: -------------------------------------------------------------------------------- 1 | --- 2 | ########################################### 3 | # Super linter custom configs # 4 | # These are the rules used for # 5 | # linting all the yaml files in the stack # 6 | # NOTE: # 7 | # You can disable line with: # 8 | # # yamllint disable-line # 9 | ########################################### 10 | rules: 11 | braces: 12 | level: warning 13 | min-spaces-inside: 0 14 | max-spaces-inside: 0 15 | min-spaces-inside-empty: 1 16 | max-spaces-inside-empty: 5 17 | brackets: 18 | level: warning 19 | min-spaces-inside: 0 20 | max-spaces-inside: 0 21 | min-spaces-inside-empty: 1 22 | max-spaces-inside-empty: 5 23 | colons: 24 | level: warning 25 | max-spaces-before: 0 26 | max-spaces-after: 1 27 | commas: 28 | level: warning 29 | max-spaces-before: 0 30 | min-spaces-after: 1 31 | max-spaces-after: 1 32 | comments: disable 33 | comments-indentation: disable 34 | document-end: disable 35 | document-start: 36 | level: warning 37 | present: true 38 | empty-lines: 39 | level: warning 40 | max: 2 41 | max-start: 0 42 | max-end: 0 43 | hyphens: 44 | level: warning 45 | max-spaces-after: 1 46 | indentation: 47 | level: warning 48 | spaces: consistent 49 | indent-sequences: true 50 | check-multi-line-strings: false 51 | key-duplicates: enable 52 | line-length: 53 | level: warning 54 | max: 80 55 | allow-non-breakable-words: true 56 | allow-non-breakable-inline-mappings: true 57 | new-line-at-end-of-file: disable 58 | new-lines: 59 | type: unix 60 | trailing-spaces: disable 61 | -------------------------------------------------------------------------------- /pr-checker/checker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -o pipefail 3 | 4 | repo=$1 5 | pr_number=$2 6 | 7 | SCRIPTPATH="$( 8 | cd "$(dirname "$0")" >/dev/null 2>&1 9 | pwd -P 10 | )" 11 | URL="https://api.github.com/repos/$repo/pulls/$pr_number/files" 12 | UPDATED_FILES="$(curl -s -X GET -G $URL | jq -r '[ .[] | select(.status != "removed") | .filename ]' | tr -d '\n')" 13 | ALL_FILES="$(curl -s -X GET -G $URL | jq -r '[ .[] | .filename ]' | tr -d '\n')" 14 | 15 | echo "$UPDATED_FILES" 16 | if [ $(echo $ALL_FILES | jq 'length') = 1 ] && [ $(echo $ALL_FILES | jq '.[0]' | tr -d '"') = "README.adoc" ]; then 17 | echo "Test can be skipped because only README.adoc was updated" 18 | echo "canSkip=true" >> $GITHUB_OUTPUT 19 | elif [ $(echo $ALL_FILES | jq 'length') = 1 ] && [ $(echo $ALL_FILES | jq '.[0]' | tr -d '"') = "CONTRIBUTING.md" ]; then 20 | echo "Test can be skipped because only CONTRIBUTING.md was updated" 21 | echo "canSkip=true" >> $GITHUB_OUTPUT 22 | elif [ $(echo $ALL_FILES | jq 'length') = 1 ] && [ $(echo $ALL_FILES | jq '.[0]' | tr -d '"') = "LICENSE" ]; then 23 | echo "Test can be skipped because only LICENSE was updated" 24 | echo "canSkip=true" >> $GITHUB_OUTPUT 25 | elif [ $(echo $ALL_FILES | jq 'length') = 1 ] && [ $(echo $ALL_FILES | jq '.[0]' | tr -d '"') = "scripts/dockerImageTest.sh" ]; then 26 | echo "Test can be skipped because only dockerImageTest.sh was updated" 27 | echo "canSkip=true" >> $GITHUB_OUTPUT 28 | elif [ $(echo $ALL_FILES | jq 'length') = 1 ] && [ $(echo $ALL_FILES | jq '.[0]' | tr -d '"') = ".github/dependabot.yml" ]; then 29 | echo "Test can be skipped because only dependabot.yml was updated" 30 | echo "canSkip=true" >> $GITHUB_OUTPUT 31 | else 32 | echo "Need to run test" 33 | echo "canSkip=false" >> $GITHUB_OUTPUT 34 | fi 35 | 36 | python3 "$SCRIPTPATH"/checker.py --deny "$SCRIPTPATH"/deny_list.json --warn "$SCRIPTPATH"/warning_list.json --tags "$SCRIPTPATH"/../guide_tags.json --repo "$repo" --rules "$SCRIPTPATH"/rules.json $(echo $UPDATED_FILES | jq '.[]' | tr -d '"') 37 | -------------------------------------------------------------------------------- /kube-start.adoc: -------------------------------------------------------------------------------- 1 | //// 2 | Copyright (c) 2018, 2019 IBM Corporation and others. 3 | Licensed under Creative Commons Attribution-NoDerivatives 4 | 4.0 International (CC BY-ND 4.0) 5 | https://creativecommons.org/licenses/by-nd/4.0/ 6 | Contributors: 7 | IBM Corporation 8 | //// 9 | 10 | == Starting and preparing your cluster for deployment 11 | 12 | Start your {kube} cluster. 13 | 14 | [.tab_link.windows_link] 15 | `*WINDOWS*` 16 | [.tab_link.mac_link] 17 | `*MAC*` 18 | [.tab_link.linux_link] 19 | `*LINUX*` 20 | 21 | [.tab_content.windows_section.mac_section] 22 | -- 23 | Start your Docker Desktop environment. 24 | 25 | ifdef::docker-desktop-description[] 26 | {docker-desktop-description} 27 | endif::[] 28 | 29 | Ensure that Kubernetes is running on Docker Desktop and that the context is set to `docker-desktop`. 30 | -- 31 | 32 | [.tab_content] 33 | [.linux_section] 34 | -- 35 | Run the following command from a command-line session: 36 | 37 | [role=command] 38 | [subs="attributes"] 39 | 40 | ``` 41 | ifdef::minikube-start[] 42 | {minikube-start} 43 | endif::[] 44 | ifndef::minikube-start[] 45 | minikube start 46 | endif::[] 47 | ``` 48 | -- 49 | [.tab_content] 50 | [.linux_section] 51 | -- 52 | ifdef::minikube-description[] 53 | {minikube-description} 54 | endif::[] 55 | -- 56 | 57 | 58 | 59 | Next, validate that you have a healthy {kube} environment by running the following command from the active command-line session. 60 | 61 | ``` 62 | kubectl get nodes 63 | ``` 64 | 65 | This command should return a `Ready` status for the master node. 66 | 67 | [.tab_link.windows_link] 68 | `*WINDOWS*` 69 | [.tab_link.mac_link] 70 | `*MAC*` 71 | [.tab_link.linux_link] 72 | `*LINUX*` 73 | 74 | [.tab_content.windows_section.mac_section] 75 | -- 76 | You do not need to do any other step. 77 | -- 78 | 79 | [.tab_content.linux_section] 80 | -- 81 | Run the following command to configure the Docker CLI to use Minikube's Docker daemon. 82 | After you run this command, you will be able to interact with Minikube's Docker daemon and build new 83 | images directly to it from your host machine: 84 | 85 | ``` 86 | eval $(minikube docker-env) 87 | ``` 88 | -- 89 | -------------------------------------------------------------------------------- /kube-prereq.adoc: -------------------------------------------------------------------------------- 1 | //// 2 | Copyright (c) 2018, 2019 IBM Corporation and others. 3 | Licensed under Creative Commons Attribution-NoDerivatives 4 | 4.0 International (CC BY-ND 4.0) 5 | https://creativecommons.org/licenses/by-nd/4.0/ 6 | Contributors: 7 | IBM Corporation 8 | //// 9 | == Additional prerequisites 10 | 11 | Before you begin, you need a containerization software for building containers. {kube} supports various container runtimes. You will use `Docker` in this guide. For Docker installation instructions, refer to the official https://docs.docker.com/install/[Docker documentation^]. 12 | 13 | [.tab_link.windows_link] 14 | `*WINDOWS*` 15 | [.tab_link.mac_link] 16 | `*MAC*` 17 | [.tab_link.linux_link] 18 | `*LINUX*` 19 | 20 | [.tab_content.windows_section] 21 | -- 22 | Use Docker Desktop, where a local {kube} environment is pre-installed and enabled. If you do not see the _{kube}_ tab, then upgrade to the latest version of Docker Desktop. 23 | 24 | Complete the setup for your operating system: 25 | 26 | - Set up https://docs.docker.com/docker-for-windows/#kubernetes[Docker for Windows^]. 27 | 28 | After you complete the Docker setup instructions for your operating system, ensure that {kube} (not Swarm) is selected as the orchestrator in Docker Preferences. 29 | -- 30 | 31 | [.tab_content.mac_section] 32 | -- 33 | Use Docker Desktop, where a local {kube} environment is pre-installed and enabled. If you do not see the _{kube}_ tab, then upgrade to the latest version of Docker Desktop. 34 | 35 | Complete the setup for your operating system: 36 | 37 | - Set up https://docs.docker.com/docker-for-mac/#kubernetes[Docker for Mac^]. 38 | 39 | After you complete the Docker setup instructions for your operating system, ensure that {kube} (not Swarm) is selected as the orchestrator in Docker Preferences. 40 | -- 41 | 42 | [.tab_content.linux_section] 43 | -- 44 | You will use `Minikube` as a single-node {kube} cluster that runs locally in a virtual machine. 45 | Make sure you have `kubectl` installed. If you need to install `kubectl`, see the https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl-on-linux[kubectl installation instructions^]. 46 | For Minikube installation instructions, see the https://github.com/kubernetes/minikube#installation[Minikube documentation^]. 47 | -- 48 | -------------------------------------------------------------------------------- /istio-start.adoc: -------------------------------------------------------------------------------- 1 | // ================================================================================================= 2 | // Deploying Istio 3 | // ================================================================================================= 4 | 5 | == Deploying Istio 6 | 7 | Install {istio} by following the instructions in the official https://istio.io/latest/docs/setup/getting-started[{istio} Getting started documentation^]. 8 | 9 | Run the following command to verify that the `istioctl` path was set successfully: 10 | 11 | [role=command] 12 | ``` 13 | istioctl version 14 | ``` 15 | 16 | The output will be similar to the following example: 17 | [source, role="no_copy"] 18 | ---- 19 | no running Istio pods in "istio-system" 20 | 1.24.2 21 | ---- 22 | 23 | Run the following command to configure the {istio} profile on {kube}: 24 | [role=command] 25 | ``` 26 | istioctl install --set profile=demo 27 | ``` 28 | 29 | The following output appears when the installation is complete: 30 | [source, role="no_copy"] 31 | ---- 32 | ✔ Istio core installed 33 | ✔ Istiod installed 34 | ✔ Egress gateways installed 35 | ✔ Ingress gateways installed 36 | ✔ Installation complete 37 | ---- 38 | 39 | Verify that Istio was successfully deployed by running the following command: 40 | 41 | [role=command] 42 | ``` 43 | kubectl get deployments -n istio-system 44 | ``` 45 | 46 | All the values in the `AVAILABLE` column will have a value of `1` after 47 | the deployment is complete. 48 | 49 | [source, role="no_copy"] 50 | ---- 51 | NAME READY UP-TO-DATE AVAILABLE AGE 52 | istio-egressgateway 1/1 1 1 2m48s 53 | istio-ingressgateway 1/1 1 1 2m48s 54 | istiod 1/1 1 1 2m48s 55 | ---- 56 | 57 | Ensure that the {istio} deployments are all available before you continue. The deployments might take a few minutes to become available. If the deployments aren't available after a few minutes, then increase the amount of memory available to your {kube} cluster. On Docker Desktop, you can increase the memory from your {docker} preferences. On {minikube}, you can increase the memory by using the `--memory` flag. 58 | 59 | Finally, create the `istio-injection` label and set its value to `enabled`: 60 | 61 | [role=command] 62 | ``` 63 | kubectl label namespace default istio-injection=enabled 64 | ``` 65 | 66 | Adding this label enables automatic {istio} sidecar injection. Automatic injection means that sidecars are automatically injected into your pods when you deploy your application. 67 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Open Liberty guides 2 | 3 | Anyone can contribute to the Open Liberty guides and we welcome your contributions! 4 | 5 | There are multiple ways to contribute: report bugs, fix bugs, contribute code, improve upon documentation, etc. 6 | 7 | ## Raising issues 8 | 9 | Please raise any bug reports in the individual guide repository. For new topics, large updates to existing guides, or general suggestions and ideas, report your issue in the [Open Liberty common guides repository](https://github.com/OpenLiberty/guides-common/issues). Be sure to search the list of open issues to see if your issue has already been raised. 10 | 11 | A good bug report makes it easy for everyone to understand what you were trying to do and what went wrong. Provide as much context as possible so we can try to recreate the issue. 12 | 13 | ## Contributions 14 | 15 | Contributing to an Open Liberty guide is simple. Each guide is maintained in its own GitHub repository. To contribute, just fork from the `prod` branch for your chosen guide. Then create a branch in your forked repository to include your contribution and open a pull request to the `staging` branch for the guide. 16 | Certify the originality of your work by following the [Developer Certificate of Origin (DCO)](https://developercertificate.org) approach and adding a line to the end of the Git commit message to sign your work: 17 | 18 | ```text 19 | Signed-off-by: Jane Williams 20 | ``` 21 | 22 | The sign-off is just a line at the end of the commit message that certifies that you wrote it or otherwise have the right to pass it on as an open source patch. 23 | 24 | Use your real name when you sign. We can't accept pseudonyms or anonymous contributions. 25 | 26 | Many Git UI tools have support for adding the `Signed-off-by` line to the end of your commit message. This line can be automatically added by the `git commit` command by using the `-s` option. 27 | 28 | The team is then notified and your contribution is reviewed according to the following process: 29 | 30 | 1. The team will review your change(s). 31 | - If there are further changes to be made, the team will request changes on the pull request. 32 | - If the team does not agree with the change, the PR will be closed with an explanation and suggestion for follow-up. 33 | 2. If the team approves, the team will merge your PR. A full Open Liberty staging site build will be run. 34 | 3. Based on the results of the build: 35 | - If further review is needed, we will let you know about a pending review from our team and discuss any necessary improvements that need to be made to your change(s). 36 | - If everything is successful, the team will publish your change(s) to the `prod` branch and update the Open Liberty production site, if necessary. 37 | 38 | ## Questions and concerns 39 | 40 | If you have any questions or concerns about the guides or about Open Liberty, you can visit [Gitter for Open Liberty](https://gitter.im/OpenLiberty/) and post your questions in the relevant rooms. You can also join the Open Liberty group on [Groups.io](https://groups.io/g/openliberty) to discuss any issues you have. 41 | -------------------------------------------------------------------------------- /.github/workflows/slack-alert.py: -------------------------------------------------------------------------------- 1 | import requests 2 | import json 3 | from argparse import ArgumentParser 4 | 5 | message = { 6 | "attachments": [ 7 | { 8 | "color": "#f2c744", 9 | "blocks": [ 10 | { 11 | "type": "header", 12 | "text": { 13 | "type": "plain_text", 14 | "text": "Daily Build" 15 | } 16 | }, 17 | { 18 | "type": "section", 19 | "fields": [ 20 | { 21 | "type": "mrkdwn", 22 | "text": "*Status:*\n FAILURE" 23 | }, 24 | { 25 | "type": "mrkdwn", 26 | "text": "*Dev Date:*\n 2020-" 27 | }, 28 | { 29 | "type": "mrkdwn", 30 | "text": "*Build Level:*\nAll vowel keys aren't working." 31 | } 32 | ] 33 | }, 34 | { 35 | "type": "section", 36 | "text": { 37 | "type": "mrkdwn", 38 | "text": "*Driver Location:* blabla" 39 | } 40 | }, 41 | { 42 | "type": "section", 43 | "text": { 44 | "type": "mrkdwn", 45 | "text": "**" 46 | } 47 | } 48 | ] 49 | } 50 | ] 51 | } 52 | 53 | headers = { 54 | "Content-type": "application/json" 55 | } 56 | 57 | if __name__ == "__main__": 58 | parser = ArgumentParser() 59 | parser.add_argument('buildlevel', type=str) 60 | parser.add_argument('driverlocation', type=str) 61 | parser.add_argument('devdate', type=str) 62 | parser.add_argument('status', type=str) 63 | parser.add_argument('ownerRepo', type=str) 64 | parser.add_argument('runID', type=str) 65 | parser.add_argument('slackhook', type=str) 66 | args = parser.parse_args() 67 | 68 | message["attachments"][0]["blocks"][1]["fields"][ 69 | 0]["text"] = f"*Status:*\n {args.status}" 70 | message["attachments"][0]["blocks"][1]["fields"][ 71 | 1]["text"] = f"*Dev Date:*\n {args.devdate}" 72 | message["attachments"][0]["blocks"][1]["fields"][2][ 73 | "text"] = f"*Build Level:*\n {args.buildlevel}" 74 | message["attachments"][0]["blocks"][2]["text"][ 75 | "text"] = f"*Driver Location:* {args.driverlocation}" 76 | workflow_url = f"https://github.com/{args.ownerRepo}/actions/runs/{args.runID}" 77 | message["attachments"][0]["blocks"][3]["text"]["text"] = f"*<{workflow_url}| Builds>*" 78 | 79 | status = args.status 80 | if status == 'failure': 81 | message["attachments"][0]["color"] = "#d73a49" 82 | elif status == 'success': 83 | message["attachments"][0]["color"] = "#28a745" 84 | else: 85 | message["attachments"][0]["color"] = "#f6f8fa" 86 | 87 | requests.post(args.slackhook, headers=headers, data=json.dumps(message)) 88 | -------------------------------------------------------------------------------- /pr-checker/linters/.dockerfilelintrc: -------------------------------------------------------------------------------- 1 | --- 2 | ########################### 3 | ## Superlinter configs ## 4 | ## Dockerfile Lint rules ## 5 | ########################### 6 | 7 | ################################# 8 | # Default is 'on' for all rules # 9 | # You can disable as needed. # 10 | ################################# 11 | # Additional Info can be found at: 12 | # https://github.com/replicatedhq/dockerfilelint 13 | 14 | # Set the rules 15 | rules: 16 | # All commands in a Dockerfile require at least 1 argument 17 | required_params: on 18 | 19 | # For clarity and readability, all instructions in 20 | # a Dockerfile should be uppercase 21 | uppercase_commands: on 22 | 23 | # The first instruction in a Dockerfile must specify 24 | # the base image using a FROM 25 | from_first: on 26 | 27 | # This line is not a valid Dockerfile line 28 | invalid_line: on 29 | 30 | # Use of sudo is not allowed in a Dockerfile 31 | sudo_usage: on 32 | 33 | # Consider using a `--no-install-recommends` when `apt-get` 34 | # installing packages 35 | apt-get_missing_param: on 36 | 37 | # Consider using a `--no-install-recommends` when `apt-get` 38 | # installing packages 39 | apt-get_recommends: on 40 | 41 | # Use of `apt-get upgrade` is not allowed in a Dockerfile 42 | apt-get-upgrade: on 43 | 44 | # Use of `apt-get dist-upgrade` is not allowed in a Dockerfile 45 | apt-get-dist-upgrade: on 46 | 47 | # All instances of `apt-get update` should have the `apt-get install` 48 | # commands on the same line to reduce image size 49 | apt-get-update_require_install: on 50 | 51 | # Consider using a `--no-cache` (supported in alpine linux >= 3.3) or 52 | # `--update` followed by the command `rm -rf /var/cache/apk/*` 53 | # when `apk` adding packages. This will result in a smaller image size 54 | apkadd-missing_nocache_or_updaterm: on 55 | 56 | # Consider using a `--virtual` or `-t` switch to group multiple packages 57 | # for easy cleanup. This will help ensure future authors will continue 58 | # to clean up build dependencies and other temporary packages 59 | apkadd-missing-virtual: on 60 | 61 | # Exposing ports should only be valid port numbers 62 | invalid_port: on 63 | 64 | # Only valid commands are allowed in a Dockerfile 65 | invalid_command: on 66 | 67 | # Expose Only Container Port 68 | expose_host_port: on 69 | 70 | # Using LABEL should be in key=value format 71 | label_invalid: on 72 | 73 | # Base images should specify a tag to use 74 | missing_tag: on 75 | 76 | # Base images should not use the latest tag 77 | latest_tag: off 78 | 79 | # This command has extra arguments and will be ignored 80 | extra_args: on 81 | 82 | # This command requires additional arguments 83 | missing_args: on 84 | 85 | # All files referenced in an ADD command should 86 | # be part of the Docker build context 87 | add_src_invalid: on 88 | 89 | # When adding multiple files, the destination should be a directory 90 | add_dest_invalid: on 91 | 92 | # Using a WORKDIR parameter that has spaces should be escaped 93 | invalid_workdir: on 94 | 95 | # The arguments to this command are invalid 96 | invalid_format: on 97 | 98 | # Use of apt-get update should be paired with 99 | # rm -rf /var/lib/apt/lists/* in the same layer 100 | apt-get_missing_rm: on 101 | 102 | # This INSTRUCTION is deprecated as of Docker 1.13 103 | deprecated_in_1.13: on 104 | -------------------------------------------------------------------------------- /.github/workflows/trigger-docker-daily-test.yml: -------------------------------------------------------------------------------- 1 | name: Trigger Docker Daily Build Test Action 2 | 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | # 12 = 12 PM UTC or 6 AM EST 7 | - cron: 0 12 * * * 8 | 9 | env: 10 | CP_STG_USERNAME: ${{ secrets.CP_STG_USERNAME }} 11 | CP_STG_PASSWORD: ${{ secrets.CP_STG_PASSWORD }} 12 | jobs: 13 | get-builds: 14 | runs-on: ubuntu-latest 15 | outputs: 16 | matrix: ${{ steps.create-matrix.outputs.matrix }} 17 | empty: ${{ steps.create-matrix.outputs.empty }} 18 | steps: 19 | - uses: actions/checkout@v2 20 | - name: Get build matrix 21 | id: create-matrix 22 | run: | 23 | BUILDS=$(python3 .github/workflows/get-builds.py) 24 | echo "Builds found" 25 | echo $BUILDS 26 | matrix="{ \"builds\":$BUILDS }" 27 | echo "matrix=$matrix" >> $GITHUB_OUTPUT 28 | if [ "$BUILDS" = "[]" ] 29 | then 30 | echo "empty=true" >> $GITHUB_OUTPUT 31 | else 32 | echo "empty=false" >> $GITHUB_OUTPUT 33 | fi 34 | no-builds: 35 | runs-on: ubuntu-latest 36 | needs: get-builds 37 | if: ${{ needs.get-builds.outputs.empty == 'true' }} 38 | steps: 39 | - name: No builds found 40 | run: echo "No builds found for $(date -d 'yesterday' '+%Y-%m-%d')" 41 | trigger-test: 42 | runs-on: ubuntu-latest 43 | needs: [ get-builds ] 44 | if: ${{ needs.get-builds.outputs.empty == 'false' }} 45 | strategy: 46 | matrix: ${{ fromJson(needs.get-builds.outputs.matrix) }} 47 | env: 48 | GH_TOKEN: ${{ secrets.ADMIN_TOKEN }} 49 | URI: "https://api.github.com/repos/OpenLiberty/guides-common/dispatches" 50 | ACCEPT_HEADER: "application/vnd.github.v3+json" 51 | PAYLOAD: '{ "dev-date": "${{ matrix.builds.date }}", "driver-location": "${{ matrix.builds.driver_location }}", "build-level": "${{ matrix.builds.build_level }}", "jdk": "11" }' 52 | PAYLOAD_JAVA17: '{ "dev-date": "${{ matrix.builds.date }}", "driver-location": "${{ matrix.builds.driver_location }}", "build-level": "${{ matrix.builds.build_level }}", "jdk": "17" }' 53 | PAYLOAD_JAVA21: '{ "dev-date": "${{ matrix.builds.date }}", "driver-location": "${{ matrix.builds.driver_location }}", "build-level": "${{ matrix.builds.build_level }}", "jdk": "21" }' 54 | steps: 55 | - name: Trigger Docker image tests 56 | run: | 57 | echo $CP_STG_PASSWORD | docker login -u $CP_STG_USERNAME --password-stdin cp.stg.icr.io 58 | docker pull "cp.stg.icr.io/cp/olc/open-liberty-daily:full-java11-openj9-ubi" -q 59 | IMAGEBUILDLEVEL=$(docker inspect --format "{{ index .Config.Labels \"org.opencontainers.image.revision\"}}" cp.stg.icr.io/cp/olc/open-liberty-daily:full-java11-openj9-ubi) 60 | echo $IMAGEBUILDLEVEL 61 | if [ $IMAGEBUILDLEVEL == ${{ matrix.builds.build_level }} ] 62 | then 63 | curl -H "Accept: $ACCEPT_HEADER" \ 64 | -H "Authorization: token $GH_TOKEN" \ 65 | -d "{ \"event_type\": \"docker-image-test\", \"client_payload\": $PAYLOAD }" \ 66 | -X POST $URI 67 | curl -H "Accept: $ACCEPT_HEADER" \ 68 | -H "Authorization: token $GH_TOKEN" \ 69 | -d "{ \"event_type\": \"docker-image-test-java17\", \"client_payload\": $PAYLOAD_JAVA17 }" \ 70 | -X POST $URI 71 | curl -H "Accept: $ACCEPT_HEADER" \ 72 | -H "Authorization: token $GH_TOKEN" \ 73 | -d "{ \"event_type\": \"docker-image-test-java21\", \"client_payload\": $PAYLOAD_JAVA21 }" \ 74 | -X POST $URI 75 | else 76 | echo Skip test because "$IMAGEBUILDLEVEL" and "${{ matrix.builds.build_level }}" do not match! 77 | fi 78 | -------------------------------------------------------------------------------- /.github/workflows/trigger-pre-daily-build.yml: -------------------------------------------------------------------------------- 1 | name: (Deprecated) Manual Pre-Daily Build Action 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | date: 7 | description: Dev date as 2023-07-11_0401 8 | required: true 9 | build_level: 10 | description: Build level as cl230720230711-0401 11 | required: true 12 | driver_location: 13 | description: Driver location like openliberty-all-23.0.0.7-cl230720230711-0401.zip 14 | required: true 15 | 16 | env: 17 | DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} 18 | DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} 19 | LIBERTY_LICENSE_SHA: ${{ secrets.LIBERTY_LICENSE_SHA }} 20 | 21 | jobs: 22 | build-docker-image: 23 | runs-on: ubuntu-latest 24 | env: 25 | DHE_URL: https://public.dhe.ibm.com/ibmdl/export/pub/software/openliberty/runtime/nightly 26 | steps: 27 | - name: Clone ci.docker repository 28 | uses: actions/checkout@v2 29 | with: 30 | repository: OpenLiberty/ci.docker 31 | path: ci.docker 32 | - name: Docker login 33 | run: echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin 34 | - name: Build Docker image for ${{ github.event.inputs.date }} 35 | run: | 36 | cd ci.docker/releases/latest/full 37 | sed -i "s;wget -q \$LIBERTY_DOWNLOAD_URL;wget $DHE_URL/${{ github.event.inputs.date }}/${{ github.event.inputs.driver_location }};g" Dockerfile.ubi.openjdk11 38 | sed -i '/&& sha1sum/d' Dockerfile.ubi.openjdk11 39 | cat Dockerfile.ubi.openjdk11 40 | echo "Building ${{ github.event.inputs.build_level }} from ${{ github.event.inputs.date }}" 41 | docker build --build-arg LIBERTY_LICENSE_SHA=$LIBERTY_LICENSE_SHA -q -t $DOCKER_USERNAME/olguides:${{ github.event.inputs.build_level }} -f Dockerfile.ubi.openjdk11 . 42 | docker push $DOCKER_USERNAME/olguides:${{ github.event.inputs.build_level }} 43 | - name: Build Java 17 Docker image for ${{ github.event.inputs.date }} 44 | run: | 45 | cd ci.docker/releases/latest/full 46 | sed -i "s;wget -q \$LIBERTY_DOWNLOAD_URL;wget $DHE_URL/${{ github.event.inputs.date }}/${{ github.event.inputs.driver_location }};g" Dockerfile.ubi.openjdk17 47 | sed -i '/&& sha1sum/d' Dockerfile.ubi.openjdk17 48 | cat Dockerfile.ubi.openjdk17 49 | echo "Building Java 17 ${{ github.event.inputs.build_level }} from ${{ github.event.inputs.date }}" 50 | docker build --build-arg LIBERTY_LICENSE_SHA=$LIBERTY_LICENSE_SHA -q -t $DOCKER_USERNAME/olguides:${{ github.event.inputs.build_level }}-java17 -f Dockerfile.ubi.openjdk17 . 51 | docker push $DOCKER_USERNAME/olguides:${{ github.event.inputs.build_level }}-java17 52 | trigger-builds: 53 | runs-on: ubuntu-latest 54 | needs: [ build-docker-image ] 55 | env: 56 | GH_TOKEN: ${{ secrets.ADMIN_TOKEN }} 57 | URI: "https://api.github.com/repos/OpenLiberty/guides-common/dispatches" 58 | ACCEPT_HEADER: "application/vnd.github.v3+json" 59 | CONTENT_TYPE: "application/json" 60 | PAYLOAD: '{ "dev-date": "${{ github.event.inputs.date }}", "driver-location": "${{ github.event.inputs.driver_location }}", "build-level": "${{ github.event.inputs.build_level }}", "jdk": "11" }' 61 | steps: 62 | - name: Trigger daily builds 63 | run: | 64 | curl -H "Accept: $ACCEPT_HEADER" \ 65 | -H "Authorization: token $GH_TOKEN" \ 66 | -d "{ \"event_type\": \"manual-daily-build\", \"client_payload\": $PAYLOAD }" \ 67 | -X POST $URI 68 | - name: Trigger daily builds for Java 17 69 | run: | 70 | curl -H "Accept: $ACCEPT_HEADER" \ 71 | -H "Authorization: token $GH_TOKEN" \ 72 | -d "{ \"event_type\": \"manual-daily-build-java17\", \"client_payload\": $PAYLOAD }" \ 73 | -X POST $URI 74 | -------------------------------------------------------------------------------- /guide_categories.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "category_name": "Develop", 4 | "category_title": "Developing your cloud-native application", 5 | "subcategories": 6 | [ 7 | { 8 | "subcategory_name": "Getting started", 9 | "guides": ["getting-started", "cdi-intro"] 10 | }, 11 | { 12 | "subcategory_name": "RESTful service", 13 | "guides": ["rest-intro", "microprofile-rest-client", "rest-client-java", "microprofile-openapi", "rest-hateoas", "microprofile-rest-client-async"] 14 | }, 15 | { 16 | "subcategory_name": "REST alternatives", 17 | "guides": ["microprofile-graphql", "graphql-client", "jakarta-websocket", "jms-intro", "grpc-intro"] 18 | }, 19 | { 20 | "subcategory_name": "Reactive service", 21 | "guides": ["microprofile-reactive-messaging", "microprofile-reactive-messaging-rest-integration", "microprofile-reactive-messaging-acknowledgment", "reactive-rest-client", "reactive-messaging-sse"] 22 | }, 23 | { 24 | "subcategory_name": "Configuration", 25 | "guides": ["microprofile-config-intro", "microprofile-config", "kubernetes-microprofile-config", "microprofile-config-profile"] 26 | }, 27 | { 28 | "subcategory_name": "Fault tolerance", 29 | "guides": ["microprofile-fallback", "retry-timeout", "microprofile-istio-retry-fallback", "bulkhead", "circuit-breaker"] 30 | }, 31 | { 32 | "subcategory_name": "Observability", 33 | "guides": ["microprofile-metrics", "microprofile-health", "kubernetes-microprofile-health", "microprofile-telemetry-grafana-automatic", "microprofile-telemetry-grafana-custom", "microprofile-telemetry-jaeger", "microprofile-opentracing", "microprofile-opentracing-jaeger"] 34 | }, 35 | { 36 | "subcategory_name": "Security", 37 | "guides": ["security-intro", "microprofile-jwt", "social-media-login", "bean-validation", "cors"] 38 | }, 39 | { 40 | "subcategory_name": "Persistence", 41 | "guides": ["jpa-intro", "mongodb-intro", "sessions"] 42 | }, 43 | { 44 | "subcategory_name": "Client side", 45 | "guides": ["jakarta-faces", "rest-client-angular", "rest-client-angularjs", "rest-client-reactjs"] 46 | } 47 | ] 48 | }, 49 | { 50 | "category_name": "Build and Test", 51 | "category_title": "Building and testing your cloud-native application", 52 | "subcategories": 53 | [ 54 | { 55 | "subcategory_name": "Build", 56 | "guides": ["maven-intro", "gradle-intro", "maven-multimodules", "gradle-multimodules", "docker"] 57 | }, 58 | { 59 | "subcategory_name": "Test", 60 | "guides": ["testcontainers", "reactive-service-testing", "contract-testing", "arquillian-managed", "microshed-testing"] 61 | }, 62 | { 63 | "subcategory_name": "Containerize", 64 | "guides": ["containerize", "containerize-podman", "spring-boot"] 65 | } 66 | ] 67 | }, 68 | { 69 | "category_name": "Deploy", 70 | "category_title": "Deploying your cloud-native application", 71 | "subcategories": 72 | [ 73 | { 74 | "subcategory_name": "Kubernetes", 75 | "guides": ["kubernetes-intro", "openliberty-operator-intro", "istio-intro"] 76 | }, 77 | { 78 | "subcategory_name": "Cloud deployment", 79 | "guides": ["cloud-ibm", "openliberty-operator-openshift", "cloud-openshift-operator", "openshift-codeready-containers", "cloud-openshift", "cloud-aws", "cloud-azure", "cloud-google", "okd"] 80 | } 81 | ] 82 | } 83 | ] 84 | -------------------------------------------------------------------------------- /.github/workflows/docker-daily-test-java21.yml: -------------------------------------------------------------------------------- 1 | name: Test Docker Daily Build - Java 21 2 | 3 | on: 4 | repository_dispatch: 5 | types: [ docker-image-test-java21 ] 6 | workflow_dispatch: 7 | inputs: 8 | build: 9 | description: Build level as cl231220231122-1901 10 | required: true 11 | date: 12 | description: Dev date as 2023-11-22_1901 13 | required: true 14 | driver: 15 | description: Driver location as openliberty-all-23.0.0.12-cl231220231122-1901.zip 16 | required: true 17 | guide: 18 | description: Guide to build 19 | default: "all" 20 | required: true 21 | branch: 22 | description: Branch to test 23 | required: false 24 | 25 | env: 26 | DOCKER_USERNAME: ${{ secrets.CP_STG_USERNAME }} 27 | DOCKER_PASSWORD: ${{ secrets.CP_STG_PASSWORD }} 28 | CHANGE_MINIKUBE_NONE_USER: true 29 | 30 | jobs: 31 | get-repos: 32 | runs-on: ubuntu-latest 33 | outputs: 34 | repos: ${{ steps.create-list.outputs.repos }}${{ steps.input-guide.outputs.repo }} 35 | steps: 36 | - uses: actions/checkout@v2 37 | - name: Get repos 38 | if: ${{ github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' && github.event.inputs.guide == 'all' }} 39 | id: create-list 40 | run: echo "repos=[ 'guide-spring-boot' ]" >> $GITHUB_OUTPUT 41 | - name: Set repo 42 | if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.guide != 'all' }} 43 | id: input-guide 44 | run: echo "repo=[ '${{ github.event.inputs.guide }}' ]" >> $GITHUB_OUTPUT 45 | build-level: 46 | runs-on: ubuntu-latest 47 | steps: 48 | - name: Starting daily build tests for ${{ github.event.client_payload.build-level }}${{ github.event.inputs.build }} 49 | run: | 50 | echo "Inputs: " 51 | echo build: ${{ github.event.inputs.build }} 52 | echo date: ${{ github.event.inputs.date }} 53 | echo driver: ${{ github.event.inputs.driver }} 54 | echo guide: ${{ github.event.inputs.guide }} 55 | echo branch: ${{ github.event.inputs.branch }} 56 | echo "Build level: ${{ github.event.client_payload.build-level }}${{ github.event.inputs.build }}" 57 | test-guide: 58 | needs: [ get-repos ] 59 | runs-on: ubuntu-latest 60 | strategy: 61 | fail-fast: false 62 | max-parallel: 5 63 | matrix: 64 | repos: ${{ fromJson(needs.get-repos.outputs.repos) }} 65 | jdk: [ "21" ] 66 | steps: 67 | - name: Setup JDK ${{ matrix.jdk }} 68 | uses: actions/setup-java@v1 69 | with: 70 | java-version: ${{ matrix.jdk }} 71 | - name: Clone ${{ matrix.repos }} 72 | uses: actions/checkout@v2 73 | with: 74 | repository: OpenLiberty/${{ matrix.repos }} 75 | ref: ${{ github.event.inputs.branch }} 76 | path: ${{ matrix.repos }} 77 | - name: Set permissions 78 | run: chmod +x ${{ matrix.repos }}/scripts/*.sh 79 | - name: Docker login 80 | run: echo $DOCKER_PASSWORD | sudo docker login -u $DOCKER_USERNAME --password-stdin cp.stg.icr.io 81 | - name: Run tests for ${{ matrix.repos }} 82 | working-directory: ${{ matrix.repos }}/finish 83 | env: 84 | DEVDATE: ${{ github.event.client_payload.dev-date }}${{ github.event.inputs.date }} 85 | DRIVER: ${{ github.event.client_payload.driver-location }}${{ github.event.inputs.driver }} 86 | run: sudo -E ../scripts/dockerImageTest.sh -t $DEVDATE -d $DRIVER 87 | - name: Post tests 88 | working-directory: ${{ matrix.repos }} 89 | if: always() 90 | run: | 91 | logsPath=$(sudo find . -name "console.log"); 92 | if [ -z "$logsPath" ] 93 | then 94 | logsPath=$(sudo find . -name "messages.log"); 95 | if [ ! -z "$logsPath" ] 96 | then 97 | sudo cat $logsPath | grep product 98 | sudo cat $logsPath | grep java.runtime 99 | fi 100 | else sudo cat $logsPath | grep Launching 101 | fi; 102 | sudo docker images 103 | - name: Archive server logs if failed 104 | if: failure() 105 | uses: actions/upload-artifact@v4 106 | with: 107 | name: server-logs 108 | path: ${{ matrix.repos }}/finish/target/liberty/wlp/usr/servers/defaultServer/logs/ 109 | slack-alert: 110 | needs: [ test-guide ] 111 | if: failure() 112 | runs-on: ubuntu-latest 113 | env: 114 | BUILDLEVEL: ${{ github.event.client_payload.build-level }}${{ github.event.inputs.build }} 115 | DEVDATE: ${{ github.event.client_payload.dev-date }}${{ github.event.inputs.date }} 116 | DRIVER: ${{ github.event.client_payload.driver-location }}${{ github.event.inputs.driver }} 117 | steps: 118 | - uses: actions/checkout@v2 119 | - name: send-status 120 | run: | 121 | python3 .github/workflows/slack-alert.py ${{ env.BUILDLEVEL }} ${{ env.DRIVER }} ${{ env.DEVDATE }} ${{ needs.test-guide.result }} \ 122 | ${{ github.repository }} ${{ github.run_id }} ${{ secrets.SLACK_HOOK }} 123 | echo ${{ needs.test-guide.result }} 124 | -------------------------------------------------------------------------------- /.github/workflows/docker-daily-test-java17.yml: -------------------------------------------------------------------------------- 1 | name: Test Docker Daily Build - Java 17 2 | 3 | on: 4 | repository_dispatch: 5 | types: [ docker-image-test-java17 ] 6 | workflow_dispatch: 7 | inputs: 8 | build: 9 | description: Build level as cl231220231122-1901 10 | required: true 11 | date: 12 | description: Dev date as 2023-11-22_1901 13 | required: true 14 | driver: 15 | description: Driver location as openliberty-all-23.0.0.12-cl231220231122-1901.zip 16 | required: true 17 | guide: 18 | description: Guide to build 19 | default: "all" 20 | required: true 21 | branch: 22 | description: Branch to test 23 | required: false 24 | 25 | env: 26 | DOCKER_USERNAME: ${{ secrets.CP_STG_USERNAME }} 27 | DOCKER_PASSWORD: ${{ secrets.CP_STG_PASSWORD }} 28 | CHANGE_MINIKUBE_NONE_USER: true 29 | 30 | jobs: 31 | get-repos: 32 | runs-on: ubuntu-latest 33 | outputs: 34 | repos: ${{ steps.create-list.outputs.repos }}${{ steps.input-guide.outputs.repo }} 35 | steps: 36 | - uses: actions/checkout@v2 37 | - name: Get repos 38 | if: ${{ github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' && github.event.inputs.guide == 'all' }} 39 | id: create-list 40 | run: echo "repos=[ 'guide-liberty-deep-dive' ]" >> $GITHUB_OUTPUT 41 | - name: Set repo 42 | if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.guide != 'all' }} 43 | id: input-guide 44 | run: echo "repo=[ '${{ github.event.inputs.guide }}' ]" >> $GITHUB_OUTPUT 45 | build-level: 46 | runs-on: ubuntu-latest 47 | steps: 48 | - name: Starting daily build tests for ${{ github.event.client_payload.build-level }}${{ github.event.inputs.build }} 49 | run: | 50 | echo "Inputs: " 51 | echo build: ${{ github.event.inputs.build }} 52 | echo date: ${{ github.event.inputs.date }} 53 | echo driver: ${{ github.event.inputs.driver }} 54 | echo guide: ${{ github.event.inputs.guide }} 55 | echo branch: ${{ github.event.inputs.branch }} 56 | echo "Build level: ${{ github.event.client_payload.build-level }}${{ github.event.inputs.build }}" 57 | test-guide: 58 | needs: [ get-repos ] 59 | runs-on: ubuntu-latest 60 | strategy: 61 | fail-fast: false 62 | max-parallel: 5 63 | matrix: 64 | repos: ${{ fromJson(needs.get-repos.outputs.repos) }} 65 | jdk: [ "17" ] 66 | steps: 67 | - name: Setup JDK ${{ matrix.jdk }} 68 | uses: actions/setup-java@v1 69 | with: 70 | java-version: ${{ matrix.jdk }} 71 | - name: Clone ${{ matrix.repos }} 72 | uses: actions/checkout@v2 73 | with: 74 | repository: OpenLiberty/${{ matrix.repos }} 75 | ref: ${{ github.event.inputs.branch }} 76 | path: ${{ matrix.repos }} 77 | - name: Set permissions 78 | run: chmod +x ${{ matrix.repos }}/scripts/*.sh 79 | - name: Docker login 80 | run: echo $DOCKER_PASSWORD | sudo docker login -u $DOCKER_USERNAME --password-stdin cp.stg.icr.io 81 | - name: Run tests for ${{ matrix.repos }} 82 | working-directory: ${{ matrix.repos }}/finish 83 | env: 84 | DEVDATE: ${{ github.event.client_payload.dev-date }}${{ github.event.inputs.date }} 85 | DRIVER: ${{ github.event.client_payload.driver-location }}${{ github.event.inputs.driver }} 86 | run: sudo -E ../scripts/dockerImageTest.sh -t $DEVDATE -d $DRIVER 87 | - name: Post tests 88 | working-directory: ${{ matrix.repos }} 89 | if: always() 90 | run: | 91 | logsPath=$(sudo find . -name "console.log"); 92 | if [ -z "$logsPath" ] 93 | then 94 | logsPath=$(sudo find . -name "messages.log"); 95 | if [ ! -z "$logsPath" ] 96 | then 97 | sudo cat $logsPath | grep product 98 | sudo cat $logsPath | grep java.runtime 99 | fi 100 | else sudo cat $logsPath | grep Launching 101 | fi; 102 | sudo docker images 103 | - name: Archive server logs if failed 104 | if: failure() 105 | uses: actions/upload-artifact@v4 106 | with: 107 | name: server-logs 108 | path: ${{ matrix.repos }}/finish/target/liberty/wlp/usr/servers/defaultServer/logs/ 109 | slack-alert: 110 | needs: [ test-guide ] 111 | if: failure() 112 | runs-on: ubuntu-latest 113 | env: 114 | BUILDLEVEL: ${{ github.event.client_payload.build-level }}${{ github.event.inputs.build }} 115 | DEVDATE: ${{ github.event.client_payload.dev-date }}${{ github.event.inputs.date }} 116 | DRIVER: ${{ github.event.client_payload.driver-location }}${{ github.event.inputs.driver }} 117 | steps: 118 | - uses: actions/checkout@v2 119 | - name: send-status 120 | run: | 121 | python3 .github/workflows/slack-alert.py ${{ env.BUILDLEVEL }} ${{ env.DRIVER }} ${{ env.DEVDATE }} ${{ needs.test-guide.result }} \ 122 | ${{ github.repository }} ${{ github.run_id }} ${{ secrets.SLACK_HOOK }} 123 | echo ${{ needs.test-guide.result }} 124 | -------------------------------------------------------------------------------- /.github/workflows/pre-daily-build.yml: -------------------------------------------------------------------------------- 1 | name: Pre-Daily Build Actions 2 | 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | # 6 AM UTC or 1 AM EST 7 | - cron: 0 6 * * * 8 | 9 | #env: 10 | # DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} 11 | # DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} 12 | jobs: 13 | get-builds: 14 | runs-on: ubuntu-latest 15 | outputs: 16 | matrix: ${{ steps.create-matrix.outputs.matrix }} 17 | empty: ${{ steps.create-matrix.outputs.empty }} 18 | steps: 19 | - uses: actions/checkout@v2 20 | - name: Get build matrix 21 | id: create-matrix 22 | run: | 23 | BUILDS=$(python3 .github/workflows/get-builds.py) 24 | echo "Builds found" 25 | echo $BUILDS 26 | matrix="{ \"builds\":$BUILDS }" 27 | echo "matrix=$matrix" >> $GITHUB_OUTPUT 28 | if [ "$BUILDS" = "[]" ] 29 | then 30 | echo "empty=true" >> $GITHUB_OUTPUT 31 | else 32 | echo "empty=false" >> $GITHUB_OUTPUT 33 | fi 34 | no-builds: 35 | runs-on: ubuntu-latest 36 | needs: get-builds 37 | if: ${{ needs.get-builds.outputs.empty == 'true' }} 38 | steps: 39 | - name: No builds found 40 | run: echo "No builds found for $(date -d 'yesterday' '+%Y-%m-%d')" 41 | # build-docker-image: 42 | # runs-on: ubuntu-latest 43 | # needs: get-builds 44 | # if: ${{ needs.get-builds.outputs.empty == 'false' }} 45 | # strategy: 46 | # matrix: ${{ fromJson(needs.get-builds.outputs.matrix) }} 47 | # env: 48 | # DHE_URL: https://public.dhe.ibm.com/ibmdl/export/pub/software/openliberty/runtime/nightly 49 | # steps: 50 | # - name: Clone ci.docker repository 51 | # uses: actions/checkout@v2 52 | # with: 53 | # repository: OpenLiberty/ci.docker 54 | # path: ci.docker 55 | # - name: Docker login 56 | # run: echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin 57 | # - name: Build Java 11 Docker image for ${{ matrix.builds.date }} 58 | # run: | 59 | # cd ci.docker/releases/latest/full 60 | # sed -i "s;wget -q \$LIBERTY_DOWNLOAD_URL;wget $DHE_URL/${{ matrix.builds.date }}/${{ matrix.builds.driver_location }};g" Dockerfile.ubi.openjdk11 61 | # sed -i '/&& sha1sum/d' Dockerfile.ubi.openjdk11 62 | # cat Dockerfile.ubi.openjdk11 63 | # echo "Building Java 11 ${{ matrix.builds.build_level }} from ${{ matrix.builds.date }}" 64 | # docker build -q -t $DOCKER_USERNAME/olguides:${{ matrix.builds.build_level }} -f Dockerfile.ubi.openjdk11 . 65 | # docker push $DOCKER_USERNAME/olguides:${{ matrix.builds.build_level }} 66 | # - name: Build Java 17 Docker image for ${{ matrix.builds.date }} 67 | # run: | 68 | # cd ci.docker/releases/latest/full 69 | # sed -i "s;wget -q \$LIBERTY_DOWNLOAD_URL;wget $DHE_URL/${{ matrix.builds.date }}/${{ matrix.builds.driver_location }};g" Dockerfile.ubi.openjdk17 70 | # sed -i '/&& sha1sum/d' Dockerfile.ubi.openjdk17 71 | # cat Dockerfile.ubi.openjdk17 72 | # echo "Building Java 17 ${{ matrix.builds.build_level }} from ${{ matrix.builds.date }}" 73 | # docker build -q -t $DOCKER_USERNAME/olguides:${{ matrix.builds.build_level }}-java17 -f Dockerfile.ubi.openjdk17 . 74 | # docker push $DOCKER_USERNAME/olguides:${{ matrix.builds.build_level }}-java17 75 | trigger-builds: 76 | runs-on: ubuntu-latest 77 | needs: [ get-builds ] 78 | if: ${{ needs.get-builds.outputs.empty == 'false' }} 79 | strategy: 80 | matrix: ${{ fromJson(needs.get-builds.outputs.matrix) }} 81 | env: 82 | GH_TOKEN: ${{ secrets.ADMIN_TOKEN }} 83 | URI: "https://api.github.com/repos/OpenLiberty/guides-common/dispatches" 84 | ACCEPT_HEADER: "application/vnd.github.v3+json" 85 | CONTENT_TYPE: "application/json" 86 | PAYLOAD: '{ "dev-date": "${{ matrix.builds.date }}", "driver-location": "${{ matrix.builds.driver_location }}", "build-level": "${{ matrix.builds.build_level }}", "jdk": "11" }' 87 | PAYLOAD_JAVA17: '{ "dev-date": "${{ matrix.builds.date }}", "driver-location": "${{ matrix.builds.driver_location }}", "build-level": "${{ matrix.builds.build_level }}", "jdk": "17" }' 88 | PAYLOAD_JAVA21: '{ "dev-date": "${{ matrix.builds.date }}", "driver-location": "${{ matrix.builds.driver_location }}", "build-level": "${{ matrix.builds.build_level }}", "jdk": "21" }' 89 | steps: 90 | - name: Trigger daily builds for Java 11 91 | run: | 92 | curl -H "Accept: $ACCEPT_HEADER" \ 93 | -H "Authorization: token $GH_TOKEN" \ 94 | -d "{ \"event_type\": \"daily-build\", \"client_payload\": $PAYLOAD }" \ 95 | -X POST $URI 96 | - name: Trigger daily builds for Java 17 97 | run: | 98 | curl -H "Accept: $ACCEPT_HEADER" \ 99 | -H "Authorization: token $GH_TOKEN" \ 100 | -d "{ \"event_type\": \"daily-build-java17\", \"client_payload\": $PAYLOAD_JAVA17 }" \ 101 | -X POST $URI 102 | - name: Trigger daily builds for Java 21 103 | run: | 104 | curl -H "Accept: $ACCEPT_HEADER" \ 105 | -H "Authorization: token $GH_TOKEN" \ 106 | -d "{ \"event_type\": \"daily-build-java21\", \"client_payload\": $PAYLOAD_JAVA21 }" \ 107 | -X POST $URI 108 | -------------------------------------------------------------------------------- /.github/workflows/manual-gm-candidate-container-test-java21.yml: -------------------------------------------------------------------------------- 1 | name: Manual GM candidate container test - Java 21 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | build: 7 | description: Build level as cl241020240923-1638 8 | required: true 9 | date: 10 | description: Dev date as 2024-09-23_1638 11 | required: true 12 | ol_version: 13 | description: OL version as 24.0.0.10 14 | required: true 15 | guide: 16 | description: Guide to build 17 | default: "all" 18 | required: true 19 | branch: 20 | description: Branch to test 21 | required: false 22 | 23 | env: 24 | DOCKER_USERNAME: ${{ secrets.CP_STG_USERNAME }} 25 | DOCKER_PASSWORD: ${{ secrets.CP_STG_PASSWORD }} 26 | CHANGE_MINIKUBE_NONE_USER: true 27 | 28 | jobs: 29 | get-guide-repos: 30 | runs-on: ubuntu-latest 31 | outputs: 32 | repos: ${{ steps.create-list.outputs.repos }}${{ steps.input-guide.outputs.repo }} 33 | steps: 34 | - uses: actions/checkout@v4 35 | - name: Get repos 36 | if: ${{ github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' && github.event.inputs.guide == 'all' }} 37 | id: create-list 38 | run: echo "repos=[ 'guide-spring-boot' ]" >> $GITHUB_OUTPUT 39 | - name: Set repo 40 | if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.guide != 'all' }} 41 | id: input-guide 42 | run: echo "repo=[ '${{ github.event.inputs.guide }}' ]" >> $GITHUB_OUTPUT 43 | build-level: 44 | runs-on: ubuntu-latest 45 | steps: 46 | - name: Starting GM candidate container tests for ${{ github.event.inputs.build }} 47 | run: | 48 | echo "Inputs: " 49 | echo build: ${{ github.event.inputs.build }} 50 | echo date: ${{ github.event.inputs.date }} 51 | echo ol_version: ${{ github.event.inputs.ol_version }} 52 | echo driver: openliberty-all-${{ github.event.inputs.ol_version }}-${{ github.event.inputs.build }}.zip 53 | echo guide: ${{ github.event.inputs.guide }} 54 | echo branch: ${{ github.event.inputs.branch }} 55 | test-guide: 56 | needs: [ get-guide-repos ] 57 | runs-on: ubuntu-latest 58 | strategy: 59 | fail-fast: false 60 | max-parallel: 5 61 | matrix: 62 | repos: ${{ fromJson(needs.get-guide-repos.outputs.repos) }} 63 | jdk: [ "21" ] 64 | steps: 65 | - name: Setup JDK ${{ matrix.jdk }} 66 | uses: actions/setup-java@v1 67 | with: 68 | java-version: ${{ matrix.jdk }} 69 | - name: Clone ${{ matrix.repos }} 70 | uses: actions/checkout@v4 71 | with: 72 | repository: OpenLiberty/${{ matrix.repos }} 73 | ref: ${{ github.event.inputs.branch }} 74 | path: ${{ matrix.repos }} 75 | - name: Set permissions 76 | run: chmod +x ${{ matrix.repos }}/scripts/*.sh 77 | - name: Docker login 78 | run: echo $DOCKER_PASSWORD | sudo docker login -u $DOCKER_USERNAME --password-stdin cp.stg.icr.io 79 | - name: Run tests for ${{ matrix.repos }} 80 | working-directory: ${{ matrix.repos }}/finish 81 | env: 82 | DEVDATE: ${{ github.event.inputs.date }} 83 | DRIVER: openliberty-all-${{ github.event.inputs.ol_version }}-${{ github.event.inputs.build }}.zip 84 | OL_VERSION: ${{ github.event.inputs.ol_version }} 85 | run: sudo -E ../scripts/dockerImageTest.sh -t $DEVDATE -d $DRIVER -v $OL_VERSION 86 | - name: Post tests 87 | working-directory: ${{ matrix.repos }} 88 | if: always() 89 | run: | 90 | mvn -version 91 | sudo chmod -R 777 . 92 | logsPath=$(sudo find . -name "console.log"); 93 | if [ -z "$logsPath" ] 94 | then 95 | logsPath=$(sudo find . -name "messages.log"); 96 | if [ -z "$logsPath" ] 97 | then sudo docker images 98 | else 99 | sudo cat $logsPath | grep product 100 | sudo cat $logsPath | grep java.runtime 101 | fi 102 | else sudo cat $logsPath | grep Launching 103 | fi 104 | - name: Archive server logs if failed 105 | if: failure() 106 | uses: actions/upload-artifact@v4 107 | with: 108 | name: ${{ matrix.repos }}-logs 109 | path: | 110 | ${{ matrix.repos }}/finish/target/liberty/wlp/usr/servers/defaultServer/logs/ 111 | ${{ matrix.repos }}/finish/**/target/liberty/wlp/usr/servers/defaultServer/logs/ 112 | if-no-files-found: ignore 113 | slack-alert: 114 | needs: [test-guide] 115 | if: failure() 116 | runs-on: ubuntu-latest 117 | env: 118 | BUILDLEVEL: ${{ github.event.inputs.build }} 119 | DEVDATE: ${{ github.event.inputs.date }} 120 | DRIVER: openliberty-all-${{ github.event.inputs.ol_version }}-${{ github.event.inputs.build }}.zip 121 | steps: 122 | - uses: actions/checkout@v4 123 | - name: send-status 124 | run: | 125 | python3 .github/workflows/slack-alert.py ${{ env.BUILDLEVEL }} ${{ env.DRIVER }} ${{ env.DEVDATE }} ${{ needs.test-guide.result }} \ 126 | ${{ github.repository }} ${{ github.run_id }} ${{ secrets.SLACK_HOOK }} 127 | echo ${{ needs.test-guide.result }} 128 | -------------------------------------------------------------------------------- /.github/workflows/manual-gm-candidate-container-test-java17.yml: -------------------------------------------------------------------------------- 1 | name: Manual GM candidate container test - Java 17 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | build: 7 | description: Build level as cl241020240923-1638 8 | required: true 9 | date: 10 | description: Dev date as 2024-09-23_1638 11 | required: true 12 | ol_version: 13 | description: OL version as 24.0.0.10 14 | required: true 15 | guide: 16 | description: Guide to build 17 | default: "all" 18 | required: true 19 | branch: 20 | description: Branch to test 21 | required: false 22 | 23 | env: 24 | DOCKER_USERNAME: ${{ secrets.CP_STG_USERNAME }} 25 | DOCKER_PASSWORD: ${{ secrets.CP_STG_PASSWORD }} 26 | CHANGE_MINIKUBE_NONE_USER: true 27 | 28 | jobs: 29 | get-guide-repos: 30 | runs-on: ubuntu-latest 31 | outputs: 32 | repos: ${{ steps.create-list.outputs.repos }}${{ steps.input-guide.outputs.repo }} 33 | steps: 34 | - uses: actions/checkout@v4 35 | - name: Get repos 36 | if: ${{ github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' && github.event.inputs.guide == 'all' }} 37 | id: create-list 38 | run: echo "repos=[ 'guide-liberty-deep-dive' ]" >> $GITHUB_OUTPUT 39 | - name: Set repo 40 | if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.guide != 'all' }} 41 | id: input-guide 42 | run: echo "repo=[ '${{ github.event.inputs.guide }}' ]" >> $GITHUB_OUTPUT 43 | build-level: 44 | runs-on: ubuntu-latest 45 | steps: 46 | - name: Starting GM candidate container tests for ${{ github.event.inputs.build }} 47 | run: | 48 | echo "Inputs: " 49 | echo build: ${{ github.event.inputs.build }} 50 | echo date: ${{ github.event.inputs.date }} 51 | echo ol_version: ${{ github.event.inputs.ol_version }} 52 | echo driver: openliberty-all-${{ github.event.inputs.ol_version }}-${{ github.event.inputs.build }}.zip 53 | echo guide: ${{ github.event.inputs.guide }} 54 | echo branch: ${{ github.event.inputs.branch }} 55 | test-guide: 56 | needs: [ get-guide-repos ] 57 | runs-on: ubuntu-latest 58 | strategy: 59 | fail-fast: false 60 | max-parallel: 5 61 | matrix: 62 | repos: ${{ fromJson(needs.get-guide-repos.outputs.repos) }} 63 | jdk: [ "17" ] 64 | steps: 65 | - name: Setup JDK ${{ matrix.jdk }} 66 | uses: actions/setup-java@v1 67 | with: 68 | java-version: ${{ matrix.jdk }} 69 | - name: Clone ${{ matrix.repos }} 70 | uses: actions/checkout@v4 71 | with: 72 | repository: OpenLiberty/${{ matrix.repos }} 73 | ref: ${{ github.event.inputs.branch }} 74 | path: ${{ matrix.repos }} 75 | - name: Set permissions 76 | run: chmod +x ${{ matrix.repos }}/scripts/*.sh 77 | - name: Docker login 78 | run: echo $DOCKER_PASSWORD | sudo docker login -u $DOCKER_USERNAME --password-stdin cp.stg.icr.io 79 | - name: Run tests for ${{ matrix.repos }} 80 | working-directory: ${{ matrix.repos }}/finish 81 | env: 82 | DEVDATE: ${{ github.event.inputs.date }} 83 | DRIVER: openliberty-all-${{ github.event.inputs.ol_version }}-${{ github.event.inputs.build }}.zip 84 | OL_VERSION: ${{ github.event.inputs.ol_version }} 85 | run: sudo -E ../scripts/dockerImageTest.sh -t $DEVDATE -d $DRIVER -v $OL_VERSION 86 | - name: Post tests 87 | working-directory: ${{ matrix.repos }} 88 | if: always() 89 | run: | 90 | mvn -version 91 | sudo chmod -R 777 . 92 | logsPath=$(sudo find . -name "console.log"); 93 | if [ -z "$logsPath" ] 94 | then 95 | logsPath=$(sudo find . -name "messages.log"); 96 | if [ -z "$logsPath" ] 97 | then sudo docker images 98 | else 99 | sudo cat $logsPath | grep product 100 | sudo cat $logsPath | grep java.runtime 101 | fi 102 | else sudo cat $logsPath | grep Launching 103 | fi 104 | - name: Archive server logs if failed 105 | if: failure() 106 | uses: actions/upload-artifact@v4 107 | with: 108 | name: ${{ matrix.repos }}-logs 109 | path: | 110 | ${{ matrix.repos }}/finish/target/liberty/wlp/usr/servers/defaultServer/logs/ 111 | ${{ matrix.repos }}/finish/**/target/liberty/wlp/usr/servers/defaultServer/logs/ 112 | if-no-files-found: ignore 113 | slack-alert: 114 | needs: [test-guide] 115 | if: failure() 116 | runs-on: ubuntu-latest 117 | env: 118 | BUILDLEVEL: ${{ github.event.inputs.build }} 119 | DEVDATE: ${{ github.event.inputs.date }} 120 | DRIVER: openliberty-all-${{ github.event.inputs.ol_version }}-${{ github.event.inputs.build }}.zip 121 | steps: 122 | - uses: actions/checkout@v4 123 | - name: send-status 124 | run: | 125 | python3 .github/workflows/slack-alert.py ${{ env.BUILDLEVEL }} ${{ env.DRIVER }} ${{ env.DEVDATE }} ${{ needs.test-guide.result }} \ 126 | ${{ github.repository }} ${{ github.run_id }} ${{ secrets.SLACK_HOOK }} 127 | echo ${{ needs.test-guide.result }} 128 | -------------------------------------------------------------------------------- /.github/workflows/docker-daily-test.yml: -------------------------------------------------------------------------------- 1 | name: Test Docker Daily Build 2 | 3 | on: 4 | repository_dispatch: 5 | types: [ docker-image-test ] 6 | workflow_dispatch: 7 | inputs: 8 | build: 9 | description: Build level as cl231220231122-1901 10 | required: true 11 | date: 12 | description: Dev date as 2023-11-22_1901 13 | required: true 14 | driver: 15 | description: Driver location as openliberty-all-23.0.0.12-cl231220231122-1901.zip 16 | required: true 17 | guide: 18 | description: Guide to build 19 | default: "all" 20 | required: true 21 | branch: 22 | description: Branch to test 23 | required: false 24 | jdk_level: 25 | description: JDK level to test 26 | default: "11" 27 | required: true 28 | 29 | env: 30 | DOCKER_USERNAME: ${{ secrets.CP_STG_USERNAME }} 31 | DOCKER_PASSWORD: ${{ secrets.CP_STG_PASSWORD }} 32 | CHANGE_MINIKUBE_NONE_USER: true 33 | 34 | jobs: 35 | get-repos: 36 | runs-on: ubuntu-latest 37 | outputs: 38 | repos: ${{ steps.create-list.outputs.repos }}${{ steps.input-guide.outputs.repo }} 39 | steps: 40 | - uses: actions/checkout@v2 41 | - name: Get repos 42 | if: ${{ github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' && github.event.inputs.guide == 'all' }} 43 | id: create-list 44 | run: echo "repos=$(python3 .github/workflows/get-docker-guides.py)" >> $GITHUB_OUTPUT 45 | - name: Set repo 46 | if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.guide != 'all' }} 47 | id: input-guide 48 | run: echo "repo=[ '${{ github.event.inputs.guide }}' ]" >> $GITHUB_OUTPUT 49 | build-level: 50 | runs-on: ubuntu-latest 51 | steps: 52 | - name: Starting daily build tests for ${{ github.event.client_payload.build-level }}${{ github.event.inputs.build }} 53 | run: | 54 | echo "Inputs: " 55 | echo build: ${{ github.event.inputs.build }} 56 | echo date: ${{ github.event.inputs.date }} 57 | echo driver: ${{ github.event.inputs.driver }} 58 | echo guide: ${{ github.event.inputs.guide }} 59 | echo branch: ${{ github.event.inputs.branch }} 60 | echo jdk_level: ${{ github.event.client_payload.jdk }}${{ github.event.inputs.jdk_level }} 61 | echo "Build level: ${{ github.event.client_payload.build-level }}${{ github.event.inputs.build }}" 62 | test-guide: 63 | needs: [ get-repos ] 64 | runs-on: ubuntu-latest 65 | strategy: 66 | fail-fast: false 67 | max-parallel: 5 68 | matrix: 69 | repos: ${{ fromJson(needs.get-repos.outputs.repos) }} 70 | jdk: [ "${{ github.event.client_payload.jdk }}${{ github.event.inputs.jdk_level }}" ] 71 | steps: 72 | - name: Setup JDK ${{ matrix.jdk }} 73 | uses: actions/setup-java@v1 74 | with: 75 | java-version: ${{ matrix.jdk }} 76 | - name: Clone ${{ matrix.repos }} 77 | uses: actions/checkout@v2 78 | with: 79 | repository: OpenLiberty/${{ matrix.repos }} 80 | ref: ${{ github.event.inputs.branch }} 81 | path: ${{ matrix.repos }} 82 | - name: Set permissions 83 | run: chmod +x ${{ matrix.repos }}/scripts/*.sh 84 | - name: Docker login 85 | run: echo $DOCKER_PASSWORD | sudo docker login -u $DOCKER_USERNAME --password-stdin cp.stg.icr.io 86 | - name: Run tests for ${{ matrix.repos }} 87 | working-directory: ${{ matrix.repos }}/finish 88 | env: 89 | DEVDATE: ${{ github.event.client_payload.dev-date }}${{ github.event.inputs.date }} 90 | DRIVER: ${{ github.event.client_payload.driver-location }}${{ github.event.inputs.driver }} 91 | run: sudo -E ../scripts/dockerImageTest.sh -t $DEVDATE -d $DRIVER 92 | - name: Post tests 93 | working-directory: ${{ matrix.repos }} 94 | if: always() 95 | run: | 96 | logsPath=$(sudo find . -name "console.log"); 97 | if [ -z "$logsPath" ] 98 | then 99 | logsPath=$(sudo find . -name "messages.log"); 100 | if [ ! -z "$logsPath" ] 101 | then 102 | sudo cat $logsPath | grep product 103 | sudo cat $logsPath | grep java.runtime 104 | fi 105 | else sudo cat $logsPath | grep Launching 106 | fi; 107 | sudo docker images 108 | - name: Archive server logs if failed 109 | if: failure() 110 | uses: actions/upload-artifact@v4 111 | with: 112 | name: server-logs 113 | path: ${{ matrix.repos }}/finish/target/liberty/wlp/usr/servers/defaultServer/logs/ 114 | slack-alert: 115 | needs: [ test-guide ] 116 | if: failure() 117 | runs-on: ubuntu-latest 118 | env: 119 | BUILDLEVEL: ${{ github.event.client_payload.build-level }}${{ github.event.inputs.build }} 120 | DEVDATE: ${{ github.event.client_payload.dev-date }}${{ github.event.inputs.date }} 121 | DRIVER: ${{ github.event.client_payload.driver-location }}${{ github.event.inputs.driver }} 122 | steps: 123 | - uses: actions/checkout@v2 124 | - name: send-status 125 | run: | 126 | python3 .github/workflows/slack-alert.py ${{ env.BUILDLEVEL }} ${{ env.DRIVER }} ${{ env.DEVDATE }} ${{ needs.test-guide.result }} \ 127 | ${{ github.repository }} ${{ github.run_id }} ${{ secrets.SLACK_HOOK }} 128 | echo ${{ needs.test-guide.result }} 129 | -------------------------------------------------------------------------------- /.github/workflows/manual-gm-candidate-container-test.yml: -------------------------------------------------------------------------------- 1 | name: Manual GM candidate container test 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | build: 7 | description: Build level as cl241020240923-1638 8 | required: true 9 | date: 10 | description: Dev date as 2024-09-23_1638 11 | required: true 12 | ol_version: 13 | description: OL version as 24.0.0.10 14 | required: true 15 | guide: 16 | description: Guide to build 17 | default: "all" 18 | required: true 19 | branch: 20 | description: Branch to test 21 | required: false 22 | jdk_level: 23 | description: JDK level to test 24 | default: "11" 25 | required: true 26 | 27 | env: 28 | DOCKER_USERNAME: ${{ secrets.CP_STG_USERNAME }} 29 | DOCKER_PASSWORD: ${{ secrets.CP_STG_PASSWORD }} 30 | CHANGE_MINIKUBE_NONE_USER: true 31 | 32 | jobs: 33 | get-guide-repos: 34 | runs-on: ubuntu-latest 35 | outputs: 36 | repos: ${{ steps.create-list.outputs.repos }}${{ steps.input-guide.outputs.repo }} 37 | steps: 38 | - uses: actions/checkout@v4 39 | - name: Get repos 40 | if: ${{ github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' && github.event.inputs.guide == 'all' }} 41 | id: create-list 42 | run: echo "repos=$(python3 .github/workflows/get-docker-guides.py)" >> $GITHUB_OUTPUT 43 | - name: Set repo 44 | if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.guide != 'all' }} 45 | id: input-guide 46 | run: echo "repo=[ '${{ github.event.inputs.guide }}' ]" >> $GITHUB_OUTPUT 47 | build-level: 48 | runs-on: ubuntu-latest 49 | steps: 50 | - name: Starting GM candidate container tests for ${{ github.event.inputs.build }} 51 | run: | 52 | echo "Inputs: " 53 | echo build: ${{ github.event.inputs.build }} 54 | echo date: ${{ github.event.inputs.date }} 55 | echo ol_version: ${{ github.event.inputs.ol_version }} 56 | echo driver: openliberty-all-${{ github.event.inputs.ol_version }}-${{ github.event.inputs.build }}.zip 57 | echo guide: ${{ github.event.inputs.guide }} 58 | echo branch: ${{ github.event.inputs.branch }} 59 | echo jdk_level: ${{ github.event.inputs.jdk_level }} 60 | test-guide: 61 | needs: [ get-guide-repos ] 62 | runs-on: ubuntu-latest 63 | strategy: 64 | fail-fast: false 65 | max-parallel: 5 66 | matrix: 67 | repos: ${{ fromJson(needs.get-guide-repos.outputs.repos) }} 68 | jdk: [ "${{ github.event.inputs.jdk_level }}" ] 69 | steps: 70 | - name: Setup JDK ${{ matrix.jdk }} 71 | uses: actions/setup-java@v1 72 | with: 73 | java-version: ${{ matrix.jdk }} 74 | - name: Clone ${{ matrix.repos }} 75 | uses: actions/checkout@v4 76 | with: 77 | repository: OpenLiberty/${{ matrix.repos }} 78 | ref: ${{ github.event.inputs.branch }} 79 | path: ${{ matrix.repos }} 80 | - name: Set permissions 81 | run: chmod +x ${{ matrix.repos }}/scripts/*.sh 82 | - name: Docker login 83 | run: echo $DOCKER_PASSWORD | sudo docker login -u $DOCKER_USERNAME --password-stdin cp.stg.icr.io 84 | - name: Run tests for ${{ matrix.repos }} 85 | working-directory: ${{ matrix.repos }}/finish 86 | env: 87 | DEVDATE: ${{ github.event.inputs.date }} 88 | DRIVER: openliberty-all-${{ github.event.inputs.ol_version }}-${{ github.event.inputs.build }}.zip 89 | OL_VERSION: ${{ github.event.inputs.ol_version }} 90 | run: sudo -E ../scripts/dockerImageTest.sh -t $DEVDATE -d $DRIVER -v $OL_VERSION 91 | - name: Post tests 92 | working-directory: ${{ matrix.repos }} 93 | if: always() 94 | run: | 95 | mvn -version 96 | sudo chmod -R 777 . 97 | logsPath=$(sudo find . -name "console.log"); 98 | if [ -z "$logsPath" ] 99 | then 100 | logsPath=$(sudo find . -name "messages.log"); 101 | if [ -z "$logsPath" ] 102 | then sudo docker images 103 | else 104 | sudo cat $logsPath | grep product 105 | sudo cat $logsPath | grep java.runtime 106 | fi 107 | else sudo cat $logsPath | grep Launching 108 | fi 109 | - name: Archive server logs if failed 110 | if: failure() 111 | uses: actions/upload-artifact@v4 112 | with: 113 | name: ${{ matrix.repos }}-logs 114 | path: | 115 | ${{ matrix.repos }}/finish/target/liberty/wlp/usr/servers/defaultServer/logs/ 116 | ${{ matrix.repos }}/finish/**/target/liberty/wlp/usr/servers/defaultServer/logs/ 117 | if-no-files-found: ignore 118 | slack-alert: 119 | needs: [test-guide] 120 | if: failure() 121 | runs-on: ubuntu-latest 122 | env: 123 | BUILDLEVEL: ${{ github.event.inputs.build }} 124 | DEVDATE: ${{ github.event.inputs.date }} 125 | DRIVER: openliberty-all-${{ github.event.inputs.ol_version }}-${{ github.event.inputs.build }}.zip 126 | steps: 127 | - uses: actions/checkout@v4 128 | - name: send-status 129 | run: | 130 | python3 .github/workflows/slack-alert.py ${{ env.BUILDLEVEL }} ${{ env.DRIVER }} ${{ env.DEVDATE }} ${{ needs.test-guide.result }} \ 131 | ${{ github.repository }} ${{ github.run_id }} ${{ secrets.SLACK_HOOK }} 132 | echo ${{ needs.test-guide.result }} 133 | -------------------------------------------------------------------------------- /.github/workflows/daily-build-java21.yml: -------------------------------------------------------------------------------- 1 | name: Daily build testing - Java 21 2 | 3 | on: 4 | repository_dispatch: 5 | types: [ daily-build-java21 ] 6 | workflow_dispatch: 7 | inputs: 8 | build: 9 | description: Build level as cl250420250407-1902 10 | required: true 11 | date: 12 | description: Dev date as 2025-04-07_1902 13 | required: true 14 | driver: 15 | description: Driver location as openliberty-all-25.0.0.4-cl250420250407-1902.zip 16 | required: true 17 | guide: 18 | description: Guide to build 19 | default: "all" 20 | required: true 21 | branch: 22 | description: Branch to test 23 | required: false 24 | 25 | env: 26 | #DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} 27 | #DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} 28 | CHANGE_MINIKUBE_NONE_USER: true 29 | 30 | jobs: 31 | get-guide-repos: 32 | runs-on: ubuntu-latest 33 | outputs: 34 | repos: ${{ steps.create-list.outputs.repos }}${{ steps.input-guide.outputs.repo }} 35 | steps: 36 | - uses: actions/checkout@v4 37 | - name: Get default repos 38 | if: ${{ github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' && github.event.inputs.guide == 'all' }} 39 | id: create-list 40 | run: echo "repos=$(python3 .github/workflows/get-guides-java21.py)" >> $GITHUB_OUTPUT 41 | - name: Set input repo 42 | if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.guide != 'all' }} 43 | id: input-guide 44 | run: echo "repo=[ '${{ github.event.inputs.guide }}' ]" >> $GITHUB_OUTPUT 45 | build-level: 46 | runs-on: ubuntu-latest 47 | steps: 48 | - name: Starting daily build tests for ${{ github.event.client_payload.build-level }}${{ github.event.inputs.build }} 49 | run: | 50 | echo "Inputs: " 51 | echo build: ${{ github.event.inputs.build }} 52 | echo date: ${{ github.event.inputs.date }} 53 | echo driver: ${{ github.event.inputs.driver }} 54 | echo guide: ${{ github.event.inputs.guide }} 55 | echo branch: ${{ github.event.inputs.branch }} 56 | echo jdk_level: 21 57 | echo "Build level: ${{ github.event.client_payload.build-level }}${{ github.event.inputs.build }}" 58 | test-guide: 59 | needs: [ get-guide-repos ] 60 | runs-on: ubuntu-latest 61 | strategy: 62 | fail-fast: false 63 | max-parallel: 5 64 | matrix: 65 | repos: ${{ fromJson(needs.get-guide-repos.outputs.repos) }} 66 | jdk: [ "21" ] 67 | steps: 68 | - name: Setup JDK ${{ matrix.jdk }} 69 | uses: actions/setup-java@v1 70 | with: 71 | java-version: ${{ matrix.jdk }} 72 | - name: Clone ${{ matrix.repos }} 73 | uses: actions/checkout@v4 74 | with: 75 | repository: OpenLiberty/${{ matrix.repos }} 76 | ref: ${{ github.event.inputs.branch }} 77 | path: ${{ matrix.repos }} 78 | - name: Set permissions 79 | run: chmod +x ${{ matrix.repos }}/scripts/*.sh 80 | #- name: Docker login for runner 81 | # run: | 82 | # if [ "${{ matrix.repos }}" = "guide-liberty-deep-dive-gradle" ] 83 | # then 84 | # echo podman login 85 | # echo $DOCKER_PASSWORD | podman login docker.io -u $DOCKER_USERNAME --password-stdin 86 | # else 87 | # echo docker login 88 | # echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin 89 | # fi 90 | #- name: Docker login for root 91 | # run: | 92 | # if [ "${{ matrix.repos }}" = "guide-liberty-deep-dive-gradle" ] 93 | # then 94 | # echo podman login 95 | # echo $DOCKER_PASSWORD | sudo podman login docker.io -u $DOCKER_USERNAME --password-stdin 96 | # else 97 | # echo docker login 98 | # echo $DOCKER_PASSWORD | sudo docker login -u $DOCKER_USERNAME --password-stdin 99 | # fi 100 | - name: Run tests for ${{ matrix.repos }} 101 | working-directory: ${{ matrix.repos }}/finish 102 | env: 103 | BUILDLEVEL: ${{ github.event.client_payload.build-level }}${{ github.event.inputs.build }} 104 | DEVDATE: ${{ github.event.client_payload.dev-date }}${{ github.event.inputs.date }} 105 | DRIVER: ${{ github.event.client_payload.driver-location }}${{ github.event.inputs.driver }} 106 | run: sudo -E ../scripts/dailyBuild.sh -t $DEVDATE -d $DRIVER -b $BUILDLEVEL -j ${{ matrix.jdk }} 107 | - name: Post tests 108 | working-directory: ${{ matrix.repos }} 109 | if: always() 110 | run: | 111 | mvn -version 112 | sudo chmod -R 777 . 113 | logsPath=$(sudo find . -name "console.log"); 114 | if [ -z "$logsPath" ] 115 | then 116 | logsPath=$(sudo find . -name "messages.log"); 117 | if [ -z "$logsPath" ] 118 | then sudo docker images 119 | else 120 | sudo cat $logsPath | grep product 121 | sudo cat $logsPath | grep java.runtime 122 | fi 123 | else sudo cat $logsPath | grep Launching 124 | fi 125 | - name: Archive server logs if failed 126 | if: failure() 127 | uses: actions/upload-artifact@v4 128 | with: 129 | name: ${{ matrix.repos }}-logs 130 | path: | 131 | ${{ matrix.repos }}/finish/target/liberty/wlp/usr/servers/defaultServer/logs/ 132 | ${{ matrix.repos }}/start/target/liberty/wlp/usr/servers/defaultServer/logs/ 133 | ${{ matrix.repos }}/finish/**/target/liberty/wlp/usr/servers/defaultServer/logs/ 134 | ${{ matrix.repos }}/start/**/target/liberty/wlp/usr/servers/defaultServer/logs/ 135 | if-no-files-found: ignore 136 | - name: Archive npm logs if failed 137 | if: failure() 138 | uses: actions/upload-artifact@v4 139 | with: 140 | name: ${{ matrix.repos }}-npm-logs 141 | path: ~/.npm/_logs 142 | if-no-files-found: ignore 143 | slack-alert: 144 | needs: [test-guide] 145 | if: failure() 146 | runs-on: ubuntu-latest 147 | env: 148 | BUILDLEVEL: ${{ github.event.client_payload.build-level }}${{ github.event.inputs.build }} 149 | DEVDATE: ${{ github.event.client_payload.dev-date }}${{ github.event.inputs.date }} 150 | DRIVER: ${{ github.event.client_payload.driver-location }}${{ github.event.inputs.driver }} 151 | steps: 152 | - uses: actions/checkout@v4 153 | - name: send-status 154 | run: | 155 | python3 .github/workflows/slack-alert.py ${{ env.BUILDLEVEL }} ${{ env.DRIVER }} ${{ env.DEVDATE }} ${{ needs.test-guide.result }} \ 156 | ${{ github.repository }} ${{ github.run_id }} ${{ secrets.SLACK_HOOK }} 157 | echo ${{ needs.test-guide.result }} 158 | -------------------------------------------------------------------------------- /.github/workflows/manual-docker-build-test-java17.yml: -------------------------------------------------------------------------------- 1 | name: (Deprecated) Manual docker build test - Java 17 2 | 3 | on: 4 | repository_dispatch: 5 | types: [ manual-daily-build-java17 ] 6 | workflow_dispatch: 7 | inputs: 8 | build: 9 | description: Build level 10 | required: true 11 | date: 12 | description: Dev date 13 | required: true 14 | driver: 15 | description: Driver location 16 | required: true 17 | guide: 18 | description: Guide to build 19 | default: "all" 20 | required: true 21 | branch: 22 | description: Branch to test 23 | required: false 24 | 25 | env: 26 | DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} 27 | DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} 28 | CHANGE_MINIKUBE_NONE_USER: true 29 | 30 | jobs: 31 | get-guide-repos: 32 | runs-on: ubuntu-latest 33 | outputs: 34 | repos: ${{ steps.create-list.outputs.repos }}${{ steps.input-guide.outputs.repo }} 35 | steps: 36 | - uses: actions/checkout@v2 37 | - name: Get repos 38 | if: ${{ github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' && github.event.inputs.guide == 'all' }} 39 | id: create-list 40 | run: echo "repos=[ 'guide-spring-boot', 'guide-liberty-deep-dive' ]" >> $GITHUB_OUTPUT 41 | - name: Set repo 42 | if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.guide != 'all' }} 43 | id: input-guide 44 | run: echo "repo=[ '${{ github.event.inputs.guide }}' ]" >> $GITHUB_OUTPUT 45 | build-level: 46 | runs-on: ubuntu-latest 47 | steps: 48 | - name: Starting daily build tests for ${{ github.event.client_payload.build-level }}${{ github.event.inputs.build }} 49 | run: | 50 | echo "Inputs: " 51 | echo build: ${{ github.event.inputs.build }} 52 | echo date: ${{ github.event.inputs.date }} 53 | echo driver: ${{ github.event.inputs.driver }} 54 | echo guide: ${{ github.event.inputs.guide }} 55 | echo branch: ${{ github.event.inputs.branch }} 56 | echo jdk_level: ${{ github.event.client_payload.jdk }}${{ github.event.inputs.jdk_level }} 57 | echo "Build level: ${{ github.event.client_payload.build-level }}${{ github.event.inputs.build }}" 58 | test-guide: 59 | needs: [ get-guide-repos ] 60 | runs-on: ubuntu-latest 61 | strategy: 62 | fail-fast: false 63 | max-parallel: 5 64 | matrix: 65 | repos: ${{ fromJson(needs.get-guide-repos.outputs.repos) }} 66 | jdk: [ "17" ] 67 | steps: 68 | - name: Setup JDK ${{ matrix.jdk }} 69 | uses: actions/setup-java@v1 70 | with: 71 | java-version: ${{ matrix.jdk }} 72 | - name: Clone ${{ matrix.repos }} 73 | uses: actions/checkout@v2 74 | with: 75 | repository: OpenLiberty/${{ matrix.repos }} 76 | ref: ${{ github.event.inputs.branch }} 77 | path: ${{ matrix.repos }} 78 | - name: Set permissions 79 | run: chmod +x ${{ matrix.repos }}/scripts/*.sh 80 | - name: Docker login for runner 81 | run: | 82 | if [ "${{ matrix.repos }}" = "guide-liberty-deep-dive-gradle" ] 83 | then 84 | echo podman login 85 | echo $DOCKER_PASSWORD | podman login docker.io -u $DOCKER_USERNAME --password-stdin 86 | else 87 | echo docker login 88 | echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin 89 | fi 90 | - name: Docker login for root 91 | run: | 92 | if [ "${{ matrix.repos }}" = "guide-liberty-deep-dive-gradle" ] 93 | then 94 | echo podman login 95 | echo $DOCKER_PASSWORD | sudo podman login docker.io -u $DOCKER_USERNAME --password-stdin 96 | else 97 | echo docker login 98 | echo $DOCKER_PASSWORD | sudo docker login -u $DOCKER_USERNAME --password-stdin 99 | fi 100 | - name: Run tests for ${{ matrix.repos }} 101 | working-directory: ${{ matrix.repos }}/finish 102 | env: 103 | BUILDLEVEL: ${{ github.event.client_payload.build-level }}${{ github.event.inputs.build }} 104 | DEVDATE: ${{ github.event.client_payload.dev-date }}${{ github.event.inputs.date }} 105 | DRIVER: ${{ github.event.client_payload.driver-location }}${{ github.event.inputs.driver }} 106 | run: sudo -E ../scripts/dailyBuild.sh -t $DEVDATE -d $DRIVER -b $BUILDLEVEL -u $DOCKER_USERNAME -j ${{ matrix.jdk }} 107 | - name: Post tests 108 | working-directory: ${{ matrix.repos }} 109 | if: always() 110 | run: | 111 | mvn -version 112 | sudo chmod -R 777 . 113 | logsPath=$(sudo find . -name "console.log"); 114 | if [ -z "$logsPath" ] 115 | then 116 | logsPath=$(sudo find . -name "messages.log"); 117 | if [ -z "$logsPath" ] 118 | then sudo docker images 119 | else 120 | sudo cat $logsPath | grep product 121 | sudo cat $logsPath | grep java.runtime 122 | fi 123 | else sudo cat $logsPath | grep Launching 124 | fi 125 | - name: Archive server logs if failed 126 | if: failure() 127 | uses: actions/upload-artifact@v3 128 | with: 129 | name: ${{ matrix.repos }}-logs 130 | path: | 131 | ${{ matrix.repos }}/finish/target/liberty/wlp/usr/servers/defaultServer/logs/ 132 | ${{ matrix.repos }}/start/target/liberty/wlp/usr/servers/defaultServer/logs/ 133 | ${{ matrix.repos }}/finish/**/target/liberty/wlp/usr/servers/defaultServer/logs/ 134 | ${{ matrix.repos }}/start/**/target/liberty/wlp/usr/servers/defaultServer/logs/ 135 | if-no-files-found: ignore 136 | - name: Archive npm logs if failed 137 | if: failure() 138 | uses: actions/upload-artifact@v3 139 | with: 140 | name: ${{ matrix.repos }}-npm-logs 141 | path: ~/.npm/_logs 142 | if-no-files-found: ignore 143 | slack-alert: 144 | needs: [test-guide] 145 | if: failure() 146 | runs-on: ubuntu-latest 147 | env: 148 | BUILDLEVEL: ${{ github.event.client_payload.build-level }}${{ github.event.inputs.build }} 149 | DEVDATE: ${{ github.event.client_payload.dev-date }}${{ github.event.inputs.date }} 150 | DRIVER: ${{ github.event.client_payload.driver-location }}${{ github.event.inputs.driver }} 151 | steps: 152 | - uses: actions/checkout@v2 153 | - name: send-status 154 | run: | 155 | python3 .github/workflows/slack-alert.py ${{ env.BUILDLEVEL }} ${{ env.DRIVER }} ${{ env.DEVDATE }} ${{ needs.test-guide.result }} \ 156 | ${{ github.repository }} ${{ github.run_id }} ${{ secrets.SLACK_HOOK }} 157 | echo ${{ needs.test-guide.result }} 158 | -------------------------------------------------------------------------------- /.github/workflows/daily-build-java17.yml: -------------------------------------------------------------------------------- 1 | name: Daily build testing - Java 17 2 | 3 | on: 4 | repository_dispatch: 5 | types: [ daily-build-java17 ] 6 | workflow_dispatch: 7 | inputs: 8 | build: 9 | description: Build level as cl231220231122-1901 10 | required: true 11 | date: 12 | description: Dev date as 2023-11-22_1901 13 | required: true 14 | driver: 15 | description: Driver location as openliberty-all-23.0.0.12-cl231220231122-1901.zip 16 | required: true 17 | guide: 18 | description: Guide to build as guide-... 19 | default: "all" 20 | required: true 21 | branch: 22 | description: Branch to test 23 | required: false 24 | 25 | env: 26 | #DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} 27 | #DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} 28 | CHANGE_MINIKUBE_NONE_USER: true 29 | 30 | jobs: 31 | get-guide-repos: 32 | runs-on: ubuntu-latest 33 | outputs: 34 | repos: ${{ steps.create-list.outputs.repos }}${{ steps.input-guide.outputs.repo }} 35 | steps: 36 | - uses: actions/checkout@v4 37 | - name: Get default repos 38 | if: ${{ github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' && github.event.inputs.guide == 'all' }} 39 | id: create-list 40 | run: echo "repos=$(python3 .github/workflows/get-guides-java17.py)" >> $GITHUB_OUTPUT 41 | - name: Set input repo 42 | if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.guide != 'all' }} 43 | id: input-guide 44 | run: echo "repo=[ '${{ github.event.inputs.guide }}' ]" >> $GITHUB_OUTPUT 45 | build-level: 46 | runs-on: ubuntu-latest 47 | steps: 48 | - name: Starting daily build tests for ${{ github.event.client_payload.build-level }}${{ github.event.inputs.build }} 49 | run: | 50 | echo "Inputs: " 51 | echo build: ${{ github.event.inputs.build }} 52 | echo date: ${{ github.event.inputs.date }} 53 | echo driver: ${{ github.event.inputs.driver }} 54 | echo guide: ${{ github.event.inputs.guide }} 55 | echo branch: ${{ github.event.inputs.branch }} 56 | echo jdk_level: 17 57 | echo "Build level: ${{ github.event.client_payload.build-level }}${{ github.event.inputs.build }}" 58 | test-guide: 59 | needs: [ get-guide-repos ] 60 | runs-on: ubuntu-latest 61 | strategy: 62 | fail-fast: false 63 | max-parallel: 5 64 | matrix: 65 | repos: ${{ fromJson(needs.get-guide-repos.outputs.repos) }} 66 | jdk: [ "17" ] 67 | steps: 68 | - name: Setup JDK ${{ matrix.jdk }} 69 | uses: actions/setup-java@v1 70 | with: 71 | java-version: ${{ matrix.jdk }} 72 | - name: Clone ${{ matrix.repos }} 73 | uses: actions/checkout@v4 74 | with: 75 | repository: OpenLiberty/${{ matrix.repos }} 76 | ref: ${{ github.event.inputs.branch }} 77 | path: ${{ matrix.repos }} 78 | - name: Set permissions 79 | run: chmod +x ${{ matrix.repos }}/scripts/*.sh 80 | #- name: Docker login for runner 81 | # run: | 82 | # if [ "${{ matrix.repos }}" = "guide-liberty-deep-dive-gradle" ] 83 | # then 84 | # echo podman login 85 | # echo $DOCKER_PASSWORD | podman login docker.io -u $DOCKER_USERNAME --password-stdin 86 | # else 87 | # echo docker login 88 | # echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin 89 | # fi 90 | #- name: Docker login for root 91 | # run: | 92 | # if [ "${{ matrix.repos }}" = "guide-liberty-deep-dive-gradle" ] 93 | # then 94 | # echo podman login 95 | # echo $DOCKER_PASSWORD | sudo podman login docker.io -u $DOCKER_USERNAME --password-stdin 96 | # else 97 | # echo docker login 98 | # echo $DOCKER_PASSWORD | sudo docker login -u $DOCKER_USERNAME --password-stdin 99 | # fi 100 | - name: Run tests for ${{ matrix.repos }} 101 | working-directory: ${{ matrix.repos }}/finish 102 | env: 103 | BUILDLEVEL: ${{ github.event.client_payload.build-level }}${{ github.event.inputs.build }} 104 | DEVDATE: ${{ github.event.client_payload.dev-date }}${{ github.event.inputs.date }} 105 | DRIVER: ${{ github.event.client_payload.driver-location }}${{ github.event.inputs.driver }} 106 | run: sudo -E ../scripts/dailyBuild.sh -t $DEVDATE -d $DRIVER -b $BUILDLEVEL -j ${{ matrix.jdk }} 107 | - name: Post tests 108 | working-directory: ${{ matrix.repos }} 109 | if: always() 110 | run: | 111 | mvn -version 112 | sudo chmod -R 777 . 113 | logsPath=$(sudo find . -name "console.log"); 114 | if [ -z "$logsPath" ] 115 | then 116 | logsPath=$(sudo find . -name "messages.log"); 117 | if [ -z "$logsPath" ] 118 | then sudo docker images 119 | else 120 | sudo cat $logsPath | grep product 121 | sudo cat $logsPath | grep java.runtime 122 | fi 123 | else sudo cat $logsPath | grep Launching 124 | fi 125 | - name: Archive server logs if failed 126 | if: failure() 127 | uses: actions/upload-artifact@v4 128 | with: 129 | name: ${{ matrix.repos }}-logs 130 | path: | 131 | ${{ matrix.repos }}/finish/target/liberty/wlp/usr/servers/defaultServer/logs/ 132 | ${{ matrix.repos }}/start/target/liberty/wlp/usr/servers/defaultServer/logs/ 133 | ${{ matrix.repos }}/finish/**/target/liberty/wlp/usr/servers/defaultServer/logs/ 134 | ${{ matrix.repos }}/start/**/target/liberty/wlp/usr/servers/defaultServer/logs/ 135 | if-no-files-found: ignore 136 | - name: Archive npm logs if failed 137 | if: failure() 138 | uses: actions/upload-artifact@v4 139 | with: 140 | name: ${{ matrix.repos }}-npm-logs 141 | path: ~/.npm/_logs 142 | if-no-files-found: ignore 143 | slack-alert: 144 | needs: [test-guide] 145 | if: failure() 146 | runs-on: ubuntu-latest 147 | env: 148 | BUILDLEVEL: ${{ github.event.client_payload.build-level }}${{ github.event.inputs.build }} 149 | DEVDATE: ${{ github.event.client_payload.dev-date }}${{ github.event.inputs.date }} 150 | DRIVER: ${{ github.event.client_payload.driver-location }}${{ github.event.inputs.driver }} 151 | steps: 152 | - uses: actions/checkout@v4 153 | - name: send-status 154 | run: | 155 | python3 .github/workflows/slack-alert.py ${{ env.BUILDLEVEL }} ${{ env.DRIVER }} ${{ env.DEVDATE }} ${{ needs.test-guide.result }} \ 156 | ${{ github.repository }} ${{ github.run_id }} ${{ secrets.SLACK_HOOK }} 157 | echo ${{ needs.test-guide.result }} 158 | -------------------------------------------------------------------------------- /.github/workflows/manual-docker-build-test.yml: -------------------------------------------------------------------------------- 1 | name: (Deprecated) Manual docker build test 2 | 3 | on: 4 | repository_dispatch: 5 | types: [ manual-daily-build ] 6 | workflow_dispatch: 7 | inputs: 8 | build: 9 | description: Build level 10 | required: true 11 | date: 12 | description: Dev date 13 | required: true 14 | driver: 15 | description: Driver location 16 | required: true 17 | guide: 18 | description: Guide to build 19 | default: "all" 20 | required: true 21 | branch: 22 | description: Branch to test 23 | required: false 24 | jdk_level: 25 | description: JDK level to test 26 | default: "11" 27 | required: true 28 | 29 | env: 30 | DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} 31 | DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} 32 | CHANGE_MINIKUBE_NONE_USER: true 33 | 34 | jobs: 35 | get-guide-repos: 36 | runs-on: ubuntu-latest 37 | outputs: 38 | repos: ${{ steps.create-list.outputs.repos }}${{ steps.input-guide.outputs.repo }} 39 | steps: 40 | - uses: actions/checkout@v4 41 | - name: Get repos 42 | if: ${{ github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' && github.event.inputs.guide == 'all' }} 43 | id: create-list 44 | run: echo "repos=$(python3 .github/workflows/get-docker-guides.py)" >> $GITHUB_OUTPUT 45 | - name: Set repo 46 | if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.guide != 'all' }} 47 | id: input-guide 48 | run: echo "repo=[ '${{ github.event.inputs.guide }}' ]" >> $GITHUB_OUTPUT 49 | build-level: 50 | runs-on: ubuntu-latest 51 | steps: 52 | - name: Starting daily build tests for ${{ github.event.client_payload.build-level }}${{ github.event.inputs.build }} 53 | run: | 54 | echo "Inputs: " 55 | echo build: ${{ github.event.inputs.build }} 56 | echo date: ${{ github.event.inputs.date }} 57 | echo driver: ${{ github.event.inputs.driver }} 58 | echo guide: ${{ github.event.inputs.guide }} 59 | echo branch: ${{ github.event.inputs.branch }} 60 | echo jdk_level: ${{ github.event.client_payload.jdk }}${{ github.event.inputs.jdk_level }} 61 | echo "Build level: ${{ github.event.client_payload.build-level }}${{ github.event.inputs.build }}" 62 | test-guide: 63 | needs: [ get-guide-repos ] 64 | runs-on: ubuntu-latest 65 | strategy: 66 | fail-fast: false 67 | max-parallel: 5 68 | matrix: 69 | repos: ${{ fromJson(needs.get-guide-repos.outputs.repos) }} 70 | jdk: [ "${{ github.event.client_payload.jdk }}${{ github.event.inputs.jdk_level }}" ] 71 | steps: 72 | - name: Setup JDK ${{ matrix.jdk }} 73 | uses: actions/setup-java@v1 74 | with: 75 | java-version: ${{ matrix.jdk }} 76 | - name: Clone ${{ matrix.repos }} 77 | uses: actions/checkout@v4 78 | with: 79 | repository: OpenLiberty/${{ matrix.repos }} 80 | ref: ${{ github.event.inputs.branch }} 81 | path: ${{ matrix.repos }} 82 | - name: Set permissions 83 | run: chmod +x ${{ matrix.repos }}/scripts/*.sh 84 | - name: Docker login for runner 85 | run: | 86 | if [ "${{ matrix.repos }}" = "guide-liberty-deep-dive-gradle" ] 87 | then 88 | echo podman login 89 | echo $DOCKER_PASSWORD | podman login docker.io -u $DOCKER_USERNAME --password-stdin 90 | else 91 | echo docker login 92 | echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin 93 | fi 94 | - name: Docker login for root 95 | run: | 96 | if [ "${{ matrix.repos }}" = "guide-liberty-deep-dive-gradle" ] 97 | then 98 | echo podman login 99 | echo $DOCKER_PASSWORD | sudo podman login docker.io -u $DOCKER_USERNAME --password-stdin 100 | else 101 | echo docker login 102 | echo $DOCKER_PASSWORD | sudo docker login -u $DOCKER_USERNAME --password-stdin 103 | fi 104 | - name: Run tests for ${{ matrix.repos }} 105 | working-directory: ${{ matrix.repos }}/finish 106 | env: 107 | BUILDLEVEL: ${{ github.event.client_payload.build-level }}${{ github.event.inputs.build }} 108 | DEVDATE: ${{ github.event.client_payload.dev-date }}${{ github.event.inputs.date }} 109 | DRIVER: ${{ github.event.client_payload.driver-location }}${{ github.event.inputs.driver }} 110 | run: sudo -E ../scripts/dailyBuild.sh -t $DEVDATE -d $DRIVER -b $BUILDLEVEL -u $DOCKER_USERNAME -j ${{ matrix.jdk }} 111 | - name: Post tests 112 | working-directory: ${{ matrix.repos }} 113 | if: always() 114 | run: | 115 | mvn -version 116 | sudo chmod -R 777 . 117 | logsPath=$(sudo find . -name "console.log"); 118 | if [ -z "$logsPath" ] 119 | then 120 | logsPath=$(sudo find . -name "messages.log"); 121 | if [ -z "$logsPath" ] 122 | then sudo docker images 123 | else 124 | sudo cat $logsPath | grep product 125 | sudo cat $logsPath | grep java.runtime 126 | fi 127 | else sudo cat $logsPath | grep Launching 128 | fi 129 | - name: Archive server logs if failed 130 | if: failure() 131 | uses: actions/upload-artifact@v4 132 | with: 133 | name: ${{ matrix.repos }}-logs 134 | path: | 135 | ${{ matrix.repos }}/finish/target/liberty/wlp/usr/servers/defaultServer/logs/ 136 | ${{ matrix.repos }}/start/target/liberty/wlp/usr/servers/defaultServer/logs/ 137 | ${{ matrix.repos }}/finish/**/target/liberty/wlp/usr/servers/defaultServer/logs/ 138 | ${{ matrix.repos }}/start/**/target/liberty/wlp/usr/servers/defaultServer/logs/ 139 | if-no-files-found: ignore 140 | - name: Archive npm logs if failed 141 | if: failure() 142 | uses: actions/upload-artifact@v4 143 | with: 144 | name: ${{ matrix.repos }}-npm-logs 145 | path: ~/.npm/_logs 146 | if-no-files-found: ignore 147 | slack-alert: 148 | needs: [test-guide] 149 | if: failure() 150 | runs-on: ubuntu-latest 151 | env: 152 | BUILDLEVEL: ${{ github.event.client_payload.build-level }}${{ github.event.inputs.build }} 153 | DEVDATE: ${{ github.event.client_payload.dev-date }}${{ github.event.inputs.date }} 154 | DRIVER: ${{ github.event.client_payload.driver-location }}${{ github.event.inputs.driver }} 155 | steps: 156 | - uses: actions/checkout@v4 157 | - name: send-status 158 | run: | 159 | python3 .github/workflows/slack-alert.py ${{ env.BUILDLEVEL }} ${{ env.DRIVER }} ${{ env.DEVDATE }} ${{ needs.test-guide.result }} \ 160 | ${{ github.repository }} ${{ github.run_id }} ${{ secrets.SLACK_HOOK }} 161 | echo ${{ needs.test-guide.result }} 162 | -------------------------------------------------------------------------------- /.github/workflows/daily-build.yml: -------------------------------------------------------------------------------- 1 | name: Daily build testing 2 | 3 | on: 4 | repository_dispatch: 5 | types: [ daily-build ] 6 | workflow_dispatch: 7 | inputs: 8 | build: 9 | description: Build level as as cl250420250407-1902 10 | required: true 11 | date: 12 | description: Dev date as 2025-04-07_1902 13 | required: true 14 | driver: 15 | description: Driver location as openliberty-all-25.0.0.4-cl250420250407-1902.zip 16 | required: true 17 | guide: 18 | description: Guide to build 19 | default: "all" 20 | required: true 21 | branch: 22 | description: Branch to test 23 | required: false 24 | jdk_level: 25 | description: JDK level to test 26 | default: "11" 27 | required: true 28 | 29 | env: 30 | # DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} 31 | # DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} 32 | CHANGE_MINIKUBE_NONE_USER: true 33 | 34 | jobs: 35 | get-guide-repos: 36 | runs-on: ubuntu-latest 37 | outputs: 38 | repos: ${{ steps.create-list.outputs.repos }}${{ steps.input-guide.outputs.repo }} 39 | steps: 40 | - uses: actions/checkout@v4 41 | - name: Get repos 42 | if: ${{ github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' && github.event.inputs.guide == 'all' }} 43 | id: create-list 44 | run: echo "repos=$(python3 .github/workflows/get-repos.py)" >> $GITHUB_OUTPUT 45 | - name: Set repo 46 | if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.guide != 'all' }} 47 | id: input-guide 48 | run: echo "repo=[ '${{ github.event.inputs.guide }}' ]" >> $GITHUB_OUTPUT 49 | build-level: 50 | runs-on: ubuntu-latest 51 | steps: 52 | - name: Starting daily build tests for ${{ github.event.client_payload.build-level }}${{ github.event.inputs.build }} 53 | run: | 54 | echo "Inputs: " 55 | echo build: ${{ github.event.inputs.build }} 56 | echo date: ${{ github.event.inputs.date }} 57 | echo driver: ${{ github.event.inputs.driver }} 58 | echo guide: ${{ github.event.inputs.guide }} 59 | echo branch: ${{ github.event.inputs.branch }} 60 | echo jdk_level: ${{ github.event.client_payload.jdk }}${{ github.event.inputs.jdk_level }} 61 | echo "Build level: ${{ github.event.client_payload.build-level }}${{ github.event.inputs.build }}" 62 | test-guide: 63 | needs: [ get-guide-repos ] 64 | runs-on: ubuntu-latest 65 | strategy: 66 | fail-fast: false 67 | max-parallel: 5 68 | matrix: 69 | repos: ${{ fromJson(needs.get-guide-repos.outputs.repos) }} 70 | jdk: [ "${{ github.event.client_payload.jdk }}${{ github.event.inputs.jdk_level }}" ] 71 | steps: 72 | - name: Setup JDK ${{ matrix.jdk }} 73 | uses: actions/setup-java@v1 74 | with: 75 | java-version: ${{ matrix.jdk }} 76 | - name: Clone ${{ matrix.repos }} 77 | uses: actions/checkout@v4 78 | with: 79 | repository: OpenLiberty/${{ matrix.repos }} 80 | ref: ${{ github.event.inputs.branch }} 81 | path: ${{ matrix.repos }} 82 | - name: Set permissions 83 | run: chmod +x ${{ matrix.repos }}/scripts/*.sh 84 | #- name: Docker login for runner 85 | # run: | 86 | # if [ "${{ matrix.repos }}" = "guide-liberty-deep-dive-gradle" ] 87 | # then 88 | # echo podman login 89 | # echo $DOCKER_PASSWORD | podman login docker.io -u $DOCKER_USERNAME --password-stdin 90 | # else 91 | # echo docker login 92 | # echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin 93 | # fi 94 | #- name: Docker login for root 95 | # run: | 96 | # if [ "${{ matrix.repos }}" = "guide-liberty-deep-dive-gradle" ] 97 | # then 98 | # echo podman login 99 | # echo $DOCKER_PASSWORD | sudo podman login docker.io -u $DOCKER_USERNAME --password-stdin 100 | # else 101 | # echo docker login 102 | # echo $DOCKER_PASSWORD | sudo docker login -u $DOCKER_USERNAME --password-stdin 103 | # fi 104 | - name: Run tests for ${{ matrix.repos }} 105 | working-directory: ${{ matrix.repos }}/finish 106 | env: 107 | BUILDLEVEL: ${{ github.event.client_payload.build-level }}${{ github.event.inputs.build }} 108 | DEVDATE: ${{ github.event.client_payload.dev-date }}${{ github.event.inputs.date }} 109 | DRIVER: ${{ github.event.client_payload.driver-location }}${{ github.event.inputs.driver }} 110 | run: sudo -E ../scripts/dailyBuild.sh -t $DEVDATE -d $DRIVER -b $BUILDLEVEL -j ${{ matrix.jdk }} 111 | - name: Post tests 112 | working-directory: ${{ matrix.repos }} 113 | if: always() 114 | run: | 115 | mvn -version 116 | sudo chmod -R 777 . 117 | logsPath=$(sudo find . -name "console.log"); 118 | if [ -z "$logsPath" ] 119 | then 120 | logsPath=$(sudo find . -name "messages.log"); 121 | if [ -z "$logsPath" ] 122 | then sudo docker images 123 | else 124 | sudo cat $logsPath | grep product 125 | sudo cat $logsPath | grep java.runtime 126 | fi 127 | else sudo cat $logsPath | grep Launching 128 | fi 129 | - name: Archive server logs if failed 130 | if: failure() 131 | uses: actions/upload-artifact@v4 132 | with: 133 | name: ${{ matrix.repos }}-logs 134 | path: | 135 | ${{ matrix.repos }}/finish/target/liberty/wlp/usr/servers/defaultServer/logs/ 136 | ${{ matrix.repos }}/start/target/liberty/wlp/usr/servers/defaultServer/logs/ 137 | ${{ matrix.repos }}/finish/**/target/liberty/wlp/usr/servers/defaultServer/logs/ 138 | ${{ matrix.repos }}/start/**/target/liberty/wlp/usr/servers/defaultServer/logs/ 139 | if-no-files-found: ignore 140 | - name: Archive npm logs if failed 141 | if: failure() 142 | uses: actions/upload-artifact@v4 143 | with: 144 | name: ${{ matrix.repos }}-npm-logs 145 | path: ~/.npm/_logs 146 | if-no-files-found: ignore 147 | slack-alert: 148 | needs: [test-guide] 149 | if: failure() 150 | runs-on: ubuntu-latest 151 | env: 152 | BUILDLEVEL: ${{ github.event.client_payload.build-level }}${{ github.event.inputs.build }} 153 | DEVDATE: ${{ github.event.client_payload.dev-date }}${{ github.event.inputs.date }} 154 | DRIVER: ${{ github.event.client_payload.driver-location }}${{ github.event.inputs.driver }} 155 | steps: 156 | - uses: actions/checkout@v4 157 | - name: send-status 158 | run: | 159 | python3 .github/workflows/slack-alert.py ${{ env.BUILDLEVEL }} ${{ env.DRIVER }} ${{ env.DEVDATE }} ${{ needs.test-guide.result }} \ 160 | ${{ github.repository }} ${{ github.run_id }} ${{ secrets.SLACK_HOOK }} 161 | echo ${{ needs.test-guide.result }} 162 | -------------------------------------------------------------------------------- /pr-checker/linters/sun_checks.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 31 | 32 | 33 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | -------------------------------------------------------------------------------- /pr-checker/linters/sun_check_skip_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 31 | 32 | 33 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | -------------------------------------------------------------------------------- /cloud-hosted-guides.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "buttonText": "Run in cloud", 4 | "buttonLabel": "Or, ", 5 | "tooltipText": "Start the cloud-hosted version of this guide \ron the IBM Developer Skills Network.", 6 | "skillNetworkUrl": "https://openliberty.skillsnetwork.site/guided_projects/cloud-hosted-guide-{projectid}", 7 | "stagingSkillNetworkUrl": "https://ol-staging.skillsnetwork.site/guided_projects/cloud-hosted-guide-{projectid}-staging", 8 | "guides": [ 9 | "rest-client-java", "getting-started", "microprofile-openapi", "rest-intro", "microprofile-rest-client-async", 10 | "containerize", "microprofile-rest-client", "kubernetes-intro", "microprofile-health", "microprofile-jwt", 11 | "cdi-intro", "microshed-testing", "docker", 12 | "microprofile-config", "microprofile-fallback", "microprofile-metrics", "microprofile-opentracing", "microprofile-opentracing-jaeger", 13 | "microprofile-reactive-messaging", "reactive-service-testing", "microprofile-reactive-messaging-acknowledgment", "microprofile-reactive-messaging-rest-integration" 14 | ], 15 | "skillNetworkDomain": "https://openliberty.skillsnetwork.site", 16 | "stagingSkillNetworkDomain": "https://ol-staging.skillsnetwork.site", 17 | "courses" : { 18 | "kubernetes-intro" : "/courses/course-v1:IBM+GPXX0HZ2EN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0HZ2EN+v1/courseware", 19 | "kubernetes-microprofile-health" : "/courses/course-v1:IBM+GPXX0QU9EN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0QU9EN+v1/courseware/guided_project/guided_project", 20 | "kubernetes-microprofile-config" : "/courses/course-v1:IBM+GPXX07YGEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX07YGEN+v1/courseware", 21 | "microprofile-health" : "/courses/course-v1:IBM+GPXX0QTEEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0QTEEN+v1/courseware/guided_project/guided_project", 22 | "microprofile-config" : "/courses/course-v1:IBM+GPXX08WYEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX08WYEN+v1/courseware/guided_project/guided_project", 23 | "microprofile-opentracing" : "/courses/course-v1:IBM+GPXX0QR3EN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0QR3EN+v1/courseware/guided_project/guided_project", 24 | "reactive-service-testing" : "/courses/course-v1:IBM+GPXX07UGEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX07UGEN+v1/courseware/guided_project/guided_project", 25 | "microprofile-reactive-messaging" : "/courses/course-v1:IBM+GPXX0I4FEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0I4FEN+v1/courseware/guided_project/guided_project", 26 | "microshed-testing" : "/courses/course-v1:IBM+GPXX0YXHEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0YXHEN+v1/courseware/guided_project/guided_project", 27 | "docker" : "/courses/course-v1:IBM+GPXX0FTCEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0FTCEN+v1/courseware", 28 | "getting-started" : "/courses/course-v1:IBM+GPXX04TNEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX04TNEN+v1/courseware", 29 | "microprofile-opentracing-jaeger" : "/courses/course-v1:IBM+GPXX0JLHEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0JLHEN+v1/courseware/guided_project/guided_project", 30 | "microprofile-fallback" : "/courses/course-v1:IBM+GPXX0E3QEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0E3QEN+v1/courseware/guided_project/guided_project", 31 | "microprofile-openapi" : "/courses/course-v1:IBM+GPXX0YBFEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0YBFEN+v1/courseware", 32 | "containerize" : "/courses/course-v1:IBM+GPXX01AVEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX01AVEN+v1/courseware/guided_project/guided_project", 33 | "microprofile-metrics" : "/courses/course-v1:IBM+GPXX0QS6EN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0QS6EN+v1/courseware/guided_project/guided_project", 34 | "microprofile-rest-client" : "/courses/course-v1:IBM+GPXX0XV3EN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0XV3EN+v1/courseware/guided_project/guided_project", 35 | "rest-intro" : "/courses/course-v1:IBM+GPXX0JGFEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0JGFEN+v1/courseware/guided_project/guided_project", 36 | "cdi-intro" : "/courses/course-v1:IBM+GPXX0G3KEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0G3KEN+v1/courseware/guided_project/guided_project", 37 | "microprofile-rest-client-async" : "/courses/course-v1:IBM+GPXX0IHMEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0IHMEN+v1/courseware/guided_project/guided_project", 38 | "microprofile-jwt" : "/courses/course-v1:IBM+GPXX0W7KEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0W7KEN+v1/courseware/guided_project/guided_project", 39 | "rest-client-java" : "/courses/course-v1:IBM+GPXX0M7ZEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0M7ZEN+v1/courseware/guided_project/guided_project", 40 | "contract-testing" : "/courses/course-v1:IBM+GPXX05LMEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX05LMEN+v1/courseware/guided_project/guided_project", 41 | "microprofile-reactive-messaging-acknowledgment" : "/courses/course-v1:IBM+GPXX05P1EN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX05P1EN+v1/courseware/guided_project/guided_project", 42 | "microprofile-reactive-messaging-rest-integration" : "/courses/course-v1:IBM+GPXX0UMSEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0UMSEN+v1/courseware/guided_project/guided_project", 43 | "reactive-messaging-sse" : "/courses/course-v1:IBM+GPXX0WRDEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0WRDEN+v1/courseware/guided_project/guided_project", 44 | "reactive-rest-client" : "/courses/course-v1:IBM+GPXX0ZG0EN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0ZG0EN+v1/courseware", 45 | "spring-boot" : "/courses/course-v1:IBM+GPXX0Z2PEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0Z2PEN+v1/courseware/welcome/get_started", 46 | "bean-validation" : "/courses/course-v1:IBM+GPXX0A1YEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0A1YEN+v1/courseware", 47 | "arquillian-managed" : "/courses/course-v1:IBM+GPXX0SDXEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0SDXEN+v1/courseware/welcome/get_started", 48 | "cors" : "/courses/course-v1:IBM+GPXX0QJFEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0QJFEN+v1/courseware/guided_project/guided_project", 49 | "jpa-intro" : "/courses/course-v1:IBM+GPXX0G31EN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0G31EN+v1/courseware/guided_project/guided_project", 50 | "microprofile-graphql" : "/courses/course-v1:IBM+GPXX0BSAEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0BSAEN+v1/courseware/guided_project/guided_project", 51 | "maven-intro" : "/courses/course-v1:IBM+GPXX0FFCEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0FFCEN+v1/courseware/guided_project/guided_project", 52 | "rest-client-angular" : "/courses/course-v1:IBM+GPXX0ADEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0ADEN+v1/courseware", 53 | "rest-client-angularjs" : "/courses/course-v1:IBM+GPXX0RL8EN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0RL8EN+v1/courseware/guided_project/guided_project", 54 | "rest-client-reactjs" : "/courses/course-v1:IBM+GPXX0G81EN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0G81EN+v1/courseware", 55 | "rest-hateoas" : "/courses/course-v1:IBM+GPXX0MP0EN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0MP0EN+v1/courseware/guided_project/guided_project", 56 | "maven-multimodules" : "/courses/course-v1:IBM+GPXX0J71EN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0J71EN+v1/courseware/guided_project/guided_project", 57 | "openliberty-operator-intro" : "/courses/course-v1:IBM+GPXX0HAAEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0HAAEN+v1/courseware/guided_project/guided_project", 58 | "openliberty-operator-openshift" : "/courses/course-v1:IBM+GPXX0M5NEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0M5NEN+v1/courseware/guided_project/guided_project", 59 | "liberty-deep-dive" : "/courses/course-v1:IBM+GPXX0FG5EN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0FG5EN+v1/courseware/guided_project/guided_project", 60 | "mongodb-intro" : "/courses/course-v1:IBM+GPXX017WEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX017WEN+v1/courseware", 61 | "security-intro" : "/courses/course-v1:IBM+GPXX06JEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX06JEN+v1/courseware/guided_project/guided_project", 62 | "graphql-client" : "/courses/course-v1:IBM+GPXX04S5EN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX04S5EN+v1/courseware", 63 | "grpc-intro" : "/courses/course-v1:IBM+GPXX0BCEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0BCEN+v1/courseware", 64 | "microprofile-telemetry-jaeger" : "/courses/course-v1:IBM+GPXX0SXIEN+v1/auto_enroll?next=/courses/course-v1:IBM+GPXX0SXIEN+v1/courseware", 65 | "testcontainers" : "/courses/course-v1:OpenLiberty+GPXX0LEREN+v1/auto_enroll?next=/courses/course-v1:OpenLiberty+GPXX0LEREN+v1/courseware", 66 | "microprofile-config-profile" : "/courses/course-v1:OpenLiberty+GPXX0EZCEN+v1/auto_enroll?next=/courses/course-v1:OpenLiberty+GPXX0EZCEN+v1/courseware", 67 | "jms-intro" : "/courses/course-v1:OpenLiberty+GPXX0XDOEN+v1/auto_enroll?next=/courses/course-v1:OpenLiberty+GPXX0XDOEN+v1/courseware", 68 | "jakarta-faces" : "/courses/course-v1:OpenLiberty+GPXX0KQTEN+v1/auto_enroll?next=/courses/course-v1:OpenLiberty+GPXX0KQTEN+v1/courseware", 69 | "gradle-multimodules" : "/courses/course-v1:OpenLiberty+GPXX09PNEN+v1/auto_enroll?next=/courses/course-v1:OpenLiberty+GPXX09PNEN+v1/courseware" 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /pr-checker/checker.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | import sys 3 | from datetime import date, datetime 4 | import re 5 | import json 6 | import os 7 | 8 | today = date.today() 9 | 10 | 11 | def valid(date_text): 12 | try: 13 | datetime.strptime(date_text, '%Y-%m-%d') 14 | except ValueError: 15 | return False 16 | return True 17 | 18 | 19 | def adoc_checker(file, valid_tags, rules): 20 | """ 21 | Checks adoc file for style and license 22 | """ 23 | lines = [] 24 | output = '' 25 | rules['line-length']['lines'] = lines 26 | license_re = re.compile( 27 | "[Cc]opyright[ ]*[(][Cc][)][ ]*([0-9]{4})([,][ ]*([0-9]{4})){0,1}[ ]*") 28 | 29 | release_date_re = re.compile( 30 | ":page-releasedate:[ ]*([0-9]{4}[-][0-9]{2}[-][0-9]{2})") 31 | tags_re = re.compile(":page-tags: *\[(.*)\]") 32 | list_re = re.compile("^- ") 33 | file_tags_re = re.compile("^.*(hide_tags=).*(tags=).*$") 34 | hotspot_re = re.compile("\[(hotspot(=[^ =\n]+)? ?)+( file(=[0-9]+)?)?\]`[^`\n]*`") 35 | 36 | skip_list = os.environ.get('SKIP_LIST') 37 | print(f"SKIP_LIST={skip_list}\n"); 38 | 39 | for line_num, line in enumerate(file): 40 | if len(line) > 120: 41 | lines.append(line_num + 1) 42 | # checks '- ' and suggest to switch to '* ' 43 | if rules['-']['check']: 44 | if not skip_list: 45 | list_match = list_re.match(line) 46 | if list_match != None: 47 | output += f"[{rules['-']['log-level']}] [LINE {line_num + 1}] Use '* ' to enumerate items instead of '- '.\n" 48 | if rules['license']['check']: 49 | result = license_re.search(line) 50 | if result: 51 | years = result.groups() 52 | if years[-1] != None: 53 | if years[-1] != str(today.year): 54 | output += f"[{rules['license']['log-level']}] [LINE {line_num + 1}] Update the license to the current year.\n" 55 | if years[0] >= years[-1]: 56 | output += f"[{rules['license']['log-level']}] [LINE {line_num + 1}] Invalid years in license\n" 57 | else: 58 | if years[0] != str(today.year): 59 | output += f"[{rules['license']['log-level']}] [LINE {line_num + 1}] Update the license to the current year.\n" 60 | rules['license']['check'] = False 61 | rules['license']['found'] = True 62 | if rules['release_date']['check']: 63 | result = release_date_re.search(line) 64 | if result: 65 | date = result.groups() 66 | if not valid(date[-1]): 67 | output += f"[{rules['release_date']['log-level']}] [LINE {line_num + 1}] Release date is invalid: {date[0]} + 1\n" 68 | output += f"[{rules['release_date']['log-level']}] [LINE {line_num + 1}] The date should be in the form YYYY-MM-DD\n" 69 | rules['release_date']['check'] = False 70 | rules['release_date']['found'] = True 71 | if rules['page_tags']['check']: 72 | result = tags_re.search(line) 73 | if result: 74 | tags = result.groups() 75 | invalid_tags = [] 76 | if len(tags) != 0: 77 | tags = list(str(tags[0]).split(',')) 78 | for tag in tags: 79 | if tag.strip(" '\"") not in valid_tags: 80 | invalid_tags.append(tag) 81 | output += f"[{rules['page_tags']['log-level']}] [LINE {line_num + 1}] {tag} is an invalid tag\n" 82 | if len(invalid_tags) > 0: 83 | output += f"[{rules['page_tags']['log-level']}] [LINE {line_num +1}] List of valid tags: {valid_tags}\n" 84 | output += f"[{rules['page_tags']['log-level']}] [LINE {line_num +1}] Note that these tags are case sensitve\n" 85 | rules['page_tags']['check'] = False 86 | if rules['file_tags']['check']: 87 | result = file_tags_re.search(line) 88 | if result: 89 | output += f"[{rules['file_tags']['log-level']}] [LINE {line_num +1}] Define 'tags' in front of 'hide_tags'\n" 90 | if rules['hotspots']['check']: 91 | result = hotspot_re.findall(line) 92 | hotspots = line.count("[hotspot") 93 | if len(result) != hotspots: 94 | output += f"[{rules['hotspots']['log-level']}] [LINE {line_num +1}] Improperly formatted hotspot on this line\n" 95 | output += f"[{rules['hotspots']['log-level']}] [LINE {line_num +1}] Note that a hotspot should not be split between lines\n" 96 | 97 | 98 | if not rules['license']['found']: 99 | output += f"[{rules['license']['log-level']}] Add a license with the current year.\n" 100 | if not rules['release_date']['found']: 101 | output += f"[{rules['release_date']['log-level']}] Add a release date.\n" 102 | if rules['line-length']['lines']: 103 | output += f"[{rules['line-length']['log-level']}] The following lines are longer than 120 characters:\n" 104 | output += f"[{rules['line-length']['log-level']}] {rules['line-length']['lines']}\n" 105 | output += f"[{rules['line-length']['log-level']}] Consider wrapping text to improve readability.\n" 106 | return output 107 | 108 | 109 | def check_vocabulary(file, deny_list, warning_list): 110 | """ 111 | """ 112 | file.seek(0) 113 | deny_occurrence, warning_occurrence = {}, {} 114 | deny = re.compile('|'.join(deny_list), re.IGNORECASE) 115 | warn = re.compile('|'.join(warning_list), re.IGNORECASE) 116 | output = '' 117 | for line_num, line in enumerate(file): 118 | if ':common-includes:' not in line: 119 | matched_deny = deny.findall(line) 120 | matched_warning = warn.findall(line) 121 | if matched_deny: 122 | deny_occurrence[line_num] = matched_deny 123 | if matched_warning: 124 | warning_occurrence[line_num] = matched_warning 125 | if deny_occurrence: 126 | output += '[ERROR] The following words must be changed.\n' 127 | for line in deny_occurrence.keys(): 128 | output += f'[ERROR] [LINE {line + 1}] {deny_occurrence[line]}\n' 129 | if warning_occurrence: 130 | output += '[WARNING] The following words should ideally be changed.\n' 131 | for line in warning_occurrence.keys(): 132 | output += f'[WARNING] [LINE {line + 1}] {warning_occurrence[line]}\n' 133 | return output 134 | 135 | 136 | if __name__ == "__main__": 137 | parser = argparse.ArgumentParser() 138 | parser.add_argument('--deny', nargs=1, 139 | type=argparse.FileType('r')) 140 | parser.add_argument('--warn', nargs=1, 141 | type=argparse.FileType('r')) 142 | parser.add_argument('--tags', nargs=1, 143 | type=argparse.FileType('r')) 144 | parser.add_argument('--rules', nargs=1, 145 | type=argparse.FileType('r')) 146 | parser.add_argument('--repo', nargs=1, type=str) 147 | parser.add_argument('infile', nargs='*', 148 | type=argparse.FileType('r'), default=sys.stdin) 149 | args = parser.parse_args() 150 | 151 | if args.deny is not None: 152 | try: 153 | deny_list = json.loads(args.deny[0].read()) 154 | except: 155 | e = sys.exc_info()[0] 156 | print("something went wrong with deny list parsing", e) 157 | deny_list = [] 158 | if args.warn is not None: 159 | try: 160 | warning_list = json.loads(args.warn[0].read()) 161 | except: 162 | e = sys.exc_info()[0] 163 | print("something went wrong with warning list parsing", e) 164 | warning_list = [] 165 | if args.tags is not None: 166 | try: 167 | tags = list(filter(lambda tag: 'visible' in tag and tag['visible'] == 'true', json.loads( 168 | args.tags[0].read())['guide_tags'])) 169 | tags = list(map(lambda tag: tag['name'], tags)) 170 | except: 171 | e = sys.exc_info()[0] 172 | print("something went wrong with tags parsing", e) 173 | tags = [] 174 | if args.rules is not None and args.repo is not None: 175 | try: 176 | repo = args.repo[0].split('/')[-1] 177 | rules = dict(map(lambda rule: (rule[0], {'check': repo not in rule[1]['exception'], 'log-level': rule[1]['log-level']}), 178 | json.loads(args.rules[0].read()).items())) 179 | except: 180 | e = sys.exc_info()[0] 181 | print("something went wrong with repo and rule parsing", e) 182 | repo = '' 183 | rules = { 184 | "license": {'check': True, 'log-level': 'ERROR'}, 185 | "release_date": {'check': True, 'log-level': 'ERROR'}, 186 | "page_tags": {'check': True, 'log-level': 'ERROR'}, 187 | "-": {'check': True, 'log-level': 'ERROR'}, 188 | "line-length": {'check': True, 'log-level': 'WARNING'}, 189 | "file_tags": {'check': True, 'log-level': 'ERROR'}, 190 | } 191 | 192 | file_extensions = map(lambda f: f.name.split( 193 | '/')[-1].split('.')[-1], args.infile) 194 | output = '' 195 | 196 | for i, f in enumerate(file_extensions): 197 | if f == 'adoc': 198 | output += adoc_checker(args.infile[i], tags, rules) 199 | output += check_vocabulary(args.infile[i], deny_list, warning_list) 200 | if output != '': 201 | print(output.rstrip()) 202 | if 'ERROR' in output: 203 | sys.exit(1) 204 | else: 205 | sys.exit(0) 206 | else: 207 | sys.exit(0) 208 | -------------------------------------------------------------------------------- /guide_tags.json: -------------------------------------------------------------------------------- 1 | { 2 | "guide_tags": [ 3 | { 4 | "name": "maven", 5 | "guides": ["arquillian-managed", "getting-started", "maven-intro", "maven-multimodules"], 6 | "visible": "true" 7 | }, 8 | { 9 | "name": "jakarta-ee", 10 | "additional_search_terms": ["Java EE", "JEE"], 11 | "guides": ["bean-validation", "cdi-intro", "jpa-intro", "microshed-testing", "rest-client-java", "rest-intro", 12 | "security-intro", "microprofile-reactive-messaging", "microprofile-reactive-messaging-rest-integration", "reactive-messaging-sse", 13 | "mongodb-intro", "jakarta-websocket", "jms-intro", "testcontainers", "jakarta-faces"], 14 | "visible": "true" 15 | }, 16 | { 17 | "name": "microprofile", 18 | "additional_search_terms": ["Micro Profile", "MP"], 19 | "guides": ["cdi-intro", "kubernetes-microprofile-config", "kubernetes-microprofile-health", "microprofile-config", "microprofile-config-profile", 20 | "microprofile-fallback", "microprofile-health", "microprofile-istio-retry-fallback", "microprofile-jwt", 21 | "microprofile-metrics", "microprofile-openapi", "microprofile-telemetry-jaeger", "microprofile-opentracing", "microprofile-opentracing-jaeger", 22 | "microprofile-telemetry-grafana-automatic", "microprofile-telemetry-grafana-custom", 23 | "microprofile-rest-client", "microprofile-rest-client-async", "microshed-testing", "rest-client-java", "rest-intro", "bulkhead", 24 | "circuit-breaker", "microprofile-config-intro", "retry-timeout", 25 | "microprofile-reactive-messaging", "reactive-service-testing", "microprofile-reactive-messaging-rest-integration", "microprofile-reactive-messaging-acknowledgment", 26 | "reactive-messaging-sse", "mongodb-intro", "microprofile-graphql", "testcontainers"], 27 | "visible": "true" 28 | }, 29 | { 30 | "name": "kubernetes", 31 | "guides": ["cloud-aws", "cloud-azure", "cloud-ibm", "cloud-openshift", "istio-intro", "kubernetes-intro", 32 | "kubernetes-microprofile-config", "kubernetes-microprofile-health", "microprofile-istio-retry-fallback", 33 | "okd", "openshift-codeready-containers", "sessions", "cloud-google", "openliberty-operator-intro", "openliberty-operator-openshift"], 34 | "visible": "true" 35 | }, 36 | { 37 | "name": "docker", 38 | "guides": ["cloud-aws", "cloud-azure", "cloud-ibm", "cloud-openshift", "containerize", "docker", 39 | "getting-started", "istio-intro", "kubernetes-intro", "kubernetes-microprofile-config", 40 | "kubernetes-microprofile-health", "microprofile-istio-retry-fallback", "microshed-testing", "okd", 41 | "openshift-codeready-containers", "sessions", "spring-boot", "cloud-google", "testcontainers"], 42 | "visible": "true" 43 | }, 44 | { 45 | "name": "cloud", 46 | "guides": ["cloud-aws", "cloud-azure", "cloud-ibm", "cloud-openshift", "okd", "cloud-openshift-operator", "openshift-codeready-containers", 47 | "cloud-google", "openliberty-operator-openshift"], 48 | "visible": "true" 49 | }, 50 | { 51 | "name": "reactive", 52 | "guides": ["microprofile-reactive-messaging", "microprofile-reactive-messaging-rest-integration", "microprofile-reactive-messaging-acknowledgment", "reactive-service-testing", "microprofile-rest-client-async", "reactive-rest-client", "reactive-messaging-sse"], 53 | "visible": "true" 54 | }, 55 | { 56 | "name": "getting-started", 57 | "guides": ["getting-started", "gradle-intro", "maven-intro"] 58 | }, 59 | { 60 | "name": "microservices", 61 | "guides": ["getting-started", "microprofile-telemetry-jaeger", "circuit-breaker", "microprofile-config-intro", 62 | "bulkhead", "retry-timeout", "microprofile-reactive-messaging", "microprofile-reactive-messaging-rest-integration"] 63 | }, 64 | { 65 | "name": "gradle", 66 | "guides": ["gradle-intro", "gradle-multimodules"] 67 | }, 68 | { 69 | "name": "security", 70 | "guides": ["microprofile-jwt", "security-intro", "social-media-login"], 71 | "visible": "true" 72 | }, 73 | { 74 | "name": "opentracing", 75 | "guides": ["microprofile-opentracing", "microprofile-opentracing-jaeger"] 76 | }, 77 | { 78 | "name": "@traced", 79 | "guides": ["microprofile-opentracing", "microprofile-opentracing-jaeger"] 80 | }, 81 | { 82 | "name": "telemetry", 83 | "guides": ["microprofile-telemetry-jaeger", "microprofile-telemetry-grafana-automatic", "microprofile-telemetry-grafana-custom"] 84 | }, 85 | { 86 | "name": "@withspan", 87 | "guides": ["microprofile-telemetry-jaeger", "microprofile-telemetry-grafana-custom"] 88 | }, 89 | { 90 | "name": "testing", 91 | "guides": ["microshed-testing", "testcontainers", "reactive-service-testing", "contract-testing"] 92 | }, 93 | { 94 | "name": "interactive", 95 | "guides": ["bulkhead", "circuit-breaker", "microprofile-config-intro", "retry-timeout"] 96 | }, 97 | { 98 | "name": "@bulkhead", 99 | "guides": ["bulkhead"] 100 | }, 101 | { 102 | "name": "@asynchronous", 103 | "guides": ["bulkhead"] 104 | }, 105 | { 106 | "name": "@fallback", 107 | "guides": ["bulkhead", "circuit-breaker", "microprofile-fallback", "microprofile-istio-retry-fallback"] 108 | }, 109 | { 110 | "name": "concurrent-requests", 111 | "guides": ["bulkhead"] 112 | }, 113 | { 114 | "name": "circuit-breaker", 115 | "guides": ["circuit-breaker"] 116 | }, 117 | { 118 | "name": "@circuitbreaker", 119 | "guides": ["circuit-breaker"] 120 | }, 121 | { 122 | "name": "fault-tolerance", 123 | "guides": ["circuit-breaker", "retry-timeout", "microprofile-fallback", "microprofile-istio-retry-fallback"] 124 | }, 125 | { 126 | "name": "config", 127 | "guides": ["microprofile-config-intro", "microprofile-config", "microprofile-config-profile", "kubernetes-microprofile-config", "microprofile-config-profile"] 128 | }, 129 | { 130 | "name": "@inject", 131 | "guides": ["microprofile-config-intro", "microprofile-config", "cdi-intro"] 132 | }, 133 | { 134 | "name": "@configproperty", 135 | "guides": ["microprofile-config-intro", "microprofile-config"] 136 | }, 137 | { 138 | "name": "configsource", 139 | "guides": ["microprofile-config-intro", "microprofile-config", "microprofile-config-profile"] 140 | }, 141 | { 142 | "name": "@retry", 143 | "guides": ["retry-timeout"] 144 | }, 145 | { 146 | "name": "@timeout", 147 | "guides": ["retry-timeout"] 148 | }, 149 | { 150 | "name": "kafka", 151 | "guides": ["cloud-openshift-operator", "microprofile-reactive-messaging", "microprofile-reactive-messaging-acknowledgment", 152 | "microprofile-reactive-messaging-rest-integration", "microprofile-rest-client-async", 153 | "reactive-messaging-sse", "reactive-rest-client", "reactive-service-testing" 154 | ] 155 | }, 156 | { 157 | "name": "run-in-cloud", 158 | "guides": [ 159 | "rest-client-java", "getting-started", "microprofile-openapi", "rest-intro", "microprofile-rest-client-async", 160 | "containerize", "microprofile-rest-client", "kubernetes-intro", "microprofile-health", "microprofile-jwt", 161 | "cdi-intro", "microshed-testing", "docker", 162 | "microprofile-config", "microprofile-fallback", "microprofile-metrics", "microprofile-opentracing", "microprofile-opentracing-jaeger", 163 | "microprofile-reactive-messaging", "reactive-service-testing", "microprofile-reactive-messaging-acknowledgment", "microprofile-reactive-messaging-rest-integration", 164 | "contract-testing", "kubernetes-microprofile-health", "kubernetes-microprofile-config", "reactive-messaging-sse", "reactive-rest-client", 165 | "spring-boot", "arquillian-managed", "bean-validation", "cors", "jpa-intro", 166 | "microprofile-graphql", "maven-intro", "rest-client-angular", "rest-client-angularjs", "rest-client-reactjs", "rest-hateoas", "maven-multimodules", 167 | "openliberty-operator-intro", "openliberty-operator-openshift", 168 | "security-intro", "mongodb-intro", "microprofile-telemetry-jaeger", "microprofile-config-profile", "testcontainers", 169 | "graphql-client", "grpc-intro", "jms-intro", "jakarta-faces" 170 | ], 171 | "visible": "true" 172 | }, 173 | { 174 | "name": "deprecated", 175 | "guides": [ "microprofile-opentracing", "microprofile-opentracing-jaeger", "okd", "microshed-testing" ], 176 | "alt_links": { 177 | "microprofile-opentracing" : "microprofile-telemetry-jaeger", 178 | "microprofile-opentracing-jaeger" : "microprofile-telemetry-jaeger", 179 | "okd" : "openshift-codeready-containers", 180 | "microshed-testing": "testcontainers" 181 | } 182 | } 183 | ] 184 | } 185 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Code and build scripts are licensed under the Eclipse Public License v2 2 | 3 | Documentation files (e.g. files with an adoc file extension) are licensed under 4 | Creative Commons Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0) 5 | 6 | Eclipse Public License - v 2.0 7 | 8 | THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE 9 | PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION 10 | OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. 11 | 12 | 1. DEFINITIONS 13 | 14 | "Contribution" means: 15 | 16 | a) in the case of the initial Contributor, the initial content 17 | Distributed under this Agreement, and 18 | 19 | b) in the case of each subsequent Contributor: 20 | i) changes to the Program, and 21 | ii) additions to the Program; 22 | where such changes and/or additions to the Program originate from 23 | and are Distributed by that particular Contributor. A Contribution 24 | "originates" from a Contributor if it was added to the Program by 25 | such Contributor itself or anyone acting on such Contributor's behalf. 26 | Contributions do not include changes or additions to the Program that 27 | are not Modified Works. 28 | 29 | "Contributor" means any person or entity that Distributes the Program. 30 | 31 | "Licensed Patents" mean patent claims licensable by a Contributor which 32 | are necessarily infringed by the use or sale of its Contribution alone 33 | or when combined with the Program. 34 | 35 | "Program" means the Contributions Distributed in accordance with this 36 | Agreement. 37 | 38 | "Recipient" means anyone who receives the Program under this Agreement 39 | or any Secondary License (as applicable), including Contributors. 40 | 41 | "Derivative Works" shall mean any work, whether in Source Code or other 42 | form, that is based on (or derived from) the Program and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. 45 | 46 | "Modified Works" shall mean any work in Source Code or other form that 47 | results from an addition to, deletion from, or modification of the 48 | contents of the Program, including, for purposes of clarity any new file 49 | in Source Code form that contains any contents of the Program. Modified 50 | Works shall not include works that contain only declarations, 51 | interfaces, types, classes, structures, or files of the Program solely 52 | in each case in order to link to, bind by name, or subclass the Program 53 | or Modified Works thereof. 54 | 55 | "Distribute" means the acts of a) distributing or b) making available 56 | in any manner that enables the transfer of a copy. 57 | 58 | "Source Code" means the form of a Program preferred for making 59 | modifications, including but not limited to software source code, 60 | documentation source, and configuration files. 61 | 62 | "Secondary License" means either the GNU General Public License, 63 | Version 2.0, or any later versions of that license, including any 64 | exceptions or additional permissions as identified by the initial 65 | Contributor. 66 | 67 | 2. GRANT OF RIGHTS 68 | 69 | a) Subject to the terms of this Agreement, each Contributor hereby 70 | grants Recipient a non-exclusive, worldwide, royalty-free copyright 71 | license to reproduce, prepare Derivative Works of, publicly display, 72 | publicly perform, Distribute and sublicense the Contribution of such 73 | Contributor, if any, and such Derivative Works. 74 | 75 | b) Subject to the terms of this Agreement, each Contributor hereby 76 | grants Recipient a non-exclusive, worldwide, royalty-free patent 77 | license under Licensed Patents to make, use, sell, offer to sell, 78 | import and otherwise transfer the Contribution of such Contributor, 79 | if any, in Source Code or other form. This patent license shall 80 | apply to the combination of the Contribution and the Program if, at 81 | the time the Contribution is added by the Contributor, such addition 82 | of the Contribution causes such combination to be covered by the 83 | Licensed Patents. The patent license shall not apply to any other 84 | combinations which include the Contribution. No hardware per se is 85 | licensed hereunder. 86 | 87 | c) Recipient understands that although each Contributor grants the 88 | licenses to its Contributions set forth herein, no assurances are 89 | provided by any Contributor that the Program does not infringe the 90 | patent or other intellectual property rights of any other entity. 91 | Each Contributor disclaims any liability to Recipient for claims 92 | brought by any other entity based on infringement of intellectual 93 | property rights or otherwise. As a condition to exercising the 94 | rights and licenses granted hereunder, each Recipient hereby 95 | assumes sole responsibility to secure any other intellectual 96 | property rights needed, if any. For example, if a third party 97 | patent license is required to allow Recipient to Distribute the 98 | Program, it is Recipient's responsibility to acquire that license 99 | before distributing the Program. 100 | 101 | d) Each Contributor represents that to its knowledge it has 102 | sufficient copyright rights in its Contribution, if any, to grant 103 | the copyright license set forth in this Agreement. 104 | 105 | e) Notwithstanding the terms of any Secondary License, no 106 | Contributor makes additional grants to any Recipient (other than 107 | those set forth in this Agreement) as a result of such Recipient's 108 | receipt of the Program under the terms of a Secondary License 109 | (if permitted under the terms of Section 3). 110 | 111 | 3. REQUIREMENTS 112 | 113 | 3.1 If a Contributor Distributes the Program in any form, then: 114 | 115 | a) the Program must also be made available as Source Code, in 116 | accordance with section 3.2, and the Contributor must accompany 117 | the Program with a statement that the Source Code for the Program 118 | is available under this Agreement, and informs Recipients how to 119 | obtain it in a reasonable manner on or through a medium customarily 120 | used for software exchange; and 121 | 122 | b) the Contributor may Distribute the Program under a license 123 | different than this Agreement, provided that such license: 124 | i) effectively disclaims on behalf of all other Contributors all 125 | warranties and conditions, express and implied, including 126 | warranties or conditions of title and non-infringement, and 127 | implied warranties or conditions of merchantability and fitness 128 | for a particular purpose; 129 | 130 | ii) effectively excludes on behalf of all other Contributors all 131 | liability for damages, including direct, indirect, special, 132 | incidental and consequential damages, such as lost profits; 133 | 134 | iii) does not attempt to limit or alter the recipients' rights 135 | in the Source Code under section 3.2; and 136 | 137 | iv) requires any subsequent distribution of the Program by any 138 | party to be under a license that satisfies the requirements 139 | of this section 3. 140 | 141 | 3.2 When the Program is Distributed as Source Code: 142 | 143 | a) it must be made available under this Agreement, or if the 144 | Program (i) is combined with other material in a separate file or 145 | files made available under a Secondary License, and (ii) the initial 146 | Contributor attached to the Source Code the notice described in 147 | Exhibit A of this Agreement, then the Program may be made available 148 | under the terms of such Secondary Licenses, and 149 | 150 | b) a copy of this Agreement must be included with each copy of 151 | the Program. 152 | 153 | 3.3 Contributors may not remove or alter any copyright, patent, 154 | trademark, attribution notices, disclaimers of warranty, or limitations 155 | of liability ("notices") contained within the Program from any copy of 156 | the Program which they Distribute, provided that Contributors may add 157 | their own appropriate notices. 158 | 159 | 4. COMMERCIAL DISTRIBUTION 160 | 161 | Commercial distributors of software may accept certain responsibilities 162 | with respect to end users, business partners and the like. While this 163 | license is intended to facilitate the commercial use of the Program, 164 | the Contributor who includes the Program in a commercial product 165 | offering should do so in a manner which does not create potential 166 | liability for other Contributors. Therefore, if a Contributor includes 167 | the Program in a commercial product offering, such Contributor 168 | ("Commercial Contributor") hereby agrees to defend and indemnify every 169 | other Contributor ("Indemnified Contributor") against any losses, 170 | damages and costs (collectively "Losses") arising from claims, lawsuits 171 | and other legal actions brought by a third party against the Indemnified 172 | Contributor to the extent caused by the acts or omissions of such 173 | Commercial Contributor in connection with its distribution of the Program 174 | in a commercial product offering. The obligations in this section do not 175 | apply to any claims or Losses relating to any actual or alleged 176 | intellectual property infringement. In order to qualify, an Indemnified 177 | Contributor must: a) promptly notify the Commercial Contributor in 178 | writing of such claim, and b) allow the Commercial Contributor to control, 179 | and cooperate with the Commercial Contributor in, the defense and any 180 | related settlement negotiations. The Indemnified Contributor may 181 | participate in any such claim at its own expense. 182 | 183 | For example, a Contributor might include the Program in a commercial 184 | product offering, Product X. That Contributor is then a Commercial 185 | Contributor. If that Commercial Contributor then makes performance 186 | claims, or offers warranties related to Product X, those performance 187 | claims and warranties are such Commercial Contributor's responsibility 188 | alone. Under this section, the Commercial Contributor would have to 189 | defend claims against the other Contributors related to those performance 190 | claims and warranties, and if a court requires any other Contributor to 191 | pay any damages as a result, the Commercial Contributor must pay 192 | those damages. 193 | 194 | 5. NO WARRANTY 195 | 196 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT 197 | PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS" 198 | BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR 199 | IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF 200 | TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR 201 | PURPOSE. Each Recipient is solely responsible for determining the 202 | appropriateness of using and distributing the Program and assumes all 203 | risks associated with its exercise of rights under this Agreement, 204 | including but not limited to the risks and costs of program errors, 205 | compliance with applicable laws, damage to or loss of data, programs 206 | or equipment, and unavailability or interruption of operations. 207 | 208 | 6. DISCLAIMER OF LIABILITY 209 | 210 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT 211 | PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS 212 | SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 213 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST 214 | PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 215 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 216 | ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE 217 | EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE 218 | POSSIBILITY OF SUCH DAMAGES. 219 | 220 | 7. GENERAL 221 | 222 | If any provision of this Agreement is invalid or unenforceable under 223 | applicable law, it shall not affect the validity or enforceability of 224 | the remainder of the terms of this Agreement, and without further 225 | action by the parties hereto, such provision shall be reformed to the 226 | minimum extent necessary to make such provision valid and enforceable. 227 | 228 | If Recipient institutes patent litigation against any entity 229 | (including a cross-claim or counterclaim in a lawsuit) alleging that the 230 | Program itself (excluding combinations of the Program with other software 231 | or hardware) infringes such Recipient's patent(s), then such Recipient's 232 | rights granted under Section 2(b) shall terminate as of the date such 233 | litigation is filed. 234 | 235 | All Recipient's rights under this Agreement shall terminate if it 236 | fails to comply with any of the material terms or conditions of this 237 | Agreement and does not cure such failure in a reasonable period of 238 | time after becoming aware of such noncompliance. If all Recipient's 239 | rights under this Agreement terminate, Recipient agrees to cease use 240 | and distribution of the Program as soon as reasonably practicable. 241 | However, Recipient's obligations under this Agreement and any licenses 242 | granted by Recipient relating to the Program shall continue and survive. 243 | 244 | Everyone is permitted to copy and distribute copies of this Agreement, 245 | but in order to avoid inconsistency the Agreement is copyrighted and 246 | may only be modified in the following manner. The Agreement Steward 247 | reserves the right to publish new versions (including revisions) of 248 | this Agreement from time to time. No one other than the Agreement 249 | Steward has the right to modify this Agreement. The Eclipse Foundation 250 | is the initial Agreement Steward. The Eclipse Foundation may assign the 251 | responsibility to serve as the Agreement Steward to a suitable separate 252 | entity. Each new version of the Agreement will be given a distinguishing 253 | version number. The Program (including Contributions) may always be 254 | Distributed subject to the version of the Agreement under which it was 255 | received. In addition, after a new version of the Agreement is published, 256 | Contributor may elect to Distribute the Program (including its 257 | Contributions) under the new version. 258 | 259 | Except as expressly stated in Sections 2(a) and 2(b) above, Recipient 260 | receives no rights or licenses to the intellectual property of any 261 | Contributor under this Agreement, whether expressly, by implication, 262 | estoppel or otherwise. All rights in the Program not expressly granted 263 | under this Agreement are reserved. Nothing in this Agreement is intended 264 | to be enforceable by any entity that is not a Contributor or Recipient. 265 | No third-party beneficiary rights are created under this Agreement. 266 | 267 | Exhibit A - Form of Secondary Licenses Notice 268 | 269 | "This Source Code may also be made available under the following 270 | Secondary Licenses when the conditions for such availability set forth 271 | in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), 272 | version(s), and exceptions or additional permissions here}." 273 | 274 | Simply including a copy of this Agreement, including this Exhibit A 275 | is not sufficient to license the Source Code under Secondary Licenses. 276 | 277 | If it is not possible or desirable to put the notice in a particular 278 | file, then You may include the notice in a location (such as a LICENSE 279 | file in a relevant directory) where a recipient would be likely to 280 | look for such a notice. 281 | 282 | You may add additional accurate notices of copyright ownership. 283 | 284 | -------------------------------------------------------------------------------- 285 | 286 | Attribution-NoDerivatives 4.0 International 287 | 288 | ======================================================================= 289 | 290 | Creative Commons Corporation ("Creative Commons") is not a law firm and 291 | does not provide legal services or legal advice. Distribution of 292 | Creative Commons public licenses does not create a lawyer-client or 293 | other relationship. Creative Commons makes its licenses and related 294 | information available on an "as-is" basis. Creative Commons gives no 295 | warranties regarding its licenses, any material licensed under their 296 | terms and conditions, or any related information. Creative Commons 297 | disclaims all liability for damages resulting from their use to the 298 | fullest extent possible. 299 | 300 | Using Creative Commons Public Licenses 301 | 302 | Creative Commons public licenses provide a standard set of terms and 303 | conditions that creators and other rights holders may use to share 304 | original works of authorship and other material subject to copyright 305 | and certain other rights specified in the public license below. The 306 | following considerations are for informational purposes only, are not 307 | exhaustive, and do not form part of our licenses. 308 | 309 | Considerations for licensors: Our public licenses are 310 | intended for use by those authorized to give the public 311 | permission to use material in ways otherwise restricted by 312 | copyright and certain other rights. Our licenses are 313 | irrevocable. Licensors should read and understand the terms 314 | and conditions of the license they choose before applying it. 315 | Licensors should also secure all rights necessary before 316 | applying our licenses so that the public can reuse the 317 | material as expected. Licensors should clearly mark any 318 | material not subject to the license. This includes other CC- 319 | licensed material, or material used under an exception or 320 | limitation to copyright. More considerations for licensors: 321 | wiki.creativecommons.org/Considerations_for_licensors 322 | 323 | Considerations for the public: By using one of our public 324 | licenses, a licensor grants the public permission to use the 325 | licensed material under specified terms and conditions. If 326 | the licensor's permission is not necessary for any reason--for 327 | example, because of any applicable exception or limitation to 328 | copyright--then that use is not regulated by the license. Our 329 | licenses grant only permissions under copyright and certain 330 | other rights that a licensor has authority to grant. Use of 331 | the licensed material may still be restricted for other 332 | reasons, including because others have copyright or other 333 | rights in the material. A licensor may make special requests, 334 | such as asking that all changes be marked or described. 335 | Although not required by our licenses, you are encouraged to 336 | respect those requests where reasonable. More_considerations 337 | for the public: 338 | wiki.creativecommons.org/Considerations_for_licensees 339 | 340 | 341 | ======================================================================= 342 | 343 | Creative Commons Attribution-NoDerivatives 4.0 International Public 344 | License 345 | 346 | By exercising the Licensed Rights (defined below), You accept and agree 347 | to be bound by the terms and conditions of this Creative Commons 348 | Attribution-NoDerivatives 4.0 International Public License ("Public 349 | License"). To the extent this Public License may be interpreted as a 350 | contract, You are granted the Licensed Rights in consideration of Your 351 | acceptance of these terms and conditions, and the Licensor grants You 352 | such rights in consideration of benefits the Licensor receives from 353 | making the Licensed Material available under these terms and 354 | conditions. 355 | 356 | 357 | Section 1 -- Definitions. 358 | 359 | a. Adapted Material means material subject to Copyright and Similar 360 | Rights that is derived from or based upon the Licensed Material 361 | and in which the Licensed Material is translated, altered, 362 | arranged, transformed, or otherwise modified in a manner requiring 363 | permission under the Copyright and Similar Rights held by the 364 | Licensor. For purposes of this Public License, where the Licensed 365 | Material is a musical work, performance, or sound recording, 366 | Adapted Material is always produced where the Licensed Material is 367 | synched in timed relation with a moving image. 368 | 369 | b. Copyright and Similar Rights means copyright and/or similar rights 370 | closely related to copyright including, without limitation, 371 | performance, broadcast, sound recording, and Sui Generis Database 372 | Rights, without regard to how the rights are labeled or 373 | categorized. For purposes of this Public License, the rights 374 | specified in Section 2(b)(1)-(2) are not Copyright and Similar 375 | Rights. 376 | 377 | c. Effective Technological Measures means those measures that, in the 378 | absence of proper authority, may not be circumvented under laws 379 | fulfilling obligations under Article 11 of the WIPO Copyright 380 | Treaty adopted on December 20, 1996, and/or similar international 381 | agreements. 382 | 383 | d. Exceptions and Limitations means fair use, fair dealing, and/or 384 | any other exception or limitation to Copyright and Similar Rights 385 | that applies to Your use of the Licensed Material. 386 | 387 | e. Licensed Material means the artistic or literary work, database, 388 | or other material to which the Licensor applied this Public 389 | License. 390 | 391 | f. Licensed Rights means the rights granted to You subject to the 392 | terms and conditions of this Public License, which are limited to 393 | all Copyright and Similar Rights that apply to Your use of the 394 | Licensed Material and that the Licensor has authority to license. 395 | 396 | g. Licensor means the individual(s) or entity(ies) granting rights 397 | under this Public License. 398 | 399 | h. Share means to provide material to the public by any means or 400 | process that requires permission under the Licensed Rights, such 401 | as reproduction, public display, public performance, distribution, 402 | dissemination, communication, or importation, and to make material 403 | available to the public including in ways that members of the 404 | public may access the material from a place and at a time 405 | individually chosen by them. 406 | 407 | i. Sui Generis Database Rights means rights other than copyright 408 | resulting from Directive 96/9/EC of the European Parliament and of 409 | the Council of 11 March 1996 on the legal protection of databases, 410 | as amended and/or succeeded, as well as other essentially 411 | equivalent rights anywhere in the world. 412 | 413 | j. You means the individual or entity exercising the Licensed Rights 414 | under this Public License. Your has a corresponding meaning. 415 | 416 | 417 | Section 2 -- Scope. 418 | 419 | a. License grant. 420 | 421 | 1. Subject to the terms and conditions of this Public License, 422 | the Licensor hereby grants You a worldwide, royalty-free, 423 | non-sublicensable, non-exclusive, irrevocable license to 424 | exercise the Licensed Rights in the Licensed Material to: 425 | 426 | a. reproduce and Share the Licensed Material, in whole or 427 | in part; and 428 | 429 | b. produce and reproduce, but not Share, Adapted Material. 430 | 431 | 2. Exceptions and Limitations. For the avoidance of doubt, where 432 | Exceptions and Limitations apply to Your use, this Public 433 | License does not apply, and You do not need to comply with 434 | its terms and conditions. 435 | 436 | 3. Term. The term of this Public License is specified in Section 437 | 6(a). 438 | 439 | 4. Media and formats; technical modifications allowed. The 440 | Licensor authorizes You to exercise the Licensed Rights in 441 | all media and formats whether now known or hereafter created, 442 | and to make technical modifications necessary to do so. The 443 | Licensor waives and/or agrees not to assert any right or 444 | authority to forbid You from making technical modifications 445 | necessary to exercise the Licensed Rights, including 446 | technical modifications necessary to circumvent Effective 447 | Technological Measures. For purposes of this Public License, 448 | simply making modifications authorized by this Section 2(a) 449 | (4) never produces Adapted Material. 450 | 451 | 5. Downstream recipients. 452 | 453 | a. Offer from the Licensor -- Licensed Material. Every 454 | recipient of the Licensed Material automatically 455 | receives an offer from the Licensor to exercise the 456 | Licensed Rights under the terms and conditions of this 457 | Public License. 458 | 459 | b. No downstream restrictions. You may not offer or impose 460 | any additional or different terms or conditions on, or 461 | apply any Effective Technological Measures to, the 462 | Licensed Material if doing so restricts exercise of the 463 | Licensed Rights by any recipient of the Licensed 464 | Material. 465 | 466 | 6. No endorsement. Nothing in this Public License constitutes or 467 | may be construed as permission to assert or imply that You 468 | are, or that Your use of the Licensed Material is, connected 469 | with, or sponsored, endorsed, or granted official status by, 470 | the Licensor or others designated to receive attribution as 471 | provided in Section 3(a)(1)(A)(i). 472 | 473 | b. Other rights. 474 | 475 | 1. Moral rights, such as the right of integrity, are not 476 | licensed under this Public License, nor are publicity, 477 | privacy, and/or other similar personality rights; however, to 478 | the extent possible, the Licensor waives and/or agrees not to 479 | assert any such rights held by the Licensor to the limited 480 | extent necessary to allow You to exercise the Licensed 481 | Rights, but not otherwise. 482 | 483 | 2. Patent and trademark rights are not licensed under this 484 | Public License. 485 | 486 | 3. To the extent possible, the Licensor waives any right to 487 | collect royalties from You for the exercise of the Licensed 488 | Rights, whether directly or through a collecting society 489 | under any voluntary or waivable statutory or compulsory 490 | licensing scheme. In all other cases the Licensor expressly 491 | reserves any right to collect such royalties. 492 | 493 | 494 | Section 3 -- License Conditions. 495 | 496 | Your exercise of the Licensed Rights is expressly made subject to the 497 | following conditions. 498 | 499 | a. Attribution. 500 | 501 | 1. If You Share the Licensed Material, You must: 502 | 503 | a. retain the following if it is supplied by the Licensor 504 | with the Licensed Material: 505 | 506 | i. identification of the creator(s) of the Licensed 507 | Material and any others designated to receive 508 | attribution, in any reasonable manner requested by 509 | the Licensor (including by pseudonym if 510 | designated); 511 | 512 | ii. a copyright notice; 513 | 514 | iii. a notice that refers to this Public License; 515 | 516 | iv. a notice that refers to the disclaimer of 517 | warranties; 518 | 519 | v. a URI or hyperlink to the Licensed Material to the 520 | extent reasonably practicable; 521 | 522 | b. indicate if You modified the Licensed Material and 523 | retain an indication of any previous modifications; and 524 | 525 | c. indicate the Licensed Material is licensed under this 526 | Public License, and include the text of, or the URI or 527 | hyperlink to, this Public License. 528 | 529 | For the avoidance of doubt, You do not have permission under 530 | this Public License to Share Adapted Material. 531 | 532 | 2. You may satisfy the conditions in Section 3(a)(1) in any 533 | reasonable manner based on the medium, means, and context in 534 | which You Share the Licensed Material. For example, it may be 535 | reasonable to satisfy the conditions by providing a URI or 536 | hyperlink to a resource that includes the required 537 | information. 538 | 539 | 3. If requested by the Licensor, You must remove any of the 540 | information required by Section 3(a)(1)(A) to the extent 541 | reasonably practicable. 542 | 543 | 544 | Section 4 -- Sui Generis Database Rights. 545 | 546 | Where the Licensed Rights include Sui Generis Database Rights that 547 | apply to Your use of the Licensed Material: 548 | 549 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right 550 | to extract, reuse, reproduce, and Share all or a substantial 551 | portion of the contents of the database, provided You do not Share 552 | Adapted Material; 553 | b. if You include all or a substantial portion of the database 554 | contents in a database in which You have Sui Generis Database 555 | Rights, then the database in which You have Sui Generis Database 556 | Rights (but not its individual contents) is Adapted Material; and 557 | c. You must comply with the conditions in Section 3(a) if You Share 558 | all or a substantial portion of the contents of the database. 559 | 560 | For the avoidance of doubt, this Section 4 supplements and does not 561 | replace Your obligations under this Public License where the Licensed 562 | Rights include other Copyright and Similar Rights. 563 | 564 | 565 | Section 5 -- Disclaimer of Warranties and Limitation of Liability. 566 | 567 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE 568 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS 569 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF 570 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, 571 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, 572 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR 573 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, 574 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT 575 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT 576 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. 577 | 578 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE 579 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, 580 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, 581 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, 582 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR 583 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN 584 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR 585 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR 586 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. 587 | 588 | c. The disclaimer of warranties and limitation of liability provided 589 | above shall be interpreted in a manner that, to the extent 590 | possible, most closely approximates an absolute disclaimer and 591 | waiver of all liability. 592 | 593 | 594 | Section 6 -- Term and Termination. 595 | 596 | a. This Public License applies for the term of the Copyright and 597 | Similar Rights licensed here. However, if You fail to comply with 598 | this Public License, then Your rights under this Public License 599 | terminate automatically. 600 | 601 | b. Where Your right to use the Licensed Material has terminated under 602 | Section 6(a), it reinstates: 603 | 604 | 1. automatically as of the date the violation is cured, provided 605 | it is cured within 30 days of Your discovery of the 606 | violation; or 607 | 608 | 2. upon express reinstatement by the Licensor. 609 | 610 | For the avoidance of doubt, this Section 6(b) does not affect any 611 | right the Licensor may have to seek remedies for Your violations 612 | of this Public License. 613 | 614 | c. For the avoidance of doubt, the Licensor may also offer the 615 | Licensed Material under separate terms or conditions or stop 616 | distributing the Licensed Material at any time; however, doing so 617 | will not terminate this Public License. 618 | 619 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public 620 | License. 621 | 622 | 623 | Section 7 -- Other Terms and Conditions. 624 | 625 | a. The Licensor shall not be bound by any additional or different 626 | terms or conditions communicated by You unless expressly agreed. 627 | 628 | b. Any arrangements, understandings, or agreements regarding the 629 | Licensed Material not stated herein are separate from and 630 | independent of the terms and conditions of this Public License. 631 | 632 | 633 | Section 8 -- Interpretation. 634 | 635 | a. For the avoidance of doubt, this Public License does not, and 636 | shall not be interpreted to, reduce, limit, restrict, or impose 637 | conditions on any use of the Licensed Material that could lawfully 638 | be made without permission under this Public License. 639 | 640 | b. To the extent possible, if any provision of this Public License is 641 | deemed unenforceable, it shall be automatically reformed to the 642 | minimum extent necessary to make it enforceable. If the provision 643 | cannot be reformed, it shall be severed from this Public License 644 | without affecting the enforceability of the remaining terms and 645 | conditions. 646 | 647 | c. No term or condition of this Public License will be waived and no 648 | failure to comply consented to unless expressly agreed to by the 649 | Licensor. 650 | 651 | d. Nothing in this Public License constitutes or may be interpreted 652 | as a limitation upon, or waiver of, any privileges and immunities 653 | that apply to the Licensor or You, including from the legal 654 | processes of any jurisdiction or authority. 655 | 656 | ======================================================================= 657 | 658 | Creative Commons is not a party to its public 659 | licenses. Notwithstanding, Creative Commons may elect to apply one of 660 | its public licenses to material it publishes and in those instances 661 | will be considered the “Licensor.” The text of the Creative Commons 662 | public licenses is dedicated to the public domain under the CC0 Public 663 | Domain Dedication. Except for the limited purpose of indicating that 664 | material is shared under a Creative Commons public license or as 665 | otherwise permitted by the Creative Commons policies published at 666 | creativecommons.org/policies, Creative Commons does not authorize the 667 | use of the trademark "Creative Commons" or any other trademark or logo 668 | of Creative Commons without its prior written consent including, 669 | without limitation, in connection with any unauthorized modifications 670 | to any of its public licenses or any other arrangements, 671 | understandings, or agreements concerning use of licensed material. For 672 | the avoidance of doubt, this paragraph does not form part of the 673 | public licenses. 674 | 675 | Creative Commons may be contacted at creativecommons.org. 676 | --------------------------------------------------------------------------------