/
CI/CD Process Handover

Attention: Confluence is not suitable for the storage of highly confidential data. Please ensure that any data classified as Highly Protected is stored using a more secure platform.
If you have any questions, please refer to the University's data classification guide or contact ict.askcyber@sydney.edu.au

CI/CD Process Handover

Setting up a local repository in VS Code

Confluence: https://sydneyuni.atlassian.net/wiki/spaces/SNGL/pages/2715779242


Resolving merge conflicts

  1. Checkout to the source branch. Make sure to take note of your changes that must be merged and deployed.

  2. Run the Git fetch command.

  3. From the Terminal, run the Git checkout command to copy the contents of a file from the target branch:

    git checkout <target_branch> -- <file_path> git checkout origin/master -- 'force-app\main\default\classes\SampleClass.cls'
  4. The file will now be the same as what is in the target branch, and your changes will be overwritten. Commit and push the staged changes.

  5. Create a pull request, merging the source branch to the target branch. This pull request should not contain your actual changes, and will only contain changes found in the target branch but not in the source branch.

  6. With the file still open, manually add your changes. Commit and push to the remote branch.

  7. Create a second pull request, merging the source branch to the target branch. This pull request will contain your actual changes, but with no more merge conflicts.


Revert a merged commit

  1. Create a new, temporary branch based from the branch you want to revert a merge commit from, e.g., TAP-1250-RevertFromMaster based from origin/master

  2. Get the Commit ID of the merge commit you will revert, e.g., 294229cf

  1. Make sure you are checked out to the temporary branch. From Terminal, type command:

git revert <commit id> -m 1 git revert 294229cf -m 1
  1. Commit the changes in the temporary branch, and then publish branch

  2. From the temporary branch, create a pull request to the target branch, e.g., TAP-1250-RevertFromMaster to origin/master

  3. Once pipelines are successful and PR is approved, merge to target branch


Adding new project to CI/CD pipelines


Downstream deployments (Back Sync)

  1. This process is done after PROD deployments to sync sit and uat branches with master, and uses a “no-commit” branch that is based from master. Use the branch: ALL-noCommitFromMaster.

  2. Make sure to rebase the no-commit branch by running a Git pull command:

git pull origin master
  1. Push the commits.

  2. Create a pull request for merging ALL-noCommitFromMaster to sit, and another pull request to merge the same branch to uat.

Recording:


Rebase Process (For after sandbox refresh)


Deleting branches

Using VS Code

  1. Navigate to Git Graph. Make sure to run fetch from remote(s).

  2. Right-click on a branch and select Delete Branch….

  1. If the branch needs to be deleted on the remote, tick both checkboxes. Otherwise, just click on Yes, delete.

Using the Terminal

  1. To delete a branch locally, run the following command:

  • -d is a shortcut for --delete, and -D is a shortcut for --delete --force

  1. To delete a branch remotely, run the following command:


Destructive changes

  1. In VS Code, navigate to Explorer. Right-click on the file and select Delete.

  1. From the Source Control tab, deleting the file will show up as a file deletion under Changes. Follow the same steps as you would for deploying changes: stage the changes, commit and then push to remote.

  1. In Bitbucket, create a pull request to merge the source branch (where the file was deleted locally) to the target branch. Do note that upon merging, the file will be deleted in the target branch, but not on the target environment. Please see the following section: Deleting components in org.


Useful SFDX commands

 

Related content

Simplus Managed Services Handover
Simplus Managed Services Handover
Read with this
4. Dealing with conflicts
4. Dealing with conflicts
More like this
TAP Product Enhancements Log
TAP Product Enhancements Log
Read with this
TAP Solution Slayers (TAPSS) - Team Space (to be archived)
TAP Solution Slayers (TAPSS) - Team Space (to be archived)
Read with this
AQ Activity Report Migration Project Plan
AQ Activity Report Migration Project Plan
Read with this