Skip to content

Commit e6bc375

Browse files
committed
Documentation
1 parent 599fdcb commit e6bc375

File tree

3 files changed

+106
-47
lines changed

3 files changed

+106
-47
lines changed

README.adoc

Lines changed: 40 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,59 @@
1+
= HACBS JVM Build Service
2+
:icons: font
3+
:toc:
4+
:toclevels: 5
5+
:toc-title:
6+
17
:img-build-status: https://codecov.io/gh/redhat-appstudio/jvm-build-service/branch/main/graph/badge.svg
28
:uri-build-status: https://codecov.io/gh/redhat-appstudio/jvm-build-service
39
image:{img-build-status}[Build Status Badge,link={uri-build-status}]
410

5-
== HACBS JVM Build Service
611

712
This repository contains components used to deploy the HACBS JVM build service.
813

9-
See each component's directory for specific documentation.
10-
11-
12-
=== Testing
13-
14-
==== Running Option Tests Against PRs
15-
16-
You can trigger the following optional tests on a pull request:
17-
18-
Apicurio Registry::
19-
20-
`/test jvm-build-service-in-repo-apicurio-e2e`
14+
See each component's directory for specific documentation. There is further documentation available within the docs
15+
directory.
2116

22-
Self Build of the JVM Build Service::
17+
== Requirements
2318

24-
`/test jvm-build-service-in-repo-jbs-e2e`
19+
* OpenShift/Kubernetes cluster
20+
* link:https://kubernetes.io/docs/tasks/tools/#kubectl[kubectl] CLI tool
21+
* link:https://kubectl.docs.kubernetes.io/installation/kustomize/binaries[kustomize] CLI tool
2522

26-
RHTAP Quickstarts::
23+
== Installation
2724

28-
`/test jvm-build-service-in-repo-quickstarts-e2e`
25+
The following environment variables are configurable and may be set by the user prior to deploying this depending upon which features are to be enabled.
2926

30-
WildFly::
27+
|=======================
28+
| AWS_ACCESS_KEY_ID | AWS Access Key used for S3 and CodeArtfact Access
29+
| AWS_PROFILE | AWS Region used for CodeArtifact deployment
30+
| AWS_SECRET_ACCESS_KEY | AWS Secret Access Key used for S3 and CodeArtfact Access
31+
| GIT_DEPLOY_IDENTITY | Username/organisation name for the Git service
32+
| GIT_DEPLOY_TOKEN | Authentication token
33+
| GIT_DEPLOY_URL | The URL for the Git service (GitHub/GitLab are supported) to archive the sources
34+
| MAVEN_PASSWORD | Password for the Maven repository
35+
| MAVEN_REPOSITORY | The URL for the external Maven repository to deploy to
36+
| MAVEN_USERNAME | Username for the Maven repository
37+
| QUAY_USERNAME | Quay.io registry to use
38+
|=======================
3139

32-
`/test jvm-build-service-in-repo-wildfly-e2e`
40+
The `$HOME/.docker/config.json` must contain a suitable authentication token to Quay.io. In the Account
41+
section of Quay you should see an options to generate an encrypted CLI password. Select this option and create a `~/
42+
.docker/config.json` by following the prompts. It is recommended to configure this secret as:
3343

34-
==== Test JVM Build Service on an OpenShift cluster
44+
```
45+
export JBS_BUILD_IMAGE_SECRET=$(cat $HOME/.docker/config.json | base64 -w 0)
46+
```
3547

36-
The OpenShift E2E test is programmed to run a test with following steps:
48+
To support private repositories set:
49+
```
50+
export JBS_GIT_CREDENTIALS='https://$GITHUB_E2E_ORGANIZATION:[email protected]'
51+
```
52+
By default, the JBS images are pulled from the redhat-appstudio organization. This may be overridden by setting `JBS_QUAY_IMAGE`.
3753

38-
. Create a new project in targeted OpenShift cluster and run the build pipeline which contains a link:./deploy/base/maven-v0.2.yaml[Maven] task from this repo to build the link:./hack/examples/run-e2e-shaded-app.yaml[simple java test project]
39-
. Make sure the pipeline succeeds and all related artifactbuilds and dependecybuilds (triggered after pipeline completion) finish successfully
40-
. Check that all "contaminated" builds are resolved
41-
. Verify that triggering a second build accesses dependencies that are cached from a previous build
42-
. Verify that the correct JDK version is identified in dependencybuilds
43-
. Check that maven/gradle logs/sources are found in rebuilt artifacts
54+
The 'worker' namespace (`test-jvm-namespace`) may be customized by setting `JBS_WORKER_NAMESPACE`.
4455

45-
Before running the test, you need to export couple of env vars that reference container images for the operator, cache and reqprocessor. Some existing images can be found at link:https://quay.io/organization/redhat-appstudio[redhat-appstudio quay.io org] (search for keyword "jvm")
4656

