This repository contains a GitHub App powered by Quarkus GitHub App.
This Perf Bot GitHub App aims to make it easier to test performance earlier, detect regressions in development and CI, and reduce late-stage surprises or production issues.
Check out the use cases doc for more information on the implemented interactions.
TODO: provide some usage examples
TODO: list all available commands
For all the local environment credentials that are used to interact with the environment itself, please refer to the credentials section.
- The perf bot is already installed as GitHub in whatever repository you want (lampajr/webhook-umb-example in this case)
- You have smee.io channel with which the GitHub app was configured
In the deploy folder there are some automation you can use to set up the local environment.
cd deploy && ./start.shAfter that, we can start up the Perf Bot:
mvn clean install -DskipTests -DskipITs -Dquarkus.container-image.build=true
podman run \
--replace --name local.perf-bot --env-file ".env" \
--network local_default \
-v /tmp/jenkins-truststore.jks:/tmp/jenkins-truststore.jks:rw,Z \
-e QUARKUS_GITHUB_APP_PRIVATE_KEY=$QUARKUS_GITHUB_APP_PRIVATE_KEY \
-p 8081:8081 localhost/alampare/perf-bot:0.0.1-SNAPSHOTWhere $QUARKUS_GITHUB_APP_PRIVATE_KEY is the private key of the installed GitHub app and .env file contains
required GitHub app configuration, see https://docs.quarkiverse.io/quarkus-github-app/dev/create-github-app.html#_initialize_the_configuration
for more information.
If you want to override the Java configuration simply add
-e JAVA_OPTS_APPEND="-Dproxy.job.runner.jenkins.user=admin -Dproxy.job.runner.jenkins.apiKey=<JENKINS_API_KEY> -Dproxy.job.runner.jenkins.url=http://local.jenkins:8080 -Dproxy.datastore.horreum.url=http://local.horreum-app:8080"
The initialization is performed as part of the local env set up, so no further manual actions are required at this step.
The only thing to do is to update the repo-config.json horreumKey created as part of
the local env startup. Use ./scripts/fetch-keys.sh to get it.
After that you can load the project/repo configuration in perf-bot by using:
./scripts/setup_config.sh| Resource | Value | Note |
|---|---|---|
| Jenkins User | admin | |
| Jenkins Pwd | secret | |
| Jenkins API Key | 11c513a545425a50c202367deefad6ed33 | |
| Horreum User | horreum.bootstrap | |
| Horreum Pwd | secret | |
| Horreum API Key | <created at runtime> | This can be fetched using ./scripts/fetch-keys.sh |
| Keycloak Admin | admin | |
| Keycloak Admin Pwd | secret |
One Hydra service account is required to receive UMB messages. UMB broker is configured with AMQP_HOST and AMQP_PORT properties. AMPQ client should use that account's username and password (AMQP_USERNAME and AMQP_PASSWORD secrets). Besides that, the TLS key and certificate are also required. Save those as .certs/service-account.key and .certs/service-account.crt respectively. Most likely the key is encrypted with a password, which is not supported by Vert.x at the moment. It can be decrypted with the command openssl rsa -in .certs/service-account.key -out service=.certs/account-unencrypted.key.