-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
feat(amplify): Add Amplify asset deployment resource #16922
Conversation
Build currently fails with:
Which I added as a dependency. It worked locally too... 😕 |
03a7ebe
to
622fa23
Compare
@samkio would you mind updating your PR with the latest Thanks, |
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.
Putting in "Request changes" to clear this one from my To-Do list. @samkio please re-request my review when this is ready!
Pull request has been modified.
@skinny85 can you share the docs on what Running locally however:
Integrations are taking longer as I can't try locally; I have to push and see CodeBuild fail. Any help will be appreciated. |
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.
@skinny85 can you share the docs on what
AWS CodeBuild us-east-1 (AutoBuildProject89A8053A-LhjRyN9kxr8o) — Build failed for project AutoBuildProject89A8053A-LhjRyN9kxr8o
does? I am starting to lose hope in this change. Everything works fine locally but fails in this CodeBuild step. Now it complains about the hashes being different.Running locally however:
Verifying integ.app-asset-deployment.js against integ.app-asset-deployment.expected.json ... OK. Verifying integ.app-codecommit.js against integ.app-codecommit.expected.json ... OK. Verifying integ.app.js against integ.app.expected.json ... OK. Tests successful. Total time (7.3s) | /home/samkio/projects/aws-cdk/node_modules/jest/bin/jest.js (5.0s) | cdk-integ-assert (2.2s)
Integrations are taking longer as I can't try locally; I have to push and see CodeBuild fail. Any help will be appreciated.
Hey @samkio! Don't give up, you'r extremely close 🙂. They're a simple change you can make to your integ test that should make the build pass - I've included it in my review.
Pull request has been modified.
60c57b3
to
56034fe
Compare
This change adds a custom resource that allows users to publish S3 assets to AWS Amplify. fixes aws#16208
@samkio I've been playing with this locally and have gotten it to work against a v1 app. Since Amplify is marked as To do this we will have to create a new package in What do you think about that? |
Happy for it to be marked experimental. The change was originally decoupled as AmplifyAssetDeployment; from the suggestions above I made it part of the API however. |
@samkio ahh yes I see. I think we should revert back to that structure and extract this into a separate module, perhaps I'm able to help with this if you run into issues or are just working on other stuff. |
But aws-cdk/packages/@aws-cdk/aws-amplify/package.json Lines 110 to 111 in 5497525
and already published separately https://www.npmjs.com/package/@aws-cdk/aws-amplify-alpha |
const asset = new assets.Asset(this, "SampleAsset", {}); | ||
const amplifyApp = new amplify.App(this, 'MyApp', {}); | ||
const branch = amplifyApp.addBranch("dev"); | ||
branch.addAssetDeployment(asset); |
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 know I suggested this addAssetDeployment()
but thinking more about this, can we add more than one asset deployment to a branch? I don't think so. So maybe it should be moved to a construction prop in Branch
/option in addBranch()
?
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.
Sounds good; amended.
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.
You need to update the README for the latest change.
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.
Done
oh wow, completely disregard what I said, I was looking at the wrong package apparently? I'm not exactly sure where I got this idea from. |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
This change adds a custom resource that allows users to publish S3 assets to AWS Amplify. fixes aws#16208 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This change adds a custom resource that allows users
to publish S3 assets to AWS Amplify.
fixes #16208
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license