Skip to content

Commit

Permalink
[issue-1351] - Fixing documentation sources
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiobrz committed Jan 18, 2025
1 parent b6cd599 commit b1bbb9b
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 37 deletions.
37 changes: 18 additions & 19 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
= Arquillian Cube
:asciidoctor-source: https://raw.githubusercontent.com/arquillian/arquillian-cube/main/docs
:numbered:
:sectlink:
:sectanchors:
Expand All @@ -20,40 +19,40 @@ To read complete documentation visit http://arquillian.org/arquillian-cube/
endif::generated-doc[]

ifdef::generated-doc[]
include::{asciidoctor-source}/what-is-this.adoc[]
include::what-is-this.adoc[]

include::{asciidoctor-source}/preliminaries.adoc[]
include::preliminaries.adoc[]

include::{asciidoctor-source}/example.adoc[]
include::example.adoc[]

include::{asciidoctor-source}/bom.adoc[]
include::bom.adoc[]

include::{asciidoctor-source}/configuration.adoc[]
include::configuration.adoc[]

include::{asciidoctor-source}/build-containers.adoc[]
include::build-containers.adoc[]

include::{asciidoctor-source}/compose.adoc[]
include::compose.adoc[]

include::{asciidoctor-source}/enrichers.adoc[]
include::enrichers.adoc[]

include::{asciidoctor-source}/parallel.adoc[]
include::parallel.adoc[]

include::{asciidoctor-source}/cop.adoc[]
include::cop.adoc[]

include::{asciidoctor-source}/requirements.adoc[]
include::requirements.adoc[]

include::{asciidoctor-source}/containerless.adoc[]
include::containerless.adoc[]

include::{asciidoctor-source}/drone.adoc[]
include::drone.adoc[]

include::{asciidoctor-source}/restassured.adoc[]
include::restassured.adoc[]

include::{asciidoctor-source}/reports.adoc[]
include::reports.adoc[]

include::{asciidoctor-source}/polyglot.adoc[]
include::polyglot.adoc[]

include::{asciidoctor-source}/kubernetes.adoc[]
include::kubernetes.adoc[]

include::{asciidoctor-source}/fabric8.adoc[]
include::fabric8.adoc[]

endif::generated-doc[]
6 changes: 3 additions & 3 deletions docs/bom.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Then include the individual modules as you see fit, by simply depending on the u

[source, xml, indent=0]
----
include::../pom.xml[tag=docker_starter_dependency]
include::{project_root_dir}/pom.xml[tag=docker_starter_dependency,role=include]
----

==== Arquillian Cube Docker Junit Rule
Expand Down Expand Up @@ -184,7 +184,7 @@ include::../pom.xml[tag=docker_starter_dependency]

[source, xml, indent=0]
----
include::../pom.xml[tag=kubernetes_starter_dependency]
include::{project_root_dir}/pom.xml[tag=kubernetes_starter_dependency]
----

==== Arquillian Cube Kubernetes Reporter
Expand Down Expand Up @@ -224,5 +224,5 @@ include::../pom.xml[tag=kubernetes_starter_dependency]

[source, xml, indent=0]
----
include::../pom.xml[tag=openshift_starter_dependency]
include::{project_root_dir}/pom.xml[tag=openshift_starter_dependency]
----
4 changes: 2 additions & 2 deletions docs/cop.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ To do use it you need to define the container object using `ContainerDsl` class
[source, java]
.RedisTest.java
----
include::../docker/ftest-docker-junit5/src/test/java/org/arquillian/cube/docker/junit5/RedisTest.java[tag=docs, indent=0]
include::{project_root_dir}/docker/ftest-docker-junit5/src/test/java/org/arquillian/cube/docker/junit5/RedisTest.java[tag=docs, indent=0]
----

If field is static, container is started and stopped just once. If not then it is started and stopped for each test method execution.
Expand Down Expand Up @@ -389,7 +389,7 @@ To do use it you need to define the network object using `NetowrkDsl` class and
[source, java]
.NetworkTest.java
----
include::../docker/ftest-docker-junit5/src/test/java/org/arquillian/cube/docker/junit5/NetworkTest.java[tag=docs, indent=0]
include::{project_root_dir}/docker/ftest-docker-junit5/src/test/java/org/arquillian/cube/docker/junit5/NetworkTest.java[tag=docs, indent=0]
----

If field is static, network is created and destroyed just once. If not then it is created and destroyed for each test method execution.
Expand Down
2 changes: 1 addition & 1 deletion docs/enrichers.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ or
[source, java]
.RouterURLEnricher.java
----
include::../openshift/ftest-openshift-resources-standalone/src/test/java/org/arquillian/cube/openshift/standalone/HelloWorldOpenShiftResourcesIT.java[tag=enricher_expression_resolver_example]
include::{project_root_dir}/openshift/ftest-openshift-resources-standalone/src/test/java/org/arquillian/cube/openshift/standalone/HelloWorldOpenShiftResourcesIT.java[tag=enricher_expression_resolver_example]
----

