SCM Config Option

SCM Config Option is used to represent codebase-related config option.

Config Options

OptionDescriptionNote
ownerthe owner of repoThis option can’t be configured at the same time with org
orgthe organization of repoThis option can’t be configured at the same time with owner
scmTypethe repo typeSupport Gitlab/Github for now
namethe repo name
baseURLthe gitlab url addressIf you use Gitlab for SCM, you should set this field
urlthe repo url addressIf you configure this option, then org, owner, scmType, name field can be empty
tokenthe repo api token
branchthe repo branchIf this option is empty, For Github, branch will be main, for Gitlab, branch will be master

Notes:

You need to get the token of the repo first.

  • For Github Repo, you can refer to this doc about how to get Github token.
  • For gitlab.com (instead of a self-hosted GitLab), click here to create a token for DevStream (the scope contains API only).
  • For self-hosted GitLab, refer to the official doc here for more info.

Example

Github SCM Config With URL

YAML

  1. scm:
  2. url: https://github.com/devstream-io/dtm-repo-scaffolding-python-flask.git
  3. branch: main
  4. token: TEST_TOKEN

Github SCM Config Without URL

YAML

  1. scm:
  2. name: dtm-repo-scaffolding-python-flask
  3. scmType: github
  4. org: devstream-io
  5. branch: main
  6. token: TEST_TOKEN

Gitlab SCM Config With URL

YAML

  1. scm:
  2. url: https://test.gitlab.com/testUser/dtm-repo-scaffolding-python-flask.git
  3. branch: master
  4. token: TEST_TOKEN

Gitlab SCM Config With URL

YAML

  1. scm:
  2. name: dtm-repo-scaffolding-python-flask
  3. owner: testUser
  4. baseURL: https://test.gitlab.com
  5. branch: master
  6. token: TEST_TOKEN
  7. scmType: gitlab