Skip to main content

SCM

This component is responsible for integrating with a source control management (SCM) system based off the configuration provided.

The SCM system is used by Vela for both authentication and authorization of interactions performed within the application.

Authentication Workflow

Configuration

The following options are used to configure the component:

NameDescriptionRequiredDefaultEnvironment Variables
scm.addrfully qualified url for the SCMtruehttps://github.comSCM_ADDR,VELA_SCM_ADDR
scm.clientclient ID from the generated OAuth application on the SCMtrueN/ASCM_CLIENT,VELA_SCM_CLIENT
scm.contextmessage to set in commit status on the SCMtruecontinuous-integration/velaSCM_CONTEXT,VELA_SCM_CONTEXT
scm.drivertype of client to control and operate SCMtruegithubSCM_DRIVER,VELA_SCM_DRIVER
scm.scopespermission scopes to apply for the OAuth credentials on the SCMtrue[ repo, repo:status, user:email, read:user, read:org ]SCM_SCOPES,VELA_SCM_SCOPES
scm.secretclient secret from the generated OAuth application on the SCMtrueN/ASCM_SECRET,VELA_SCM_SECRET
scm.webhook.addrurl for webhooks on the SCM to send requests to (alternative/public address; defaults to $VELA_ADDR)falsethe address of the Vela server ($VELA_ADDR)SCM_WEBHOOK_ADDR,VELA_SCM_WEBHOOK_ADDR
vela-disable-webhook-validationdisables validation of inbound webhooks (ONLY for local development/testing)falsefalseVELA_DISABLE_WEBHOOK_VALIDATION
scm.app.idID for the SCM App integration (GitHub App)falseN/ASCM_APP_ID,VELA_SCM_APP_ID
scm.app.private-keybase64 encoded private key value for SCM App integration (one of this OR scm.app.private-key.path required when scm.app.id set)falseN/ASCM_APP_PRIVATE_KEY,VELA_SCM_APP_PRIVATE_KEY
scm.app.private-key.pathfilesystem path to private key for SCM App integration (alternative to scm.app.private-key)falseN/ASCM_APP_PRIVATE_KEY_PATH,VELA_SCM_APP_PRIVATE_KEY_PATH
scm.app.webhook-secretwebhook HMAC secret for SCM App integration (required when scm.app.id set and webhook validation enabled)falseN/ASCM_APP_WEBHOOK_SECRET,VELA_SCM_APP_WEBHOOK_SECRET
scm.app.permissionsallowed installation token permissions for SCM App integrationfalse[ contents:read, checks:write ]SCM_APP_PERMISSIONS,VELA_SCM_APP_PERMISSIONS
scm.repo.roles-mapmap of SCM repository roles -> Vela permissionsfalse{ admin: admin, write: write, maintain: write, triage: read, read: read }SCM_REPO_ROLES_MAP,VELA_SCM_REPO_ROLES_MAP
scm.org.roles-mapmap of SCM organization roles -> Vela permissionsfalse{ admin: admin, member: read }SCM_ORG_ROLES_MAP,VELA_SCM_ORG_ROLES_MAP
scm.team.roles-mapmap of SCM team roles -> Vela permissionsfalse{ maintainer: admin, member: read }SCM_TEAM_ROLES_MAP,VELA_SCM_TEAM_ROLES_MAP
note

For more information on these configuration options, please see the server reference.

Drivers

The following drivers are available to configure the component:

NameDescriptionDocumentation
githubuses a GitHub or GitHug Enterprise Server for the SCMhttps://github.com/about/

GitHub

From the GitHub official website:

GitHub is where the world builds software. Millions of developers and companies build, ship, and maintain their software on GitHub—the largest and most advanced development platform in the world.

The below configuration displays an example of creating a GitHub OAuth application:

OAuth Application

warning

The Homepage URL should match the VELA_ADDR environment variable provided to the server for clusters without a UI.

Otherwise, the Homepage URL should match the VELA_WEBUI_ADDR environment variable provided to the server.

The Authorization callback URL should contain the VELA_ADDR environment variable with a /authenticate suffix.

GitHub Enterprise Server

From the GitHub Enterprise official website:

GitHub Enterprise Server is your organization's private copy of GitHub contained within a virtual appliance, hosted on premises or in the cloud, that you configure and control.

The below configuration displays an example of creating a GitHub Enterprise Server OAuth application:

OAuth Application

warning

The Homepage URL should match the VELA_ADDR environment variable provided to the server for clusters without a UI.

Otherwise, the Homepage URL should match the VELA_WEBUI_ADDR environment variable provided to the server.

The Authorization callback URL should contain the VELA_ADDR environment variable with a /authenticate suffix.