-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add AppSync_BreakingChangeDetection hook to release pipeline (#244)
* Add AppSync_BreakingChangeDetection hook to release pipeline * Additional changes to get the pipeline working properly * Bump packages to use python 3.8 * Rename file to match expected name
- Loading branch information
Showing
34 changed files
with
238 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
Resources: | ||
BasicGraphqlApi: | ||
Type: "AWS::AppSync::GraphQLApi" | ||
Properties: | ||
Name: "TestAPI with IAM auth" | ||
AuthenticationType: "AWS_IAM" | ||
|
||
BasicApiSchema: | ||
Type: "AWS::AppSync::GraphQLSchema" | ||
Properties: | ||
ApiId: !GetAtt BasicGraphqlApi.ApiId | ||
Definition: | | ||
schema { | ||
query: Query | ||
mutation: Mutation | ||
} | ||
type Query { | ||
singlePost(id: ID!): Post2 | ||
} | ||
type Mutation { | ||
putPost(id: ID!, title: String!): Post2 | ||
} | ||
type Post2 { | ||
id: ID! | ||
title: String! | ||
} |
29 changes: 29 additions & 0 deletions
29
hooks/AppSync_BreakingChangeDetection/test/integ-setup.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
Resources: | ||
BasicGraphqlApi: | ||
Type: "AWS::AppSync::GraphQLApi" | ||
Properties: | ||
Name: "TestAPI with IAM auth" | ||
AuthenticationType: "AWS_IAM" | ||
|
||
BasicApiSchema: | ||
Type: "AWS::AppSync::GraphQLSchema" | ||
Properties: | ||
ApiId: !GetAtt BasicGraphqlApi.ApiId | ||
Definition: | | ||
schema { | ||
query: Query | ||
mutation: Mutation | ||
} | ||
type Query { | ||
singlePost(id: ID!): Post | ||
} | ||
type Mutation { | ||
putPost(id: ID!, title: String!): Post | ||
} | ||
type Post { | ||
id: ID! | ||
title: String! | ||
} |
30 changes: 30 additions & 0 deletions
30
hooks/AppSync_BreakingChangeDetection/test/integ-succeed.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Resources: | ||
BasicGraphqlApi: | ||
Type: "AWS::AppSync::GraphQLApi" | ||
Properties: | ||
Name: "TestAPI with IAM auth" | ||
AuthenticationType: "AWS_IAM" | ||
|
||
BasicApiSchema: | ||
Type: "AWS::AppSync::GraphQLSchema" | ||
Properties: | ||
ApiId: !GetAtt BasicGraphqlApi.ApiId | ||
Definition: | | ||
schema { | ||
query: Query | ||
mutation: Mutation | ||
} | ||
type Query { | ||
singlePost(id: ID!): Post | ||
allThePosts: [Post] | ||
} | ||
type Mutation { | ||
putPost(id: ID!, title: String!): Post | ||
} | ||
type Post { | ||
id: ID! | ||
title: String! | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
version: 0.2 | ||
|
||
phases: | ||
install: | ||
runtime-versions: | ||
python: 3.8 | ||
java: corretto11 | ||
commands: | ||
- echo Entered the install phase... | ||
- echo About to build $HOOK_PATH | ||
- export PATH="/usr/local/bin:$PATH" | ||
- TYPE_NAME=$(python scripts/type_name.py $HOOK_PATH/.rpdk-config) | ||
- TYPE_CLEAN_NAME="$(echo $TYPE_NAME | sed s/::/-/g | tr ‘[:upper:]’ ‘[:lower:]’)" | ||
- echo TYPE_CLEAN_NAME is $TYPE_CLEAN_NAME | ||
- BUILD_FILE_NAME=$(cat TYPE_CLEAN_NAME | sed s/_/-/g) | ||
- BUILD_FILE_NAME="${BUILD_FILE_NAME}.zip" | ||
- pip install git+https://github.com/aws-cloudformation/cloudformation-cli.git@master | ||
- pip install git+https://github.com/aws-cloudformation/cloudformation-cli-java-plugin.git@master | ||
- cd $HOOK_PATH | ||
- cfn --version | ||
- sam --version | ||
build: | ||
commands: | ||
- echo Entered the build phase... | ||
- cfn validate | ||
- cfn generate | ||
- mvn clean verify -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn | ||
- cfn submit --set-default | ||
- HOOK_TYPE_ARN=$(aws cloudformation list-types --visibility PRIVATE --type HOOK --filters TypeNamePrefix=$TYPE_NAME --output json | jq -r '.TypeSummaries[0].TypeArn') | ||
- aws cloudformation set-type-configuration --configuration file://test/configuration.json --type-arn $HOOK_TYPE_ARN | ||
- INTEG_STACK_NAME="integ-$(echo $TYPE_CLEAN_NAME | sed s/_/-/g)" | ||
- rain deploy test/integ-setup.yml $INTEG_STACK_NAME -y | ||
- rain deploy test/integ-succeed.yml $INTEG_STACK_NAME -y | ||
- rain deploy test/integ-fail.yml $INTEG_STACK_NAME -y || [ $? -eq 1 ] | ||
finally: | ||
- cat rpdk.log | ||
- aws cloudformation set-type-configuration --configuration file://test/configuration-undo.json --type-arn $HOOK_TYPE_ARN | ||
- rain rm $INTEG_STACK_NAME -y | ||
artifacts: | ||
files: | ||
- $BUILD_FILE_NAME | ||
name: extensions-build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.