Settings-as-code

2 minute read

Settings-as-code (SasC) is a practice of maintaining settings in source code management (SCM) repository files. By managing settings files with application code, you benefit from managing and versioning your digital assets together. For CloudBees Release Orchestration SaaS, these digital assets include your application, settings and pipelines.

CloudBees Release Orchestration SaaS supports SasC for the following settings:

  • Groups and pipelines

  • SCM tools, including GitHub, Bitbucket, Gitlab, Subversion, Perforce, and AWS CodeCommit

  • Continuous integration tools

  • Environments without endpoints, or environments with AWS ECS endpoints

You can manually upload a SasC file, or configure a GitHub repository to synchronize settings with updates.

Manually uploading SasC files

The supported file formats for SasC in CloudBees Release Orchestration SaaS are YAML and JSON.

To manually upload a SasC file:

  1. From the CloudBees Release Orchestration SaaS Home page, select Admin  Settings.

  2. Select Settings as Code on the left pane.

    ManualUpload
  3. Select Manual Upload.

  4. Select DOWNLOAD TEMPLATE.

  5. Follow the instruction comments in the template file to create your SasC file.

The template file contains the following key configuration sections:
  • Jenkins

  • Groups and pipelines

  • Environment and deployment endpoints

  • SCM tools

  1. Save your file locally.

  2. Select Upload File.

  3. Select your SasC file from the file explorer to upload.

Your SasC file is uploaded, and the settings are created in the appropriate settings category, where they are also displayed. For example, an uploaded Jenkins SasC file updates Jenkins settings in Continous Integration (CI).

Uploading SasC files with Git

The supported file formats for SasC in CloudBees Release Orchestration SaaS are YAML and JSON.

Before you configure a GitHub repository for SasC files, set up your GitHub branch as follows:

  • The repository branch must have a .releaseiq folder in the root path with settings and pipelines as subfolders. All folder names are case-sensitive.

  • The settings subfolder contains all SasC files.

  • The pipelines subfolder contains all pipeline-as-code files.

  • Any updates to pipeline definition files in the repository, once configured, are automatically synced to create or update the corresponding settings and pipelines in Pipeline Composer.

To upload a SasC file with Git:

  1. From the CloudBees Release Orchestration SaaS Home page, select Admin  Settings.

  2. Select Settings as Code on the left pane.

  3. Select Git Upload.

    GitUpload
  4. Select DOWNLOAD TEMPLATE.

  5. Follow the instruction comments in the template file to create your SasC file.

  6. Save your file locally.

  7. Select Upload File.

  8. Select your SasC file from the file explorer to upload.

Your SasC file is uploaded, and the settings are created and displayed in Admin  Settings  Source Control Management (SCM).