Git Repository and Main Release Flow

Updated 2 months ago by Copado Solutions

If you are working with pipelines, steps 4 and 6 will be automatically performed by the pipeline wizard.
  1. Create a new repository in your Git version control provider (e.g. Github, Bitbucket, GitLab, others).
  2. Commit the example .gitignore file to the master branch to avoid tracking unnecessary files, thus keeping your branches only with the necessary files.
  3. Link Copado to your Git repository.
    1. If your Git repository is behind a firewall, you will need to whitelist the Copado IP addresses.
    2. It is recommended that developers and admins working with Copado have access to the Git repository to review their changes and see who modified specific lines of code or configuration files.
  4. Create a Git snapshot record for the production org with the master branch.
    1. A Git snapshot links an org to a Git branch in your Git repository in order to perform actions such as backups, commit to the branch, or commit metadata changes via a user story.
    2. The user story’s org credential will determine which Git snapshot will be used for the commit.
  5. Follow Salesforce’s Git trailhead for more information on version control.
  6. Click on Take Snapshot Now (Create Snapshot Now if you are in v11 or under) in the Git Snapshot record that links the production org to the master branch of your Git repository. All the metadata components of the org, which are not mentioned in the .gitignore file, will be committed to the branch.
  7. Once the snapshot is finished, verify in your Git repository that the metadata components have been committed to the master branch. Then, create new branches out of the master branch that correspond to each of the other orgs (e.g. dev1, int, UAT).
  8. In Copado, create the Git snapshot records for each of the other orgs with their corresponding branch and org credential. Branch names are case sensitive, therefore, make sure to check that the branch name in git is exactly the same as that in the snapshot in Copado.
    1. Consider creating a release management user in each org that has access to all the metadata. Link each Git Snapshot record to the org credential of the release management user.
    2. Users that will be committing to user stories need access to a Git snapshot record linked to an org credential linked to the same environment of the user story. If they do not have access to this Git snapshot, you must share the org credential record with them so they have access to the Git snapshot.
  9. Create a pipeline. Select the Git repository record and the main branch to track all metadata changes in Git. The main branch is usually master, from which the user story feature branches will be created.
  10. Create pipeline connections to connect the different orgs of the pipeline. For each step, select the source and destination environments and type in the branch related to the source environment.


How did we do?