Complete Beiartf Migration For tv-sql-product's Pipelines
Hi all,
Considering that tv-sql-product pipelines are not often used by teams, we think it's better to simply provide a document that will explain the complete steps of the migration. This way teams might postpone the CodeBuild migration until they need to use the pipeline to publish a proxy jar. The Gradle migration is handled centrally by christianto.handojo.
Another important thing is teams have to move the pipeline to another AWS account that isn't deprecated. This account might be your team's own account for multi-account teams, or tvlk-build for those without aws account. This account will be referred as new account for the rest of this guide.
Here are the prerequisites for the executor:
- Create a new CodeBuild role in the new account to be used by all proxy publishing pipelines. You can follow this example. This will need help from the backend-infra team for those in tvlk-build, contact christianto.handojo for help. This is only needed once.
- For those who will create new pipelines in tvlk-build, make sure you can assume ProductDomainBuildManager_<your_pd>. For those in their own account, make sure you can assume the correct role.
Here are the steps:
- Fetch and rebase to the latest master branch in tv-sql-product. This ensures your gradle is already modified to use the new authentication method and beiartf URL.
- In the gradle for your proxy folder, add ext.jarGroup and fill it with the maven groupId for your team.
- Copy the current pipeline's terraform code to the terraform repository for the new aws account. In case your pipeline is created without terraform, copy this instead. In any case, follow that link as an example for the following steps.
- Change the version used for the publisher template to v0.7.0.
- Use the first prerequisite created role's ARN for the service_role_arn variable. This variable replaces the service_role for those using version before v0.6.0.
- Use your BeiartfWriter role's ARN for the assumed_role_arn variable. The default value for this variable is only valid for tvlk-dev. Make sure the account number is 015110552125.
- Execute the terraform. Make sure you can assume the necessary role.
- Fill the environment variable with the correct value for these things in your aws account. In tvlk-build, you can use special
- Destroy the old pipeline in tvlk-dev.
The end result for the new terraform code should be pretty similar to this example. For pipelines in tvlk-build, every bei
should be replaced with your product domain, including the directory. In case there are problems you can contact christianto.handojo.
This post is a copy of https://29022131.atlassian.net/wiki/spaces/BEI/blog/2020/06/17/1406830659/Complete+Beiartf+Migration+For+tv-sql-product+s+Pipelines