Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
XOmniverse committed Dec 13, 2024
1 parent 696d776 commit 030f52b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions tools/cloudformation-template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,5 @@ resource "aws_cloudformation_stack" "FlexeraAutomationAccessRole" {
## For Maintainers

New rolling releases are created automatically by the `tools/cloudformation-template/aws_cft_generator.rb` script. This script runs automatically via GitHub Actions whenever a change is made to the master branch. This script uses the permissions file `data/policy_permissions_list/master_policy_permissions_list.json` to obtain the information needed to generate the CloudFormation Template. This file, in turn, is sourced through its own automation that scrapes policy template README files.

New production releases are created automatically by the `tools/cloudformation-template/aws_cft_updater.rb` script. This script runs on the first of every month and checks whether the most recent rolling release has any changes compared to the current production release. If changes are present, a new minor version is created and stored in the `tools/cloudformation-template/releases` directory, and the `tools/cloudformation-template/FlexeraAutomationPolicies.template` file is updated to match the new release.
4 changes: 2 additions & 2 deletions tools/cloudformation-template/aws_cft_updater.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def files_match?(file1, file2)
most_recent_file, most_recent_version = most_recent
most_recent_path = File.join(release_dir, most_recent_file)

new_patch_version = (Integer(most_recent_version.split(".")[2]) + 1).to_s
new_version = most_recent_version.split(".")[0] + "." + most_recent_version.split(".")[1] + "." + new_patch_version
new_minor_version = (Integer(most_recent_version.split(".")[1]) + 1).to_s
new_version = most_recent_version.split(".")[0] + "." + new_minor_version + ".0"
new_file_path = release_dir + "/FlexeraAutomationPolicies_v" + new_version + ".template"

FileUtils.cp(rolling_path, new_file_path, verbose: true)
Expand Down

0 comments on commit 030f52b

Please sign in to comment.