Skip to content

Commit

Permalink
Changed documentation of amplify to use yaml object. Changed test cas…
Browse files Browse the repository at this point in the history
…es to use yaml format
  • Loading branch information
janario committed Mar 13, 2021
1 parent 26a48a4 commit 2ec91bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-amplify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const amplifyApp = new amplify.App(this, 'MyApp', {
repository: '<repo>',
oauthToken: cdk.SecretValue.secretsManager('my-github-token')
}),
buildSpec: codebuild.BuildSpec.fromObject({ // Alternatively add a `amplify.yml` to the repo
buildSpec: codebuild.BuildSpec.yamlFromObject({ // Alternatively add a `amplify.yml` to the repo
version: '1.0',
frontend: {
phases: {
Expand Down
8 changes: 4 additions & 4 deletions packages/@aws-cdk/aws-amplify/test/app.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ test('create an app connected to a GitHub repository', () => {
repository: 'aws-cdk',
oauthToken: SecretValue.plainText('secret'),
}),
buildSpec: codebuild.BuildSpec.fromObject({
buildSpec: codebuild.BuildSpec.yamlFromObject({
version: '1.0',
frontend: {
phases: {
Expand All @@ -34,7 +34,7 @@ test('create an app connected to a GitHub repository', () => {
// THEN
expect(stack).toHaveResource('AWS::Amplify::App', {
Name: 'App',
BuildSpec: '{\n \"version\": \"1.0\",\n \"frontend\": {\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"npm run build\"\n ]\n }\n }\n }\n}',
BuildSpec: 'version: \"1.0\"\nfrontend:\n phases:\n build:\n commands:\n - npm run build\n',
IAMServiceRole: {
'Fn::GetAtt': [
'AppRole1AF9B530',
Expand Down Expand Up @@ -69,7 +69,7 @@ test('create an app connected to a GitLab repository', () => {
repository: 'aws-cdk',
oauthToken: SecretValue.plainText('secret'),
}),
buildSpec: codebuild.BuildSpec.fromObject({
buildSpec: codebuild.BuildSpec.yamlFromObject({
version: '1.0',
frontend: {
phases: {
Expand All @@ -86,7 +86,7 @@ test('create an app connected to a GitLab repository', () => {
// THEN
expect(stack).toHaveResource('AWS::Amplify::App', {
Name: 'App',
BuildSpec: '{\n \"version\": \"1.0\",\n \"frontend\": {\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"npm run build\"\n ]\n }\n }\n }\n}',
BuildSpec: 'version: \"1.0\"\nfrontend:\n phases:\n build:\n commands:\n - npm run build\n',
IAMServiceRole: {
'Fn::GetAtt': [
'AppRole1AF9B530',
Expand Down

0 comments on commit 2ec91bc

Please sign in to comment.