-
Notifications
You must be signed in to change notification settings - Fork 10
Application Configuration Options
At present, there are a few ways you can customize the application.
The front end of the application can be customized using environment variables.
ENVIRONMENT VARIABLE | Purpose | Optional? | Example Value |
---|---|---|---|
NEXT_PUBLIC_BES_BACKEND_URL |
This configures the http/https graphql API endpoint that the frontend will use to fetch data from | No | http://localhost:8081 |
NEXT_PUBLIC_BES_GRPC_BACKEND_URL |
This configures the GRPC(s) endpoint that the frontend will use | No | grpc://localhost:8082 |
NEXT_PUBLIC_BROWSER_URL |
A link to your buildbarn-browser component URL | Yes | https://build.exampleco.io |
NEXT_PUBLIC_COMPANY_NAME |
The name displayed in the toolbar and on the main landing page for you company | Yes | "Example Co" |
NEXT_PUBLIC_COMPANY_SLACK_CHANNEL_NAME |
The name for the slack channel link to your internal slack channel | Yes | ExampleCoBuildTeamChannel |
NEXT_PUBLIC_COMPANY_SLACK_CHANNEL_URL |
The URL to your slack channel in a similar format to https://{slack_domain}.enterprise.slack.com/archives/C{channel_id} | Yes | https://exampleco.enterprise.slack.com/archives/CXX |
NEXT_PUBLIC_GITHUB_URL |
The URL to your Github instance | Yes | https://github.com |
Note
The easiest way to inject these into your frontend container is via a .env file, but you can always use other mechanisms to manage these.
Presently you can configure the backend with a combination of command line flags and .jsonnet file.
Command line flags allow you to pass some configuration options to the bbportal backend executable at run time. If you're deploying in kube, you pass these as args to the container, or if you're debugging locally w/vscode, you might include them in your launch.json file. You can also pass them...you know...on the command line...
Option | Purpose | Example | Default Value |
---|---|---|---|
config-file | Path to load the jsonnet file | /app/config.jsonnet |
N/A |
datasource-driver | The datasource driver for your application | No | sqlite3 |
datasource-url | database connection string | postgresql://postgres_user:postgres_pass@bbportal.postgres.exampleco.io:5432/bbportal |
file:buildportal.db?_journal=WAL&_fk=1 |
blob-archive-folder | Where blobs will be stored on the disk | /data/blobs | ./blob-archive/ |
You can also configure some options for the bbportal backend using a jsonnet file. This is for things such as authentication, etc. I'm not going to document all of these. You can refer to the buildbarn documentation. Below is a simple sample.
{
httpServers: [{
listenAddresses: [':8081'],
authenticationPolicy: { allow: {} },
}],
grpcServers: [{
listenAddresses: [':8082'],
authenticationPolicy: { allow: {} },
maximumReceivedMessageSizeBytes: 10*1024*1024
}],
}
Some backend configuration options come from environment variables provided at run time. Currently some of these variables will be grabbed automatically from Github CI. We may support other source control systems in the future if there is a PR :) The Automatic column refers to values pulled from github ci runner environments. If you're using another CI system and just want to uptake this functionality you can always inject these environment variables into your CI pipeline.
ENVIRONMENT VARIABLE | Purpose | Automatic? | Example |
---|---|---|---|
BUILD_URL |
Group invocations together into a build | No | ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
BB_PORTAL_IS_CI_WORKER |
is this worker a CI worker | No | TRUE |
CI |
Is this worker a CI worker? | Yes | true |
GITHUB_WORKFLOW + GITHUB_JOB |
Step Label for a build | Yes | PRCI+Path-specific-build |
BB_PORTAL_STEP_LABEL |
Overrides GITHUB_WORKFLOW + GITHUB_JOB | No | My Custom Step Label |
BB_PORTAL_SKIP_SAVE_TARGETS |
Skips saving target data | No | TRUE |
BB_PORTAL_ENRICH_TARGET_DATA |
Saves even more target data | No | TRUE |
GITHUB_REPOSITORY |
The repo | Yes | my-repo-name |
GITHUB_HEAD_REF |
Source Control Branch | Yes | my-dev-branch |
GITHUB_SHA |
Commit SHA | Yes | fb20e11a63f4c1a7c215bc86f200ca9aa1aebe44 |
GITHUB_ACTOR |
Commit Author, links back to github profile | Yes | trey-ivy |
GITHUB_RUN_ID |
Action Run ID | Yes | 12345 |
GITHUB_WORKFLOW |
Workflow | Yes | PRCI |
GITUB_ACTION |
Source Control Action | Yes | __run_3 |
GITHUB_JOB |
Source Control Job | Yes | Path-specific-build |
RUNNER_ARCH |
Source Control Runner Architecture | Yes | av-medium-metal-2-zj7w5-0 |
RUNNER_NAME |
Source Control Runner Name. The name of the runner where the invocation was launched | Yes | exampleco-ci-runner-01 |
HOSTNAME |
The hostname variable overrides the RUNNER_NAME variable if supplied | No | dc12-rack5-node1 |
BB_PORTAL_HOSTNAME |
overrides HOSTNAME if supplied | No | my-runner-name |
RUNNER_OS |
The operating system of the runner | Yes | Linux |
GITHUB_EVENT_NAME |
Source Control Event Name | Yes | pull_request |