Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

codebuild/codepipeline - fix regex for shippable resource_prefix #61783

Merged
merged 3 commits into from
Sep 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion test/integration/targets/aws_codebuild/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@
# IAM role names have to be less than 64 characters
# The 8 digit identifier at the end of resource_prefix helps determine during
# which test something was created and allows tests to be run in parallel
iam_role_name: "ansible-test-sts-{{ resource_prefix | regex_search('([0-9]+)$') }}-codebuild-service-role"
# Shippable resource_prefixes are in the format shippable-123456-123, so in those cases
# we need both sets of digits to keep the resource name unique
unique_id: "{{ resource_prefix | regex_search('(\\d+-?)(\\d+)$') }}"
iam_role_name: "ansible-test-sts-{{ unique_id }}-codebuild-service-role"
5 changes: 4 additions & 1 deletion test/integration/targets/aws_codepipeline/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ codepipeline_name: "{{ resource_prefix }}-test-codepipeline"
# IAM role names have to be less than 64 characters
# The 8 digit identifier at the end of resource_prefix helps determine during
# which test something was created and allows tests to be run in parallel
codepipeline_service_role_name: "ansible-test-sts-{{ resource_prefix | regex_search('([0-9]+)$') }}-codebuild-service-role"
# Shippable resource_prefixes are in the format shippable-123456-123, so in those cases
# we need both sets of digits to keep the resource name unique
unique_id: "{{ resource_prefix | regex_search('(\\d+-?)(\\d+)$') }}"
codepipeline_service_role_name: "ansible-test-sts-{{ unique_id }}-codepipeline-role"