Debian Codegraph @

test/integration/targets/ansible-galaxy-collection/tasks/publish.yml

raw
1 ---
2 - name: publish collection - {{ test_name }}
3 command: ansible-galaxy collection publish ansible_test-my_collection-1.0.0.tar.gz -s {{ test_name }} {{ galaxy_verbosity }}
4 args:
5 chdir: '{{ galaxy_dir }}'
6 register: publish_collection
7
8 - name: ensure we can download the published collection - {{ test_name }}
9 command: ansible-galaxy collection install -s {{ test_name }} -p "{{ remote_tmp_dir }}/publish/{{ test_name }}" ansible_test.my_collection==1.0.0 {{ galaxy_verbosity }}
10
11 - name: get result of publish collection - {{ test_name }}
12 uri:
13 url: '{{ test_api_server }}/v3/plugin/ansible/content/published/collections/index/ansible_test/my_collection/versions/1.0.0/'
14 return_content: yes
15 user: '{{ galaxy_user }}'
16 password: '{{ galaxy_password }}'
17 force_basic_auth: true
18 register: publish_collection_actual
19
20 - name: assert publish collection - {{ test_name }}
21 assert:
22 that:
23 - '"Collection has been successfully published and imported to the Galaxy server" in publish_collection.stdout'
24 - publish_collection_actual.json.collection.name == 'my_collection'
25 - publish_collection_actual.json.namespace.name == 'ansible_test'
26 - publish_collection_actual.json.version == '1.0.0'