Document the environment variables which should be set

Fixes #6
This commit is contained in:
R. Tyler Croy 2018-01-03 12:13:26 -08:00
parent 44a4c354de
commit 5c3c709d43
No known key found for this signature in database
GPG Key ID: 1426C7DC3F51E16F
2 changed files with 19 additions and 2 deletions

View File

@ -18,3 +18,20 @@ image itself.
* GNU/Make
* Docker
* Docker Compose
=== Running locally
. `docker pull codevalet/master:latest`
. `docker run -p 8080:80 -e GITHUB_USER=yourgithubname codevalet/master:latest`
==== Environment Variables
* `GITHUB_USER` link:https://github.com/[GitHub] user name to grant
permissions
* `CLIENT_ID` (_optional_) custom GitHub OAuth Application Client ID
* `CLIENT_SECRET` (_optional_) custom GitHub OAuth Application Client Secret
* `MAX_AGENTS` (_optional_) maximum number of agents (defaults to 2)
* `AZURE_TENANT_ID` Azure tenant ID for agent provisioning
* `AZURE_SUBSCRIPTION_ID` Azure subscription ID for agent provisioning
* `AZURE_CLIENT_ID` Azure client ID for agent provisioning
* `AZURE_CLIENT_SECRET` Azure client secret for agent provisioning.

View File

@ -36,8 +36,8 @@ authorization.add(Jenkins.ADMINISTER, 'rtyler')
def realm = new GithubSecurityRealm('https://github.com', /* GitHub web URI */
'https://api.github.com', /* GitHub API URI */
System.env.get('CLIENT_ID') ?: 'f19661554c93f3b11cfe', /* OAuth Client ID */
System.env.get('CLIENT_SECRET') ?: '0672e14addb9f41dec11b5da1219017edfc82a58',/* OAuth Client Secret */
System.env.get('CLIENT_ID') ?: '4e76a9546e5633505ebe', /* OAuth Client ID */
System.env.get('CLIENT_SECRET') ?: '3231316e75b5dace3e8e41d8e5367256959c846a',/* OAuth Client Secret */
'read:public_repo,user:email' /* OAuth permission scopes */
)
Jenkins.instance.authorizationStrategy = authorization