-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pipelines #17
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woo! Really happy to have this. Nice work.
source_action=codepipeline_actions.GitHubSourceAction( | ||
action_name='GitHubRenderLambda', | ||
output=source_artifact, | ||
oauth_token=cdk.SecretValue.secrets_manager('github-token', json_field='chand1012'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this your personal token? You could probably make a company token on GH
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly we can't make personal access tokens at a company level, so this will have to do for now.
|
||
from stack.pipeline_stages import PreprodStage, ProdStage | ||
# used this as reference | ||
# https://aws.amazon.com/blogs/developer/cdk-pipelines-continuous-delivery-for-aws-cdk-applications/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice - here is another source I saw that was good - https://docs.aws.amazon.com/cdk/latest/guide/codepipeline_example.html
This is a major update that will encompass more than just merging this PR. Closes #5 .
After this PR is merged, all new branches will be based on
develop
, rather thanmaster
. The branchdevelop
will become protected and will be merged to by PRs like master was. Bothmaster
anddevelop
will have emergency push allowance. Here is the new workflow:develop
.a)
git checkout develop
b)
git checkout -b new-feature-1
develop
.develop
tomaster
. After it is approved and merged, it will automatically get deployed to production.Currently there are two pipelines -
RenderLambdaPipeline
andProdRenderLambdaPipeline
.RenderLambdaPipeline
polls develop for changes.ProdRenderLambdaPipeline
polls frommaster
.Both pipelines update when new code is pushed to the branches. Their DNS endpoints are separate, and a custom DNS for
ProdRenderLambdaPipeline
will be implemented soon, more research is needed to complete the task.For the
downloader
lambda, the source of the image had to be changed. This is because authenticating with Docker is quite complicated on AWS, and there is a per-IP limit of 100 pulls per six hours. The IP of each AWS CodeBuild instance can be shared across accounts or across customers, so the simplest solution was to just pull from AWS ECR, which is already automatically authenticated at the start of the build process.If you would want to test your current changes on AWS, assuming another developer wasn't also working on the project, you would run
cdk deploy RenderLambdaStack
. This will deploy to what is now the "test stack", or one that will change frequently during development.ProdRenderLambdaPipeline
failed on initial push, but that will change when this PR is merged.Similar changes will be made to the
timestamps
project as well.Also, a lot of commits were made to get this working and to test AWS deployment. I recommend doing a "Squash and Merge".