47-
Also you need to specify your quay.io username that will be used for pushing rebuilt dependencies in a format: `quay.io/$QUAY_USERNAME/test-images`. Make sure the repo "test-images" exists in your account and is publicly available.
57+
== Documentation
4858

49-
[source,bash]
50-
----
51-
export QUAY_USERNAME=<your-quay-io-account-username>
52-
export JVM_BUILD_SERVICE_IMAGE=
53-
export JVM_BUILD_SERVICE_CACHE_IMAGE=
54-
export JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE=
55-
./deploy/openshift-ci.sh
56-
make openshift-e2e
57-
----
59+
See link:docs/index.adoc[User Guide]

docs/development.adoc

Lines changed: 54 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
= Development
2+
:icons: font
3+
:toc:
4+
:toclevels: 5
5+
:toc-title:
26

37
== Requirements
48

59
* Kubernetes cluster (link:https://kubernetes.io/docs/tasks/tools/#minikube[minikube] is fine!)
6-
* link:https://kubernetes.io/docs/tasks/tools/#kubectl[kubectl] CLI tool
710
* link:https://tekton.dev/docs/cli/[Tekton CLI]
811

912
== Local Development
@@ -12,14 +15,7 @@ The repository has been setup to make it easy to test your changes locally with
1215

1316
NOTE: You need to be logged in to registry.redhat.com to be able to pull some required images. If you are using minikube you can do this via `docker login registry.redhat.io`. If you are running against an openshift cluster, the `pipeline` SA and all TaskRuns/PipelineRuns running under the `pipeline` SA have the credentials to `registry.redhat.io` available via the cluster install pull secret.
1417

15-
First set the QUAY_USERNAME env variable to your quay username:
16-
17-
----
18-
export QUAY_USERNAME=<<your username>>
19-
----
20-
21-
You will also need to have quay.io authentication configured. In the Account
22-
section of Quay you should see an options to generate an encrypted CLI password. Select this option and create a `~/.docker/config.json` by following the prompts.
18+
Ensure the environment variables (especially `QUAY_USERNAME`) have been configured as per the installation instructions.
2319

2420
Now run the following command to build the relevant images and deploy them to kube:
2521

@@ -110,3 +106,52 @@ Config changes can be made in the deploy directly and applied by running:
110106
./deployment/development.sh
111107
----
112108

109+
110+
== Testing
111+
112+
=== Running Option Tests Against PRs
113+
114+
You can trigger the following optional tests on a pull request:
115+
116+
Apicurio Registry::
117+
118+
`/test jvm-build-service-in-repo-apicurio-e2e`
119+
120+
Self Build of the JVM Build Service::
121+
122+
`/test jvm-build-service-in-repo-jbs-e2e`
123+
124+
RHTAP Quickstarts::
125+
126+
`/test jvm-build-service-in-repo-quickstarts-e2e`
127+
128+
WildFly::
129+
130+
`/test jvm-build-service-in-repo-wildfly-e2e`
131+
132+
=== Test JVM Build Service on an OpenShift cluster
133+
134+
The OpenShift E2E test is programmed to run a test with following steps:
135+
136+
. Create a new project in targeted OpenShift cluster and run the build pipeline which contains a link:
137+
./hack/examples/maven-v0.2.yaml[Maven] task from this repo to build the link:./hack/examples/run-e2e-shaded-app
138+
.yaml[simple java test project]
139+
. Make sure the pipeline succeeds and all related artifactbuilds and dependecybuilds (triggered after pipeline completion) finish successfully
140+
. Check that all "contaminated" builds are resolved
141+
. Verify that triggering a second build accesses dependencies that are cached from a previous build
142+
. Verify that the correct JDK version is identified in dependencybuilds
143+
. Check that maven/gradle logs/sources are found in rebuilt artifacts
144+
145+
Before running the test, you need to export couple of env vars that reference container images for the operator, cache and reqprocessor. Some existing images can be found at link:https://quay.io/organization/redhat-appstudio[redhat-appstudio quay.io org] (search for keyword "jvm")
146+
147+
Also you need to specify your quay.io username that will be used for pushing rebuilt dependencies in a format: `quay.io/$QUAY_USERNAME/test-images`. Make sure the repo "test-images" exists in your account and is publicly available.
148+
149+
[source,bash]
150+
----
151+
export QUAY_USERNAME=<your-quay-io-account-username>
152+
export JVM_BUILD_SERVICE_IMAGE=
153+
export JVM_BUILD_SERVICE_CACHE_IMAGE=
154+
export JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE=
155+
./deploy/openshift-ci.sh
156+
make openshift-e2e
157+
----

docs/index.adoc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
= Documentation
2+
:icons: font
3+
:toc:
4+
:toclevels: 5
5+
:toc-title:
6+
7+
* link:users.adoc[User Guide]
8+
* link:development.adoc[Developing]
9+
* link:build-recipe-repo.adoc[Build Recipes]
10+
* Cache
11+
- link:cache/configuration.adoc[Configuration]
12+
- link:cache/development.adoc[Development]

0 commit comments

Comments
 (0)