-
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
refactor pipeline for share source code sequentially for each stage #48
Conversation
Refer: #45 (comment) |
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.
I guess this could work too, but I think #29 still stands for a cleaner approach.
I suppose this chains assets between the stage deployment, so each stage relies heavily on the previous stage deploy.
deploy/lib/application-stack.ts
Outdated
commands: ['node -v', 'corepack enable', 'yarn --version', 'yarn install --immutable'], | ||
commands: [ | ||
'aws s3 rm s3://${VITE_BUCKET_NAME}/ --recursive', | ||
'aws s3 sync ./ s3://${VITE_BUCKET_NAME}/${SOURCE_BUCKET_ARTIFACT_PATH} --dryrun', |
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.
I suppose the --dryrun
flag should be gone?
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.
--dryrun
can be removed.
For 'chains assets between the stage deployment', it will keep what we want, just deploy what we have in the last stage.
I am thinking if we just use the deployment in bastion, we still need to face the problem, which version of code we need retrieve? as we alway just retrieve the code from the "latest context" and build the original atrtifact for each stage. I am not find a proper way to have commit SHA in the checking out codestar source code, only from github link or use lambda. I will keep checking...
So I am think kind of store each stage artifact in each stage bucket and keep the version we have in the previous stage...
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.
If the build is in the bastion account and deployed to its respective (cloudfront) bucket, it could use the same source artifact for each stage deployment within the code pipeline trigger (commit). I suppose code pipeline will keep its artifact version for each trigger.
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.
yes, if we are in one pipeline, sure, because there will always be a new build if new commit come in to trigger the build. but the bucket not. So I am think use that artifacts bucket
Later, I will refactor it again to fit it in the one pipeline in the bastion account.
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.
if we are in one pipeline,
We are only using one pipeline right?
but the bucket not.
What do you mean the bucket is not? What I had in mind is for every stage the build should source from the artifact (github commit) that trigger the pipeline, build the React and send it off to its respective cf (deployment) bucket.
…orca-ui into feat/pipeline-refactoring
merge now, for new pipeline testing ....... |
No description provided.