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.,
--debugvs.--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
- Navigate to the Landscape Config Editor tab.
- Click the CI Profile dropdown menu.
- Select + Add New CI Profile.
- 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
Often, your production configuration is very similar to staging, with only minor differences. Instead of starting from scratch, you can duplicate an existing profile.
- Select the profile you want to copy (e.g.,
default) from the dropdown. - Open the dropdown again and select Duplicate Current CI Profile.
- 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:
- Open the Execution Manager.
- Click on the CI Profile dropdown.
- Select the desired profile (e.g., switch from
devtoprod).
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 thedevprofile.ci.prod.yml: The configuration for theprodprofile. 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.
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