Skip to main content
Version: Next

CI Profiles

What is a CI Profile?

A CI Profile is a unique version of your ci.yml configuration. When you create a new profile, Codesphere generates a corresponding configuration file in your project root (e.g., ci.dev.yml, ci.prod.yml).

This allows you to customize specific behaviors for different environments:

  • Build Steps: Run specific tests or build scripts for different stages.
  • Run Commands: Start your app with different flags (e.g., --debug vs. --prod).
  • Services: Spin up different services & runtimes (like a dedicated Redis for Prod vs. a shared one for Dev).

Managing Profiles

You can manage your profiles entirely through the Landscape Config Editor.

Creating a New Profile

CI profile menu

  1. Navigate to the Landscape Config Editor tab.
  2. Click the CI Profile dropdown menu.
  3. Select + Add New CI Profile.
  4. Enter a name for your profile (e.g., prod) and confirm.

A new, empty configuration will be created. You can now configure the build and run steps specifically for this profile.

Duplicating a Profile

tip

Often, your production configuration is very similar to staging, with only minor differences. Instead of starting from scratch, you can duplicate an existing profile.

  1. Select the profile you want to copy (e.g., default) from the dropdown.
  2. Open the dropdown again and select Duplicate Current CI Profile.
  3. Give the new profile a name (e.g., production).

This creates an exact copy of the configuration, which you can then tweak as needed.


Switching Profiles

To change which profile is currently active for a Landscape:

CI profile menu

  1. Open the Execution Manager.
  2. Click on the CI Profile dropdown.
  3. Select the desired profile (e.g., switch from dev to prod).
info

Switching profiles requires a redeployment to apply the new build steps and run commands.


File Structure

When you create profiles in the UI, Codesphere automatically manages the underlying YAML files in your project's root directory:

  • ci.yml: The default profile.
  • ci.dev.yml: The configuration for the dev profile.
  • ci.prod.yml: The configuration for the prod profile. These files are meant to be tracked in git, once you are finished modifying and testing them make sure to commit them to your projects repository.
note

You can edit these files manually in the Cloud IDE if you prefer working with code. The changes will be reflected immediately in the UI.

Learn more about Configuring Your CI Pipeline