As the title of the post suggests, I would like to know if there is anyone here who moved from the Bitbucket pipeline to CodePipeline?
Why did you do that?
How is it going for you and what problems did the move solve?
As the title of the post suggests, I would like to know if there is anyone here who moved from the Bitbucket pipeline to CodePipeline?
Why did you do that?
How is it going for you and what problems did the move solve?
CodePipeline will probably leave you frustrated, haha. It’s alright
Not BitBucket, but we migrated from GitLab to CodePipeline. Between licensing and hosting in AWS for GitLab, we were paying $25k a year. This cuts down to $200/m (includes running services in Fargate for SAST)
CodePipeline is a pain, but once you get it working it isn’t bad. If you build out your Pipeline out in CloudFormation you can stamp it out as much as you want.
The biggest issues we ran into, using CodeCommit, were you can’t create pipelines on separate branches. When a new branch is created/deleted you’ll need a Lambda that create “pipelines” for those specific branches.
For instance, we have a core “production” pipeline thats static, but every new branch creates a new pipeline, based off that “core” pipeline.
Like everything in AWS, it requires your assembling a Rube Goldberg machine to accomplish whatever you want.
Like everything in AWS, it requires your assembling a Rube Goldberg machine to accomplish whatever you want.
/me sobs ![]()
Truer words have never been spoken.
They’ll tackle the the undifferentiated heavy lighting. The rest of the heavy lifting is ours to butt our heads against.
I don’t know when you tried to accomplish your pipeline on branch creation, but have you seen this blog post: https://aws.amazon.com/blogs/devops/multi-branch-codepipeline-strategy-with-event-driven-architecture/
It walks through the process. In my experience when you start making cross account pipelines, and then getting into IAM policies, S3 policies, and KMS permissions is when it requires a string board to track who has what permissions.
I like CodePipeline a lot because it works well for the way that I work.
If you move to it, you have to know that it is very different from most deployment pipeline architectures. People who generally “hate” CodePipeline are just expecting it to function the same way as other software does, which it doesn’t.
CodePipeline works well if you want to create all of your deployment architecture as part of your application. It does not work well if you want to manage your pipelines centrally.
To put it another way, it works very well if you have all the infrastructure as code within your code repository that describes your application AND your deployment pipeline.
I love this because I can then create a new branch and then deploy the code. The code for that branch is then entirely independent and atomic and does not require me to go anywhere else and update a pipeline. I have an entire working copy of the deployment pipeline AND the application running. When I merge that branch and delete it, that stack gets deleted and no configuration needs to be removed anywhere else.
I prefer working this way, I think it is true DevOps to be able to deploy the entire deployment arch and application arch using one set of code and one command.
How does your pipeline deploy your infrastrure as code if your code defines your pipeline? This sounds very chicken and egg.
I’m assuming your commit goes to CodeBuild or something to deploy your pipeline via CFN, then your commit goes to the pipeline it just built?
When I create a new branch, I run an initialization script in the root of the repo (like the go script concept). That sets up a couple resources and deploys the CloudFormation template containing the pipeline. From there, the pipeline runs automatically and deploys the application and sees new pushes to the branch. I store needed credentials in SSM so they can be referred to in the CloudFormation template.
I have a GitHub template I use that has these base components that I use for every new project.
Like everything in AWS, it requires your assembling a Rube Goldberg machine to accomplish whatever you want.
Jesus, like a shiv right to the heart (also, accurate).
Just wondering how the 25k for self-hosting GitLab broke down? Curious on how many devs and build jobs you had and if there wasn’t a way to be more cost efficient in that set-up.
I moved from hosting our own GitLab to GitLab.com , but still with runners on EC2. Works fine, but only have a few devs and a small number of jobs a day.
The biggest issues we ran into, using CodeCommit, were you can’t create pipelines on separate branches. When a new branch is created/deleted you’ll need a Lambda that create “pipelines” for those specific branches.
Why on earth isn’t that implemented? I feel like AWS is just bizzaro world sometimes. This is one of the biggest and most well-regarded software firms in the world and this feature’s missing from their CI/CD tool?
I’d strongly suggest using some of the CDK constructs when you get to that stage. Cross-account deploys and permissions management becomes 1-2 extra lines of code per account, which is far more manageable.
Mind sharing? May help get the point across.
It does seem like this could be a sidegrade/upgrade. We’ve gone from
The downside I suppose if if you’re managing a lot of different projects and you don’t get your pipeline and infra right the absolute first try and want to update how things work, you’re a bit in the lurch. You’ll have to update the pipeline and infra portions of each repo ad-hoc.
Unfortunately we setup some cross account deployments prior to CDK being a thing, so we figured it out with YAML and CF templates. Haven’t gotten around to CDK-ifying it yet, since it’s in a “if it ain’t broke…” situation.
Fun! Yeah, for anyone who hasn’t started down that path yet it saves a lot of pain.
CodePipeline itself is quite nice especially if you prefer to do everything manual w/ scripts, the UI and out-of-the-box integrations are worse; still, I prefer it to Bitbucket/Bamboo, but CodeCommit is tremendously bad compared to Bitbucket, so if you use a lot of the repository features, Pull Requests, etc, you will be disappointed. I suppose you could mix them but to me the point of it is to consolidate everything on AWS / stop paying Atlassian a small fortune every month.
Thanks for your comment. Since codepipeline doesn’t support dynamic branches, I am not too sure if I understood how you’re doing it. Can you possibly share reference to the setup, please?
CodePipeline doesn’t work well with feature branch type of branching strategy if you’re working on main/master you should be good
We tried codepipeline/deploy/thingy a while back and it failed for a large legacy product of ours… because the product required two git repos. Things may have changed, but there was no way to build a product from two repos (submoduling was not accepted by the system).
Just an edge case, but something to look out for if you use submoduling.