feat(amplify): Add Amplify asset deployment resource #16922
feat(amplify): Add Amplify asset deployment resource #16922mergify[bot] merged 12 commits intoaws:masterfrom
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, |
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. |
skinny85
left a comment
There was a problem hiding this comment.
@skinny85 can you share the docs on what
AWS CodeBuild us-east-1 (AutoBuildProject89A8053A-LhjRyN9kxr8o) — Build failed for project AutoBuildProject89A8053A-LhjRyN9kxr8odoes? 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.
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.
Sounds good; amended.
There was a problem hiding this comment.
You need to update the README for the latest change.
|
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