Skip to content

Commit

Permalink
Merge pull request ansible-collections#563 from jillr/remove_shippable
Browse files Browse the repository at this point in the history
Cleanup integration tests post-Zuul migration

SUMMARY
This collection has been operating on Zuul CI for some weeks now.

Remove shippable references
Use shorter unique_ids were resource_prefixes now exceed AWS resource length limits (zuul hostnames are longer than shippable was)
Cleanup for CI bugs surfaced in the course of this PR

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
shippable.yml
tests/
README.md
NOT-Depends-On: ansible/ansible-zuul-jobs#978

Reviewed-by: Mark Chappell <None>
Reviewed-by: Jill R <None>
  • Loading branch information
ansible-zuul[bot] authored Jul 2, 2021
2 parents 44a05b8 + 812af14 commit ad8b85f
Show file tree
Hide file tree
Showing 101 changed files with 94 additions and 634 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Community AWS Collection
[![Shippable build status](https://api.shippable.com/projects//5e5ed2ae0fcc0d0006d2c037badge?branch=main)](https://api.shippable.com/projects/i5e5ed2ae0fcc0d0006d2c037/badge?branch=main)
<!--[![Codecov](https://img.shields.io/codecov/c/github/ansible-collections/community.aws)](https://codecov.io/gh/ansible-collections/community.aws)-->

The Ansible Community AWS collection includes a variety of Ansible content to help automate the management of AWS instances. This collection is maintained by the Ansible community.

Expand Down
26 changes: 0 additions & 26 deletions shippable.yml

This file was deleted.

1 change: 0 additions & 1 deletion tests/integration/targets/aws_acm/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
unstable

cloud/aws
shippable/aws/group2

aws_acm_info
1 change: 0 additions & 1 deletion tests/integration/targets/aws_api_gateway/aliases
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
cloud/aws
shippable/aws/group1
1 change: 0 additions & 1 deletion tests/integration/targets/aws_codebuild/aliases
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
cloud/aws
shippable/aws/group1
7 changes: 2 additions & 5 deletions tests/integration/targets/aws_codebuild/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
# defaults file for aws_codebuild

# 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
# 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+)$') }}"
# we hash the resource_prefix to get a shorter, unique string
unique_id: "{{ resource_prefix | hash('md5') | truncate(8, True, '') }}"
iam_role_name: "ansible-test-sts-{{ unique_id }}-codebuild-service-role"
1 change: 0 additions & 1 deletion tests/integration/targets/aws_codecommit/aliases
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
cloud/aws
shippable/aws/group2
1 change: 0 additions & 1 deletion tests/integration/targets/aws_codepipeline/aliases
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
cloud/aws
shippable/aws/group1
13 changes: 4 additions & 9 deletions tests/integration/targets/aws_codepipeline/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
---
# defaults file for aws_codepipeline

codepipeline_name: "{{ resource_prefix }}-test-codepipeline"

unique_id: "{{ resource_prefix | hash('md5') }}"
codepipeline_name: "{{ unique_id }}-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
# 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"
# we hash the resource_prefix to get a shorter, unique string
codepipeline_service_role_name: "ansible-test-sts-{{ unique_id | truncate(6, True, '') }}-codepipeline-role"
1 change: 0 additions & 1 deletion tests/integration/targets/aws_elasticbeanstalk_app/aliases
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
cloud/aws
shippable/aws/group2
1 change: 0 additions & 1 deletion tests/integration/targets/aws_glue_connection/aliases
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
cloud/aws
shippable/aws/group2
1 change: 0 additions & 1 deletion tests/integration/targets/aws_inspector_target/aliases
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
cloud/aws
shippable/aws/group2
1 change: 0 additions & 1 deletion tests/integration/targets/aws_kms/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
unstable

cloud/aws
shippable/aws/group2

aws_kms_info
1 change: 0 additions & 1 deletion tests/integration/targets/aws_region_info/aliases
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
cloud/aws
shippable/aws/group4
1 change: 0 additions & 1 deletion tests/integration/targets/aws_s3_bucket_info/aliases
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
cloud/aws
shippable/aws/group2
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name_pattern: "testbucket-ansible-integration"
unique_id: "{{ resource_prefix | hash('md5') | truncate(24, True, '') }}"

testing_buckets:
- "{{ resource_prefix }}-{{ name_pattern }}-1"
- "{{ resource_prefix }}-{{ name_pattern }}-2"
- "{{ unique_id }}-{{ name_pattern }}-1"
- "{{ unique_id }}-{{ name_pattern }}-2"
1 change: 0 additions & 1 deletion tests/integration/targets/aws_ses_identity/aliases
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
cloud/aws
shippable/aws/group3
1 change: 0 additions & 1 deletion tests/integration/targets/aws_ses_identity_policy/aliases
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
cloud/aws
shippable/aws/group1
1 change: 0 additions & 1 deletion tests/integration/targets/aws_ses_rule_set/aliases
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
cloud/aws
shippable/aws/group2
4 changes: 2 additions & 2 deletions tests/integration/targets/aws_ses_rule_set/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
default_rule_set: "{{ resource_prefix }}-default-rule-set"
second_rule_set: "{{ resource_prefix }}-second-rule-set"
default_rule_set: "{{ resource_prefix | hash('md5') }}-default-rule-set"
second_rule_set: "{{ resource_prefix | hash('md5') }}-second-rule-set"

# See comment in obtain-lock.yaml for definitions of these variables
max_obtain_lock_attempts: 10
Expand Down
1 change: 0 additions & 1 deletion tests/integration/targets/aws_ssm_parameter_store/aliases
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
cloud/aws
shippable/aws/group4
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
cloud/aws
shippable/aws/group2

aws_step_functions_state_machine_execution
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# the random_num is generated in a set_fact task at the start of the testsuite
state_machine_name: "{{ resource_prefix }}_step_function_{{ random_num }}"
step_functions_role_name: "ansible-test-{{ resource_prefix }}-step-function"
state_machine_name: "{{ resource_prefix | hash('md5') }}_step_function_{{ random_num }}"
unique_id: "{{ resource_prefix | hash('md5') }}"
step_functions_role_name: "ansible-test-{{ unique_id }}-step-function"
execution_name: "{{ resource_prefix }}_sfn_execution"
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
unstable

cloud/aws
shippable/aws/group3
1 change: 0 additions & 1 deletion tests/integration/targets/cloudwatchlogs/aliases
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
cloud/aws
shippable/aws/group1

cloudwatchlogs_log_group
cloudwatchlogs_log_group_metric_filter
1 change: 0 additions & 1 deletion tests/integration/targets/connection_aws_ssm/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
unstable

cloud/aws
shippable/aws/group4

destructive
non_local
Expand Down
1 change: 0 additions & 1 deletion tests/integration/targets/ec2_eip/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
unstable

cloud/aws
shippable/aws/group2
4 changes: 2 additions & 2 deletions tests/integration/targets/ec2_eip/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# VPCs are identified by the CIDR. Don't hard code the CIDR. shippable will
# run multiple copies of the test concurrently (Python 2.x and Python 3.x)
# VPCs are identified by the CIDR. Don't hard code the CIDR. CI may
# run multiple copies of the test concurrently.
vpc_cidr: '10.{{ 256 | random(seed=resource_prefix) }}.0.0/16'
subnet_cidr: '10.{{ 256 | random(seed=resource_prefix) }}.42.0/24'
1 change: 0 additions & 1 deletion tests/integration/targets/ec2_launch_template/aliases
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
cloud/aws
shippable/aws/group3
1 change: 0 additions & 1 deletion tests/integration/targets/ec2_metric_alarm/aliases
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
cloud/aws
shippable/aws/group4
1 change: 0 additions & 1 deletion tests/integration/targets/ec2_scaling_policy/aliases
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
cloud/aws
shippable/aws/group3
1 change: 0 additions & 1 deletion tests/integration/targets/ec2_transit_gateway/aliases
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
cloud/aws
shippable/aws/group4

ec2_transit_gateway_info
1 change: 0 additions & 1 deletion tests/integration/targets/ec2_vpc_egress_igw/aliases
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
cloud/aws
shippable/aws/group2
1 change: 0 additions & 1 deletion tests/integration/targets/ec2_vpc_endpoint/aliases
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
cloud/aws
shippable/aws/group2

ec2_vpc_endpoint_info
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
cloud/aws
shippable/aws/group2
ec2_vpc_endpoint_service_info
1 change: 0 additions & 1 deletion tests/integration/targets/ec2_vpc_igw/aliases
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
cloud/aws
shippable/aws/group2

ec2_vpc_igw_info
1 change: 0 additions & 1 deletion tests/integration/targets/ec2_vpc_nacl/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
unstable

cloud/aws
shippable/aws/group2

ec2_vpc_nacl_info
1 change: 0 additions & 1 deletion tests/integration/targets/ec2_vpc_nat_gateway/aliases
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
cloud/aws
shippable/aws/group2
ec2_vpc_nat_gateway_info
1 change: 0 additions & 1 deletion tests/integration/targets/ec2_vpc_peer/aliases
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
cloud/aws
shippable/aws/group1

ec2_vpc_peering_info
1 change: 0 additions & 1 deletion tests/integration/targets/ec2_vpc_route_table/aliases
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
cloud/aws
shippable/aws/group4

ec2_vpc_route_table_info
1 change: 0 additions & 1 deletion tests/integration/targets/ec2_vpc_vgw/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
unstable

cloud/aws
shippable/aws/group2
1 change: 0 additions & 1 deletion tests/integration/targets/ec2_vpc_vpn_info/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
unstable

cloud/aws
shippable/aws/group3
1 change: 0 additions & 1 deletion tests/integration/targets/ecs_ecr/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
unstable

cloud/aws
shippable/aws/group2
1 change: 0 additions & 1 deletion tests/integration/targets/elasticache/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
unstable

cloud/aws
shippable/aws/group1

elasticache_subnet_group
1 change: 0 additions & 1 deletion tests/integration/targets/elb_application_lb/aliases
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
cloud/aws
shippable/aws/group2
1 change: 0 additions & 1 deletion tests/integration/targets/elb_application_lb_info/aliases
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
cloud/aws
shippable/aws/group2
1 change: 0 additions & 1 deletion tests/integration/targets/elb_classic_lb/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
unstable

cloud/aws
shippable/aws/group2

elb_classic_lb_info
1 change: 0 additions & 1 deletion tests/integration/targets/elb_target/aliases
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
cloud/aws
shippable/aws/group4

elb_target_group
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resource_shortprefix: 'ansible-test-{{ resource_prefix | regex_search("([0-9]+)$") }}'
lambda_role_name: '{{ resource_shortprefix }}-elb-target'
unique_id: "ansible-test-{{ resource_prefix | hash('md5') }}"
lambda_role_name: '{{ unique_id }}-elb-target'
#lambda_role_name: '{{ resource_prefix }}-elb-target'
lambda_name: '{{ resource_prefix }}-elb-target'
elb_target_group_name: '{{ resource_shortprefix }}-elb-tg'
lambda_name: '{{ unique_id }}-elb-target'
elb_target_group_name: "{{ unique_id | truncate(8, True, '') }}-elb-tg"
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
ec2_ami_name: 'amzn2-ami-hvm-2.0.20190612-x86_64-gp2'

resource_shortprefix: 'ansible-test-{{ resource_prefix | regex_search("([0-9]+)$") }}'
tg_name: "{{ resource_shortprefix }}-tg"
tg_tcpudp_name: "{{ resource_shortprefix }}-tgtcpudp"
lb_name: "{{ resource_shortprefix }}-lb"
unique_id: "ansible-test-{{ resource_prefix | hash('md5') | truncate(8, True, '') }}"
tg_name: "{{ unique_id }}-tg"
tg_tcpudp_name: "{{ unique_id }}-tgtcpudp"
lb_name: "{{ unique_id }}-lb"

healthy_state:
state: 'healthy'
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
- name: set up testing target group (type=ip)
elb_target_group:
state: present
#name: "{{ resource_shortprefix }}-tg"
#name: "{{ unique_id }}-tg"
name: "ansible-test-{{ resource_prefix | regex_search('([0-9]+)$') }}-tg"
health_check_port: 80
protocol: http
Expand All @@ -37,5 +37,5 @@
- name: Remove testing target group (type=ip)
elb_target_group:
state: absent
#name: "{{ resource_shortprefix }}-tg"
#name: "{{ unique_id }}-tg"
name: "ansible-test-{{ resource_prefix | regex_search('([0-9]+)$') }}-tg"
1 change: 0 additions & 1 deletion tests/integration/targets/iam_saml_federation/aliases
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
cloud/aws
shippable/aws/group4
1 change: 0 additions & 1 deletion tests/integration/targets/kinesis_stream/aliases
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
cloud/aws
shippable/aws/group2
1 change: 0 additions & 1 deletion tests/integration/targets/lambda/aliases
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
cloud/aws
shippable/aws/group2

execute_lambda
lambda_info
9 changes: 3 additions & 6 deletions tests/integration/targets/lambda/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
---
# defaults file for lambda integration test
lambda_function_name: '{{ resource_prefix }}'
# 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
# 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+)$') }}"
# we hash the resource_prefix to get a shorter, unique string
unique_id: "{{ resource_prefix | hash('md5') }}"
lambda_function_name: '{{ unique_id }}'
lambda_role_name: 'ansible-test-{{ unique_id }}-lambda'
30 changes: 0 additions & 30 deletions tests/integration/targets/lambda/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -358,21 +358,6 @@
assert:
that:
- result is not failed
- name: wait for async job 1
async_status: jid={{ async_1.ansible_job_id }}
register: job_result
until: job_result is finished
retries: 30
- name: wait for async job 2
async_status: jid={{ async_1.ansible_job_id }}
register: job_result
until: job_result is finished
retries: 30
- name: wait for async job 3
async_status: jid={{ async_3.ansible_job_id }}
register: job_result
until: job_result is finished
retries: 30
- name: parallel lambda deletion 1/4
lambda:
name: '{{lambda_function_name}}_1'
Expand Down Expand Up @@ -404,21 +389,6 @@
assert:
that:
- result is not failed
- name: wait for async job 1
async_status: jid={{ async_1.ansible_job_id }}
register: job_result
until: job_result is finished
retries: 30
- name: wait for async job 2
async_status: jid={{ async_1.ansible_job_id }}
register: job_result
until: job_result is finished
retries: 30
- name: wait for async job 3
async_status: jid={{ async_3.ansible_job_id }}
register: job_result
until: job_result is finished
retries: 30

always:
- name: ensure function is absent at end of test
Expand Down
1 change: 0 additions & 1 deletion tests/integration/targets/lambda_alias/aliases
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
cloud/aws
shippable/aws/group3
9 changes: 3 additions & 6 deletions tests/integration/targets/lambda_alias/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
---
# defaults file for lambda integration test
lambda_function_name: '{{ resource_prefix }}'
# 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
# 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+)$') }}"
# we hash the resource_prefix to get a shorter, unique string
unique_id: "{{ resource_prefix | hash('md5') }}"
lambda_function_name: 'ansible-test-{{ unique_id }}'
lambda_role_name: 'ansible-test-{{ unique_id }}-lambda'
Loading

0 comments on commit ad8b85f

Please sign in to comment.