Skip to content
This repository was archived by the owner on May 2, 2023. It is now read-only.

Commit 0343416

Browse files
Added changelogger to build tasks; misc output fix
1 parent 77d5ae6 commit 0343416

File tree

6 files changed

+224
-11
lines changed

6 files changed

+224
-11
lines changed

.github/workflows/cfnspecaudit.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,14 @@ jobs:
3737
pipenv run python tools/cfn-resource-list.py
3838
- name: Audit documentation links and cfn user guide
3939
run: |
40-
pipenv run python tools/cfn-supported-region-generator.py
40+
cp supported-regions-per-resource.json supported-regions-per-resource-old.json
41+
pipenv run python tools/cfn-supported-region-generator.py
42+
- name: Generate changelog source
43+
run: |
44+
pipenv run python tools/cfn-changelogger.py
45+
- name: Generate changelog markdown
46+
run: |
47+
pipenv run python tools/create-changelog.py
4148
- name: Create pull request if any files were updated
4249
env:
4350
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.vscode/*
2-
/aws-cloudformation-user-guide/*
2+
/aws-cloudformation-user-guide/*
3+
supported-regions-per-resource-old.json

CHANGELOG.md

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
# Changelog
2+
3+
This changelog is auto-managed by [`tools/create-changelog.py`](tools/create-changelog.py) with the [`changelogs/v8-changelog.json`](changelogs/v8-changelog.json) data source. All JSON data in [changelogs](changelogs) is generated and managed by [`tools/cfn-changelogger.py`](tools/cfn-changelogger.py)
4+
5+
Changelogs are duplicated to the [changelogs](changelogs) sub-directory with each new major version.
6+
7+
> _**NOTE:** Additional information related to Release History for CloudFormation specifications can be found in the official AWS CloudFormation User Guide documentation: [Release History](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/ReleaseHistory.html)_
8+
9+
## [8.0.0](https://github.com/ScriptAutomate/aws-cfn-resource-specs/releases/tag/v8.0.0) (2019-11-08)
10+
11+
- [ChangeLog Source JSON](https://github.com/ScriptAutomate/aws-cfn-resource-specs/blob/master/changelogs/v8-changelog.json)
12+
- Change source is a diff between [v8.0.0](https://github.com/ScriptAutomate/aws-cfn-resource-specs/releases/tag/v8.0.0) and [v7.4.0](https://github.com/ScriptAutomate/aws-cfn-resource-specs/releases/tag/v7.4.0)
13+
14+
### Totals
15+
16+
- TotalPropertyTypes: 1125 **(+5)**
17+
- TotalPropertyTypesSupportedGlobally: 465 **(+0)**
18+
- TotalResourceTypes: 467 **(+4)**
19+
- TotalResourceTypesSupportedGlobally: 189 **(+0)**
20+
21+
### Introduction of New ResourceTypes and/or PropertyTypes
22+
23+
- [AWS::CodeStarNotifications::NotificationRule](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarnotifications-notificationrule.html)
24+
- `us-east-1`
25+
- `eu-north-1`
26+
- `ap-south-1`
27+
- `eu-west-3`
28+
- `eu-west-2`
29+
- `eu-west-1`
30+
- `ap-northeast-2`
31+
- `ap-northeast-1`
32+
- `sa-east-1`
33+
- `ca-central-1`
34+
- `ap-southeast-1`
35+
- `ap-southeast-2`
36+
- `eu-central-1`
37+
- `us-east-2`
38+
- `us-west-1`
39+
- `us-west-2`
40+
41+
- [AWS::MediaConvert::JobTemplate](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediaconvert-jobtemplate.html)
42+
- `us-east-1`
43+
- `eu-north-1`
44+
- `ap-south-1`
45+
- `eu-west-3`
46+
- `eu-west-2`
47+
- `eu-west-1`
48+
- `ap-northeast-2`
49+
- `ap-northeast-1`
50+
- `sa-east-1`
51+
- `ca-central-1`
52+
- `ap-southeast-1`
53+
- `ap-southeast-2`
54+
- `eu-central-1`
55+
- `us-east-2`
56+
- `us-west-1`
57+
- `us-west-2`
58+
59+
- [AWS::MediaConvert::Preset](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediaconvert-preset.html)
60+
- `us-east-1`
61+
- `eu-north-1`
62+
- `ap-south-1`
63+
- `eu-west-3`
64+
- `eu-west-2`
65+
- `eu-west-1`
66+
- `ap-northeast-2`
67+
- `ap-northeast-1`
68+
- `sa-east-1`
69+
- `ca-central-1`
70+
- `ap-southeast-1`
71+
- `ap-southeast-2`
72+
- `eu-central-1`
73+
- `us-east-2`
74+
- `us-west-1`
75+
- `us-west-2`
76+
77+
- [AWS::MediaConvert::Queue](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediaconvert-queue.html)
78+
- `us-east-1`
79+
- `eu-north-1`
80+
- `ap-south-1`
81+
- `eu-west-3`
82+
- `eu-west-2`
83+
- `eu-west-1`
84+
- `ap-northeast-2`
85+
- `ap-northeast-1`
86+
- `sa-east-1`
87+
- `ca-central-1`
88+
- `ap-southeast-1`
89+
- `ap-southeast-2`
90+
- `eu-central-1`
91+
- `us-east-2`
92+
- `us-west-1`
93+
- `us-west-2`
94+
95+
- [AWS::ApiGatewayV2::Api.BodyS3Location](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-bodys3location.html)
96+
- `us-west-1`
97+
98+
- [AWS::ApiGatewayV2::Api.Cors](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-cors.html)
99+
- `us-west-1`
100+
101+
- [AWS::ApiGatewayV2::Authorizer.JWTConfiguration](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-authorizer-jwtconfiguration.html)
102+
- `us-west-1`
103+
104+
- [AWS::CodeStarNotifications::NotificationRule.Target](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codestarnotifications-notificationrule-target.html)
105+
- `us-east-1`
106+
- `eu-north-1`
107+
- `ap-south-1`
108+
- `eu-west-3`
109+
- `eu-west-2`
110+
- `eu-west-1`
111+
- `ap-northeast-2`
112+
- `ap-northeast-1`
113+
- `sa-east-1`
114+
- `ca-central-1`
115+
- `ap-southeast-1`
116+
- `ap-southeast-2`
117+
- `eu-central-1`
118+
- `us-east-2`
119+
- `us-west-1`
120+
- `us-west-2`
121+
122+
- [AWS::MediaConvert::JobTemplate.AccelerationSettings](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediaconvert-jobtemplate-accelerationsettings.html)
123+
- `us-east-1`
124+
- `eu-north-1`
125+
- `ap-south-1`
126+
- `eu-west-3`
127+
- `eu-west-2`
128+
- `eu-west-1`
129+
- `ap-northeast-2`
130+
- `ap-northeast-1`
131+
- `sa-east-1`
132+
- `ca-central-1`
133+
- `ap-southeast-1`
134+
- `ap-southeast-2`
135+
- `eu-central-1`
136+
- `us-east-2`
137+
- `us-west-1`
138+
- `us-west-2`
139+
140+
### Existing ResourceTypes and PropertyTypes: Added Regions
141+
142+
- [AWS::AppStream::ImageBuilder.AccessEndpoint](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appstream-imagebuilder-accessendpoint.html)
143+
- `us-east-1`
144+
145+
- [AWS::AppStream::Stack.AccessEndpoint](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appstream-stack-accessendpoint.html)
146+
- `us-east-1`
147+
148+
- [AWS::AppSync::DataSource.DeltaSyncConfig](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-deltasyncconfig.html)
149+
- `us-west-2`
150+
151+
- [AWS::AppSync::Resolver.LambdaConfig](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-resolver-lambdaconfig.html)
152+
- `us-west-2`
153+
154+
- [AWS::AppSync::Resolver.SyncConfig](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-resolver-syncconfig.html)
155+
- `us-west-2`
156+
157+
### Existing ResourceTypes and PropertyTypes Not in `us-east-1`
158+
159+
- PropertyType Still Missing
160+
- Since v7.4.0: [AWS::AppSync::DataSource.DeltaSyncConfig](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-deltasyncconfig.html)
161+
- `us-east-2`
162+
- `us-west-2`
163+
164+
- Since v7.4.0: [AWS::AppSync::Resolver.LambdaConfig](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-resolver-lambdaconfig.html)
165+
- `us-east-2`
166+
- `us-west-2`
167+
168+
- Since v7.4.0: [AWS::AppSync::Resolver.SyncConfig](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-resolver-syncconfig.html)
169+
- `us-east-2`
170+
- `us-west-2`
171+
172+
- New PropertyType(s) Missing
173+
- [AWS::ApiGatewayV2::Api.BodyS3Location](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-bodys3location.html)
174+
- `us-west-1`
175+
176+
- [AWS::ApiGatewayV2::Api.Cors](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-cors.html)
177+
- `us-west-1`
178+
179+
- [AWS::ApiGatewayV2::Authorizer.JWTConfiguration](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-authorizer-jwtconfiguration.html)
180+
- `us-west-1`
181+
182+
- PropertyType(s) No Longer Missing
183+
- [AWS::AppStream::ImageBuilder.AccessEndpoint](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appstream-imagebuilder-accessendpoint.html)
184+
- Was missing since v7.4.0
185+
186+
- [AWS::AppStream::Stack.AccessEndpoint](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appstream-stack-accessendpoint.html)
187+
- Was missing since v7.4.0
188+

changelogs/v8-CHANGELOG.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
## [8.0.0](https://github.com/ScriptAutomate/aws-cfn-resource-specs/releases/tag/v8.0.0)
1+
# Changelog
2+
3+
This changelog is auto-managed by [`tools/create-changelog.py`](tools/create-changelog.py) with the [`changelogs/v8-changelog.json`](changelogs/v8-changelog.json) data source. All JSON data in [changelogs](changelogs) is generated and managed by [`tools/cfn-changelogger.py`](tools/cfn-changelogger.py)
4+
5+
Changelogs are duplicated to the [changelogs](changelogs) sub-directory with each new major version.
6+
7+
> _**NOTE:** Additional information related to Release History for CloudFormation specifications can be found in the official AWS CloudFormation User Guide documentation: [Release History](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/ReleaseHistory.html)_
8+
9+
## [8.0.0](https://github.com/ScriptAutomate/aws-cfn-resource-specs/releases/tag/v8.0.0) (2019-11-08)
210

311
- [ChangeLog Source JSON](https://github.com/ScriptAutomate/aws-cfn-resource-specs/blob/master/changelogs/v8-changelog.json)
412
- Change source is a diff between [v8.0.0](https://github.com/ScriptAutomate/aws-cfn-resource-specs/releases/tag/v8.0.0) and [v7.4.0](https://github.com/ScriptAutomate/aws-cfn-resource-specs/releases/tag/v7.4.0)
@@ -178,4 +186,3 @@
178186
- [AWS::AppStream::Stack.AccessEndpoint](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appstream-stack-accessendpoint.html)
179187
- Was missing since v7.4.0
180188

181-
> **NOTE:** _Additional information related to Release History for CloudFormation specifications can be found in the official AWS CloudFormation User Guide documentation: [Release History](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/ReleaseHistory.html)_

tools/cfn-changelogger.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,17 @@ def compare_regions(new_list_type, old_list_type):
2929
]
3030

3131
# Import old
32-
with open('testing/supported-regions-per-resource-old.json', 'r') as file_to_read:
32+
with open('supported-regions-per-resource-old.json', 'r') as file_to_read:
3333
supported_old = json.loads(file_to_read.read())
3434

3535
# Import new
3636
with open('supported-regions-per-resource.json', 'r') as file_to_read:
3737
supported_new = json.loads(file_to_read.read())
3838

39+
if supported_new["ResourceSpecificationVersion"] == supported_old["ResourceSpecificationVersion"]:
40+
print("No new version.")
41+
exit()
42+
3943
# Change = [increase, decrease]
4044
for total in totals:
4145
changelog["Totals"][total] = {"Value": supported_new[total], "Change": [supported_new[total] - supported_old[total]]}

tools/create-changelog.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import json
2+
import shutil
23
from pathlib import Path
34
from distutils.version import StrictVersion
45

@@ -110,9 +111,10 @@ def parse_useast1_missing_types(release, version, item_type):
110111

111112
# Setup changelog header
112113
changelog_markdown = []
113-
changelog_markdown.append("# Changelog")
114+
changelog_markdown.append("# Changelog\n\n")
114115
changelog_markdown.append(f"This changelog is auto-managed by [`tools/create-changelog.py`](tools/create-changelog.py) with the [`changelogs/v{latest_major}-changelog.json`](changelogs/v8-changelog.json) data source. All JSON data in [changelogs](changelogs) is generated and managed by [`tools/cfn-changelogger.py`](tools/cfn-changelogger.py)\n\n")
115116
changelog_markdown.append("Changelogs are duplicated to the [changelogs](changelogs) sub-directory with each new major version.\n\n")
117+
changelog_markdown.append("> _**NOTE:** Additional information related to Release History for CloudFormation specifications can be found in the official AWS CloudFormation User Guide documentation: [Release History](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/ReleaseHistory.html)_\n\n")
116118

117119
# Open the source changelog; start with latest version
118120
with open(changelog_source_file, 'r') as source_json:
@@ -122,9 +124,12 @@ def parse_useast1_missing_types(release, version, item_type):
122124
release_versions.sort(key=StrictVersion, reverse=True)
123125

124126
for release in release_versions:
127+
with open("all-cfn-versions.json", 'r') as source_json:
128+
version_date = json.loads(source_json.read())['us-east-1'][release]
129+
125130
# Release header
126131
release_markdown = []
127-
release_markdown.append(f"## [{release}](https://github.com/ScriptAutomate/aws-cfn-resource-specs/releases/tag/v{release})\n\n")
132+
release_markdown.append(f"## [{release}](https://github.com/ScriptAutomate/aws-cfn-resource-specs/releases/tag/v{release}) ({version_date})\n\n")
128133
#release_header.append(f"- [Full Git Diff](https://github.com/ScriptAutomate/aws-cfn-resource-specs/commit/{commit_id})\n")
129134
release_markdown.append(f"- [ChangeLog Source JSON](https://github.com/ScriptAutomate/aws-cfn-resource-specs/blob/master/changelogs/v{release.split('.')[0]}-changelog.json)\n")
130135
release_markdown.append(f" - Change source is a diff between [v{release}](https://github.com/ScriptAutomate/aws-cfn-resource-specs/releases/tag/v{release}) and [v{changelog_source[release]['ResourceSpecificationVersionOld']}](https://github.com/ScriptAutomate/aws-cfn-resource-specs/releases/tag/v{changelog_source[release]['ResourceSpecificationVersionOld']})\n\n")
@@ -157,9 +162,10 @@ def parse_useast1_missing_types(release, version, item_type):
157162
if len(value) > 1:
158163
release_markdown.extend(value)
159164

160-
# Release end note
161-
release_markdown.append("> **NOTE:** _Additional information related to Release History for CloudFormation specifications can be found in the official AWS CloudFormation User Guide documentation: [Release History](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/ReleaseHistory.html)_")
162-
163165

166+
changelog_markdown.extend(release_markdown)
164167
with open(changelog_md_file, 'w') as markdown_writer:
165-
markdown_writer.writelines(release_markdown)
168+
markdown_writer.writelines(changelog_markdown)
169+
170+
# Copy latest major changelog to repo root
171+
shutil.copy(changelog_md_file,Path.cwd().joinpath('CHANGELOG.md'))

0 commit comments

Comments
 (0)