-
Notifications
You must be signed in to change notification settings - Fork 40
How to add Gradle Instructions to guides
Right now, we only have support for Maven instructions in guides on openliberty.io. As part of issue https://github.com/OpenLiberty/openliberty.io/issues/1481, we are going to add support for building the guides using Gradle in addition to Maven. Guides will be updated one-by-one instead of all at once, so support for both the old format of guides and new format will be given.
Use the https://demo1-openlibertyio.mybluemix.net/ site to test gradle instructions initially and make a branch in the guide's repo named gradle
. The demo1 site will clone the gradle branch.
(let me know if there's a better way to specify this)
Add the guide permalink to the gradle prerequisite here: https://github.com/OpenLiberty/guides-common/blob/prod/guide_prereqs.json
Example:
{
"name": "Gradle",
"link": "https://gradle.org/install",
"guides": [
"kubernetes-intro"
],
"exclude": [
"maven-intro"
]
}
The first guide to convert was referenced from this comment: https://github.com/OpenLiberty/openliberty.io/issues/1481#issuecomment-640844509
As part of the conversion to Gradle support, we need to add both the Maven wrapper and the Gradle wrapper in the guide repo on Github. This will remove the need for the user to have Maven or Gradle installed on their machine.
[source, role="maven_section command hotspot"]
----
Run the integration tests against a cluster running with a host name of `localhost`:
mvnw failsafe:integration-test`
----
[source, role="gradle_section command hotspot file=0"]
----
Run the integration tests against a cluster running with a host name of `localhost`:
gradlew failsafe:integration-test
----
[role="maven_section command", subs="macros"]
----
Run the integration tests against a cluster running with a host name of `localhost`:
+++
<span class="hotspot">
mvnw failsafe:integration-test
</span>
+++
----
Notice the subs="macro" attribute is required and the triple '+' surrounding the hotspot.
[.tab_content.windows_section.mac_section]
--
[role="maven_section command", subs="macros"]
----
Run the integration tests against a cluster running with a host name of `localhost`:
+++
<span class="hotspot">
mvnw failsafe:integration-test
</span>
+++
----
[source, role="gradle_section command hotspot file=0"]
----
Run the integration tests against a cluster running with a host name of `localhost`:
gradlew failsafe:integration-test
----
--
[.tab_content.linux_section]
--
Run the integration tests with the IP address for Minikube:
[role='command']
----
`mvn failsafe:integration-test -Dsystem.service.root=$(minikube ip):31000 -Dinventory.service.root=$(minikube ip):32000
----
--
Example: