I want to implement CI/CD
in AWS CodeCommit
.
I know its possible manually to kickstart the process once the code reached CodeCommit. But I am using Azure DevOps
Repo as my source code repo and want to automate the process.
The deployement is done using AWS SAM
. I am looking for a method like; when I push a code to Azure Repo
, it should reach the AWS CodeCommit
and do the CI/CD
without any further manual intervention.
Is there any way to do that?
Azure repos and CodeCommit are compliant with the git standard. The git standard allows you to specify multiple remotes. This is useful for if you were maintaining a mirror or, as in your use case, you need to do something in different environments.
You can read about setting multiple remotes here (provided by github; even though you’re not using github the process and commands should be the same).
Once you have your multiple remotes setup, you can configure your CI/CD pipeline to kick off its process to deploy your SAM template based on your push; when you push your code changes they will be sent to both your Azure repo, and your CodeCommit repo, and your CI/CD pipeline that is monitoring your CodeCommit repo will see the change and kickoff its execution.
Its worth pointing out that you’ll need to properly setup and configure your CI/CD pipeline. AWS provides a number of services to support this including AWS CodePipeline, AWS CodeBuild, and AWS CodeDeploy.