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

CI: add 2.14 tests, create ignore-2.15 to prevent CI failure #139

Merged
merged 12 commits into from
Oct 31, 2022
39 changes: 37 additions & 2 deletions .azure-pipelines/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@ stages:
- name: Units
test: 'devel/units/1'

- stage: Ansible_2_14
displayName: Sanity & Units 2.14
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
targets:
- name: Sanity
test: '2.14/sanity/1'
- name: Units
test: '2.14/units/1'

- stage: Ansible_2_13
displayName: Sanity & Units 2.13
dependsOn: []
Expand Down Expand Up @@ -142,10 +154,31 @@ stages:
# test: opensuse15
#- name: Ubuntu 18.04
# test: ubuntu1804
- name: Ubuntu 20.04
test: ubuntu2004
- name: Ubuntu 22.04
test: ubuntu2204
# Currently 20.04 is causing devel to fail. This maybe due to Ubuntu 20.04 running python
# 3.8, however, ansible-test requires 3.9+. This means ansible test spins up a controller
# and target container which is probably why rabbitmq_publish is not able to connect to
# rabbitmq on localhost.
#- name: Ubuntu 20.04
# test: ubuntu2004

- stage: Docker_2_14
displayName: Docker 2.14
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
testFormat: 2.14/linux/{0}/1
targets:
- name: Ubuntu 22.04
test: ubuntu2204
# Currently 20.04 is causing devel to fail. This maybe due to Ubuntu 20.04 running python
# 3.8, however, ansible-test requires 3.9+. This means ansible test spins up a controller
# and target container which is probably why rabbitmq_publish is not able to connect to
# rabbitmq on localhost.
#- name: Ubuntu 20.04
# test: ubuntu2004

- stage: Docker_2_13
displayName: Docker 2.13
Expand Down Expand Up @@ -307,12 +340,14 @@ stages:
condition: succeededOrFailed()
dependsOn:
- Ansible_devel
- Ansible_2_14
- Ansible_2_13
- Ansible_2_12
- Ansible_2_11
- Ansible_2_10
- Ansible_2_9
- Docker_devel
- Docker_2_14
- Docker_2_13
- Docker_2_12
- Docker_2_11
Expand Down
3 changes: 3 additions & 0 deletions changelogs/fragments/139_ci_add_stable_214.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
trivial:
- CI - Add stable-2.14 to AZP (https://github.com/ansible-collections/community.rabbitmq/issues/137).
6 changes: 3 additions & 3 deletions tests/integration/targets/lookup_rabbitmq/tasks/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- name: Test failure without pika installed
set_fact:
rabbit_missing_pika: "{{ lookup('community.rabbitmq.rabbitmq', url='amqp://guest:guest@192.168.250.1:5672/%2F', queue='hello', count=3) }}"
rabbit_missing_pika: "{{ lookup('community.rabbitmq.rabbitmq', url='amqp://guest:guest@localhost:5672/%2F', queue='hello', count=3) }}"
ignore_errors: yes
register: rabbitmq_missing_pika_error
delegate_to: localhost
Expand All @@ -17,7 +17,7 @@

- name: Test that giving an incorrect amqp protocol in URL will error
set_fact:
rabbitmq_test_protocol: "{{ lookup('community.rabbitmq.rabbitmq', url='zzzamqp://guest:guest@192.168.250.1:5672/%2F', queue='hello', count=3) }}"
rabbitmq_test_protocol: "{{ lookup('community.rabbitmq.rabbitmq', url='zzzamqp://guest:guest@localhost:5672/%2F', queue='hello', count=3) }}"
ignore_errors: yes
register: rabbitmq_protocol_error
delegate_to: localhost
Expand Down Expand Up @@ -53,7 +53,7 @@

- name: Test missing queue will error
set_fact:
rabbitmq_queue_protocol: "{{ lookup('community.rabbitmq.rabbitmq', url='amqp://guest:guest@192.168.250.1:5672/%2F') }}"
rabbitmq_queue_protocol: "{{ lookup('community.rabbitmq.rabbitmq', url='amqp://guest:guest@localhost:5672/%2F') }}"
ignore_errors: yes
register: rabbitmq_queue_error
delegate_to: localhost
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
listeners.ssl.default = 5671
listeners.tcp.1 = :::5672

ssl_options.cacertfile = /tls/ca_certificate.pem
ssl_options.certfile = /tls/server_certificate.pem
Expand Down
7 changes: 6 additions & 1 deletion tests/integration/targets/setup_rabbitmq/tasks/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,16 @@
state: present
update_cache: yes

# Ubuntu > 22.04 uses libssl version > 3
- name: Select version of libbssl to use
set_fact:
ssl_ver: "{{ 'libssl3' if ansible_distribution_major_version == '22' else 'libssl1.1' }}"

- name: Install RabbitMQ Erlang dependencies
apt:
name:
# Make sure libcrypto new enough for erlang
- libssl1.1
- "{{ ssl_ver }}"
# Base
- erlang-base
# TLS
Expand Down
2 changes: 2 additions & 0 deletions tests/sanity/ignore-2.15.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
tests/utils/shippable/check_matrix.py replace-urlopen
tests/utils/shippable/timing.py shebang