This section will guide you through the full process of:
- Planning work via Code Studio issues
- Making a change to the code
- Create a merge request to propose a new change
- Run automated test against the change
- Review the change in a CDE
- Merge the change
Code Studio facilitates the application review in a temporary environment (CDE).
The following instructions provide the possible development flow for a feature called feature-1
:
Planning changes to the code
- Click Plan > Issues to navigate to the intended project.
Click New issue.
Assign the issue to yourself or a team member with Code Studio access.
Click Create merge request directly from the issue ticket.
Making a change to the code
- Navigate to your project in Code Studio (GitLab)
- Click the (+) button dropdown to add a new branch.
- Enter an appropriate name for the branch. For example,
feature-1
. - Create the branch.
- Add relevant changes to the new branch. For example, add a new file to the
feature-1
branch.
Creating a merge request to propose a new change
- Click Code > Merge requests > New merge request.
- Select the Source branch as
feature-1
and the Target branch as the primary branch. - Click Compare branches and continue.
- Fill in the necessary details, and then click Create merge request.
Code Studio auto-triggers a new CI pipeline for the merge request. The pipeline status is displayed on the current merge request page. The status might take a minute to update.
Running an automated test against the proposed change
Check the pipeline status on the current merge request page, and select Pipeline status to get more details about the pipeline.
- Let the corresponding Code Studio CI pipeline succeed. This might take a few minutes.
Reviewing the proposed change in a CDE
- Log in to Cloud Platform and navigate to the respective application.
- On the Overview page, find the extra CDE. This CDE is ready to use.
Merging the proposed change
- Click Merge to merge the request.
- After the merge request is closed, the
Delete CDE
job from the old pipeline that created the CDE deletes the CDE environment. - If any other environment, like
Dev
, needs to point to thefeature-1
branch, make a code switch.