-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from no10ds/feature/improve-release
Improve the release process, update docs, add terraform outputs
- Loading branch information
Showing
10 changed files
with
115 additions
and
41 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
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 |
---|---|---|
|
@@ -21,20 +21,20 @@ You will need the ability to run `Batect`, the requirements for which are listed | |
|
||
#### Make the infrastructure changes | ||
|
||
A v7.0.0 infrastructure changes need to be applied to your rAPId instance. | ||
The v7 infrastructure changes need to be applied to your rAPId instance. | ||
|
||
1. Add the `layers` variable to the rAPId cluster module. `layers` will be a list of the layers you wish to use in your rAPId instance. You can omit this if you just want to use the `default` layer. | ||
2. Change the rAPId module source to: | ||
`[email protected]:no10ds/rapid.git//infrastructure/modules/rapid` | ||
3. Update both the application_version and ui_version variables to `v7.0.3` | ||
3. Update both the application_version and ui_version variables to `v7.0.4` | ||
|
||
Apply these changes | ||
Apply these changes. | ||
|
||
#### Clone the repo | ||
|
||
To do this, run: | ||
|
||
`git clone -b v7.0.3 [email protected]:no10ds/rapid.git` | ||
`git clone -b v7.0.4 [email protected]:no10ds/rapid.git` | ||
|
||
#### Set your environment variables | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
output "athena_workgroup_name" { | ||
value = module.data_workflow.athena_workgroup_name | ||
description = "The name of the Query workgroup for Athena" | ||
} | ||
|
||
output "catalogue_db_name" { | ||
value = module.data_workflow.catalogue_db_name | ||
description = "The name of the Glue Catalogue database" | ||
} |
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,63 @@ | ||
import re | ||
import argparse | ||
|
||
|
||
def create_changelog(): | ||
with open("./docs/changelog.md", "r") as changelog_file: | ||
changelog_lines = changelog_file.readlines() | ||
|
||
parsed_lines = [] | ||
|
||
adding = False | ||
|
||
for line in changelog_lines: | ||
if re.match( | ||
# Match for the release version number e.g. ## v7.0.0 | ||
f"##\s+v\d+\.\d+\.\d+", # noqa: F541, W605 | ||
line, | ||
): | ||
adding = not adding | ||
if adding: | ||
parsed_lines.append(line) | ||
|
||
if not parsed_lines: | ||
raise Exception( | ||
"It looks like there is no release information in the changelog. Please check it." | ||
) | ||
else: | ||
with open("latest_release_changelog.md", "w+") as latest_changelog: | ||
latest_changelog.writelines(parsed_lines) | ||
|
||
|
||
def ask_yes_no_question(question): | ||
while True: | ||
answer = input(f"{question} (yes/no): ").strip().lower() | ||
if answer == "yes" or answer == "y": | ||
return True | ||
elif answer == "no" or answer == "n": | ||
print("Please fix this before continuing.") | ||
exit(1) | ||
else: | ||
print("Please answer yes or no.") | ||
|
||
|
||
def check(): | ||
ask_yes_no_question("Have you updated the application and ui version in Terraform?") | ||
ask_yes_no_question("Have you updated the changelog for this release?") | ||
|
||
|
||
if __name__ == "__main__": | ||
parser = argparse.ArgumentParser() | ||
|
||
parser.add_argument( | ||
"--operation", | ||
help="The operation to carry out", | ||
required=True, | ||
choices=["check", "create-changelog"], | ||
) | ||
args = parser.parse_args() | ||
match args.operation: | ||
case "create-changelog": | ||
create_changelog() | ||
case "check": | ||
check() |