|
| 1 | += HACBS JVM Build Service |
| 2 | +:icons: font |
| 3 | +:toc: |
| 4 | +:toclevels: 5 |
| 5 | +:toc-title: |
| 6 | + |
1 | 7 | :img-build-status: https://codecov.io/gh/redhat-appstudio/jvm-build-service/branch/main/graph/badge.svg
|
2 | 8 | :uri-build-status: https://codecov.io/gh/redhat-appstudio/jvm-build-service
|
3 | 9 | image:{img-build-status}[Build Status Badge,link={uri-build-status}]
|
4 | 10 |
|
5 |
| -== HACBS JVM Build Service |
6 | 11 |
|
7 | 12 | This repository contains components used to deploy the HACBS JVM build service.
|
8 | 13 |
|
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. |
21 | 16 |
|
22 |
| -Self Build of the JVM Build Service:: |
| 17 | +== Requirements |
23 | 18 |
|
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 |
25 | 22 |
|
26 |
| -RHTAP Quickstarts:: |
| 23 | +== Installation |
27 | 24 |
|
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. |
29 | 26 |
|
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 | +|======================= |
31 | 39 |
|
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: |
33 | 43 |
|
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 | +``` |
35 | 47 |
|
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`. |
37 | 53 |
|
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`. |
44 | 55 |
|
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") |
46 | 56 |
|
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 |
48 | 58 |
|
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] |
0 commit comments