You can also use an additional annotation `@AwaitRoute` to wait until the route becomes available.
Expand Down
4 changes: 2 additions & 2 deletions docs/fabric8.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ However, there is way to build images and generate resources using the JKube `ku
`openshift-maven-plugin` as a part of test execution.
If you enable `cube.fmp.build` property, cube will build image and generate resources for you by running embedded maven
build as per options provided in `arquillian.xml` using either:
- `mvn package k8s:build k8s:resource -Dfabric8.namespace=${namespace_configured_for_cube}`, or
- `mvn package oc:build oc:resource -Dfabric8.namespace=${namespace_configured_for_cube}`
- `mvn package k8s:build k8s:resource -Dfabric8.namespace=$+{namespace_configured_for_cube}+`, or
- `mvn package oc:build oc:resource -Dfabric8.namespace=$+{namespace_configured_for_cube}+`

You can use the following configuration options with Kubernetes and OpenShift extension to enable
link:https://eclipse.dev/jkube/docs/kubernetes-maven-plugin/[JKube Kubernetes Maven Plugin] or
Expand Down
18 changes: 9 additions & 9 deletions docs/kubernetes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ The main modules of this extension are the following:

=== Setup

To use Kubernetes extension you need to register next dependency in your build tool: `org.arquillian.cube:arquillian-cube-kubernetes:${version}`.
To use Kubernetes extension you need to register next dependency in your build tool: `org.arquillian.cube:arquillian-cube-kubernetes:${project_version}`.

To use OpenShift extension you need to register next dependency in your build tool: `org.arquillian.cube:arquillian-cube-openshift:${version}`.
To use OpenShift extension you need to register next dependency in your build tool: `org.arquillian.cube:arquillian-cube-openshift:${project_version}`.

=== Configuring the extension

Expand Down Expand Up @@ -187,7 +187,7 @@ You can set a template location viaa a configuration parameter or using `@Templa
Here's a small example:
[source, java]
----
include::../openshift/ftest-template-standalone/src/test/java/org/arquillian/cube/openshift/standalone/HelloWorldTemplateIT.java[tag=openshift_template_example]
include::{project_root_dir}/openshift/ftest-template-standalone/src/test/java/org/arquillian/cube/openshift/standalone/HelloWorldTemplateIT.java[tag=openshift_template_example]
----

However, in `@Template`, url can be set using `url = https://git.io/vNRQm` or using
Expand Down Expand Up @@ -429,7 +429,7 @@ To control you need to inject into test the `org.arquillian.cube.kubernetes.impl

[source, java]
----
include::../kubernetes/ftest-kubernetes-assistant/src/test/java/org/arquillian/cube/kubernetes/assistant/HelloWorldKubernetesAssistantTest.java[tag=k8_assistant_example]
include::{project_root_dir}/kubernetes/ftest-kubernetes-assistant/src/test/java/org/arquillian/cube/kubernetes/assistant/HelloWorldKubernetesAssistantTest.java[tag=k8_assistant_example]
----
<1> Sets the application name where everything is deployed.
<2> You can get the url of the deployed service on the cluster.
Expand Down Expand Up @@ -625,7 +625,7 @@ Let's see how can you execute `oc` or `kubectl` commands as a part of your test.
[source, java]
.OpenshiftAndK8sExample.java
----
include::../openshift/ftest-oc-proxy/src/test/java/org/arquillian/cube/openshift/ftest/HelloWorldIT.java[tag=client_cli_execution]
include::{project_root_dir}/openshift/ftest-oc-proxy/src/test/java/org/arquillian/cube/openshift/ftest/HelloWorldIT.java[tag=client_cli_execution]
----

=== OpenShift Integration with Graphene
Expand Down Expand Up @@ -723,7 +723,7 @@ treated as is. For example:
[source, xml]
.arquillian.xml
----
include::../openshift/ftest-openshift-restassured/src/test/resources/arquillian.xml[tag=restassured_configuration]
include::{project_root_dir}/openshift/ftest-openshift-restassured/src/test/resources/arquillian.xml[tag=restassured_configuration]
----

As shown in the above snippet example (1), this integration will try to find an OpenShift route with name hello-world
Expand Down Expand Up @@ -754,7 +754,7 @@ to write your Arquillian Cube test as :
[source, java]
.HelloOpenShiftRestAssuredIT.java
----
include::../openshift/ftest-openshift-restassured/src/test/java/org/arquillian/openshift/restassured/HelloOpenShiftRestAssuredIT.java[tag=openshift_restassured_example]
include::{project_root_dir}/openshift/ftest-openshift-restassured/src/test/java/org/arquillian/openshift/restassured/HelloOpenShiftRestAssuredIT.java[tag=openshift_restassured_example]
----

Notice that no _ip_ nor _port_ configuration are required since everything is managed and configured by Cube.
Expand All @@ -775,7 +775,7 @@ To use Istio integration you just need to add next dependency.
[source, xml]
.pom.xml
----
include::../pom.xml[indent=0, tag=istio_dependency]
include::{project_root_dir}/pom.xml[indent=0, tag=istio_dependency]
----

TIP: Same dependency can be used for OpenShift
Expand Down Expand Up @@ -815,7 +815,7 @@ Notice that both annotations and assistant approaches can be mixed in the same t

[source, java]
----
include::../openshift/ftest-istio-openshift/src/test/java/org/arquillian/cube/openshift/standalone/ReviewsIT.java[indent=0, tag=istio_assistant]
include::{project_root_dir}/openshift/ftest-istio-openshift/src/test/java/org/arquillian/cube/openshift/standalone/ReviewsIT.java[indent=0, tag=istio_assistant]
----

The assistant provides you `deployIstioResources` and `undeployIstioResources` to deploy and undeploy Istio resources.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public void should_inject_kubernetes_assistant() {

@Test
public void should_apply_route_programmatically() throws IOException {
kubernetesAssistant.deployApplication("hello-world"); // <1>
kubernetesAssistant.deployApplication("hello-world"); // <1>
Optional<URL> serviceUrl = kubernetesAssistant.getServiceUrl("hello-world"); // <2>

given()
Expand Down

0 comments on commit b1bbb9b

Please sign in to comment.