Skip to main content

Source Code Integration

Source Code Integration allows you to copy source code from external repositories into Tangram Pro™ generated container images. For more information about containers see Creating Containers.

After an integration is setup, you control which repository to pull from within Projects in the Build mode. For more information see Build Images using a Repository.

Add a Source Code Hosting Service

You can manage multiple Source Code integrations in your User Settings (for personal use) or within your Teams (for shared access with your team members), and connect them to components in your projects.

Source Code

  1. Go to User Settings or Teams:
    • To add an integration for personal projects: open User Settings and go to Source Control
    • To add an integration for team projects: open Teams, select a Team and go to Source Control
  2. Click Add Hosting Service
  3. Select a Hosting Service. If an Enterprise option is selected, you can enter a custom URL like https://gitlab.myorg.tech
  4. Click the Create a Personal Access Token link to generate a token within your GitLab or GitHub account
  5. Enter your username and token
note

Personal access token is the default integration method. You can also integrate using an OAuth App if needed. See instructions below.

Register an OAuth App in GitLab

  1. Log in to your GitLab account
  2. Add a New Application (Click on your profile in the top right corner, and go to Preferences > Applications)
    • Enter a name
    • Copy the Redirect URI from Tangram Pro and paste it in the Redirect URI field in GitLab
    • Select the api scope
  3. Click Save application
  4. Copy the Application ID from GitLab and paste it in the Application ID field in Tangram Pro
  5. Copy the Secret from GitLab and paste it in the Secret field in Tangram Pro
  6. Click Submit

You will be redirected to your GitLab account to authorize access

Register an OAuth App in GitHub

  1. Log in to your GitHub account
  2. Add a New OAuth App (Click on your profile in the top right corner, and go to Settings > Developer settings > OAuth Apps)
    • Enter a name
    • Copy the Homepage URL from Tangram Pro and paste it in the Homepage URL field in GitHub
    • Copy the Callback URL from Tangram Pro and paste it in the Authorization callback URL field in GitHub
  3. Click Register application
  4. Copy the Client ID from GitHub and paste it in the Client ID field in Tangram Pro
  5. Copy the Client Secret from GitHub and paste it in the Client Secret field in Tangram Pro
  6. Click Submit

You will be redirected to your GitHub account to authorize access

You can unlink OAuth App integrations by by clicking the Unlink button. This will remove authorization, but save the configuration.

Remove Source Code Host

You can remove your GitLab or GitHub account by clicking the Remove button. This will remove the configuration.

Using Source Code in Projects

Within projects, you can connect components to your GitLab and GitHub accounts and access their repositories. For more information see Build: Link a Code Repository.