-
Notifications
You must be signed in to change notification settings - Fork 397
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
[PR #1221/20f2afd7 backport][stable-3] aws_codebuild - Add resource_tags parameter and deprecate tags #1224
Merged
softwarefactory-project-zuul
merged 1 commit into
stable-3
from
patchback/backports/stable-3/20f2afd75e506d90a72fb27e4cba3bb09f707494/pr-1221
Jun 7, 2022
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
minor_changes: | ||
- aws_codebuild - add support for ``purge_tags`` parameter | ||
(https://github.com/ansible-collections/community.aws/pull/1221). | ||
- aws_codebuild - the ``source`` and ``artifacts`` parameters are now optional unless creating a new project | ||
(https://github.com/ansible-collections/community.aws/pull/1221). | ||
- aws_codebuild - add the ``resource_tags`` parameter which takes the dictionary format for tags instead of the list of dictionaries format | ||
(https://github.com/ansible-collections/community.aws/pull/1221). | ||
- aws_codebuild - add the ``resource_tags`` return value which returns the standard dictionary format for tags instead of the list of | ||
dictionaries format | ||
(https://github.com/ansible-collections/community.aws/pull/1221). | ||
|
||
bugfixes: | ||
- aws_codebuild - fix bug where the result may be spuriously flagged as ``changed`` when multiple tags were set on the project | ||
(https://github.com/ansible-collections/community.aws/pull/1221). | ||
|
||
deprecated_features: | ||
- aws_codebuild - The ``tags`` parameter currently uses a non-standard format and has been deprecated. In release 6.0.0 this parameter will | ||
accept a simple key/value pair dictionary instead of the current list of dictionaries. It is recommended to migrate to using the | ||
resource_tags parameter which already accepts the simple dictionary format | ||
(https://github.com/ansible-collections/community.aws/pull/1221). |
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
125 changes: 125 additions & 0 deletions
125
tests/integration/targets/aws_codebuild/tasks/description.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,125 @@ | ||
- name: Tests relating to setting description on aws_codebuild | ||
vars: | ||
description_one: 'a Description - {{ resource_prefix }}' | ||
description_two: 'Another_Description - {{ resource_prefix }}' | ||
# Mandatory settings | ||
module_defaults: | ||
community.aws.aws_codebuild: | ||
name: '{{ project_name }}' | ||
# community.aws.aws_codebuild_info: | ||
# name: '{{ project_name }}' | ||
block: | ||
|
||
# - name: test setting description aws_codebuild (check mode) | ||
# aws_codebuild: | ||
# description: '{{ description_one }}' | ||
# register: update_result | ||
# check_mode: yes | ||
# - name: assert that update succeeded | ||
# assert: | ||
# that: | ||
# - update_result is changed | ||
|
||
- name: test setting description aws_codebuild | ||
aws_codebuild: | ||
description: '{{ description_one }}' | ||
register: update_result | ||
- name: assert that update succeeded | ||
assert: | ||
that: | ||
- update_result is changed | ||
- update_result.project.description == description_one | ||
|
||
# - name: test setting description aws_codebuild - idempotency (check mode) | ||
# aws_codebuild: | ||
# description: '{{ description_one }}' | ||
# register: update_result | ||
# check_mode: yes | ||
# - name: assert that update succeeded | ||
# assert: | ||
# that: | ||
# - update_result is not changed | ||
|
||
- name: test setting description aws_codebuild - idempotency | ||
aws_codebuild: | ||
description: '{{ description_one }}' | ||
register: update_result | ||
- name: assert that update succeeded | ||
assert: | ||
that: | ||
- update_result is not changed | ||
- update_result.project.description == description_one | ||
|
||
### | ||
|
||
# - name: test updating description on aws_codebuild (check mode) | ||
# aws_codebuild: | ||
# description: '{{ description_two }}' | ||
# register: update_result | ||
# check_mode: yes | ||
# - name: assert that update succeeded | ||
# assert: | ||
# that: | ||
# - update_result is changed | ||
|
||
- name: test updating description on aws_codebuild | ||
aws_codebuild: | ||
description: '{{ description_two }}' | ||
register: update_result | ||
- name: assert that update succeeded | ||
assert: | ||
that: | ||
- update_result is changed | ||
- update_result.project.description == description_two | ||
|
||
# - name: test updating description on aws_codebuild - idempotency (check mode) | ||
# aws_codebuild: | ||
# description: '{{ description_two }}' | ||
# register: update_result | ||
# check_mode: yes | ||
# - name: assert that update succeeded | ||
# assert: | ||
# that: | ||
# - update_result is not changed | ||
|
||
- name: test updating description on aws_codebuild - idempotency | ||
aws_codebuild: | ||
description: '{{ description_two }}' | ||
register: update_result | ||
- name: assert that update succeeded | ||
assert: | ||
that: | ||
- update_result is not changed | ||
- update_result.project.description == description_two | ||
|
||
# ### | ||
# | ||
# - name: test that aws_codebuild_info returns the description | ||
# aws_codebuild_info: | ||
# register: tag_info | ||
# - name: assert description present | ||
# assert: | ||
# that: | ||
# - tag_info.project.description == description_two | ||
# | ||
# ### | ||
|
||
# - name: test no description param aws_codebuild (check mode) | ||
# aws_codebuild: {} | ||
# register: update_result | ||
# check_mode: yes | ||
# - name: assert no change | ||
# assert: | ||
# that: | ||
# - update_result is not changed | ||
# - update_result.project.description == description_two | ||
|
||
|
||
- name: test no description param aws_codebuild | ||
aws_codebuild: {} | ||
register: update_result | ||
- name: assert no change | ||
assert: | ||
that: | ||
- update_result is not changed | ||
- update_result.project.description == description_two |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@markuman @tremble But what about these params here? version_added: is 4.0.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ups
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll update that and backport if/when this is merged.