-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update CI workflow for collection testing (#2278)
Update ci workflow for ansible hub collection testing No-Issue (cherry picked from commit 96c2210)
- Loading branch information
1 parent
e0d9570
commit e3fe791
Showing
7 changed files
with
115 additions
and
101 deletions.
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
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 |
---|---|---|
|
@@ -4,88 +4,79 @@ | |
connection: local | ||
gather_facts: false | ||
collections: | ||
- galaxy.galaxy | ||
- ansible.hub | ||
|
||
pre_tasks: | ||
- name: Include variables | ||
ansible.builtin.include_vars: | ||
file: vars.yml | ||
|
||
tasks: | ||
- name: Authenticate and retrieve API token | ||
ah_token: | ||
ah_host: "{{ ah_host }}" | ||
ah_username: "{{ ah_username }}" | ||
ah_password: "{{ ah_password }}" | ||
ah_path_prefix: "{{ ah_path_prefix }}" | ||
|
||
- name: Create the automate namespace | ||
ah_namespace: | ||
ansible.hub.ah_namespace: | ||
name: automate | ||
company: Automator Inc. | ||
email: [email protected] | ||
description: The namespace for all things automation | ||
ah_host: "{{ ah_host }}" | ||
ah_token: "{{ ah_token }}" | ||
ah_path_prefix: "{{ ah_path_prefix }}" | ||
ah_username: "{{ ah_username }}" | ||
ah_password: "{{ ah_password }}" | ||
validate_certs: "{{ ah_validate_certs }}" | ||
|
||
- name: Rename automate namespace to automator | ||
ah_namespace: | ||
ansible.hub.ah_namespace: | ||
name: automate | ||
new_name: automator | ||
ah_host: "{{ ah_host }}" | ||
ah_token: "{{ ah_token }}" | ||
ah_path_prefix: "{{ ah_path_prefix }}" | ||
ah_username: "{{ ah_username }}" | ||
ah_password: "{{ ah_password }}" | ||
validate_certs: "{{ ah_validate_certs }}" | ||
|
||
- name: Delete the automator namespace | ||
ah_namespace: | ||
ansible.hub.ah_namespace: | ||
state: absent | ||
name: automator | ||
ah_host: "{{ ah_host }}" | ||
ah_token: "{{ ah_token }}" | ||
ah_path_prefix: "{{ ah_path_prefix }}" | ||
ah_username: "{{ ah_username }}" | ||
ah_password: "{{ ah_password }}" | ||
validate_certs: "{{ ah_validate_certs }}" | ||
|
||
- name: Ensure there is a galaxy namespace | ||
ah_namespace: | ||
name: galaxy | ||
- name: Ensure there is a ansible namespace | ||
ansible.hub.ah_namespace: | ||
name: ansible | ||
ah_host: "{{ ah_host }}" | ||
ah_token: "{{ ah_token }}" | ||
ah_path_prefix: "{{ ah_path_prefix }}" | ||
ah_username: "{{ ah_username }}" | ||
ah_password: "{{ ah_password }}" | ||
validate_certs: "{{ ah_validate_certs }}" | ||
state: present | ||
|
||
- name: Upload the galaxy collection to the galaxy namespace | ||
ah_collection: | ||
namespace: galaxy | ||
name: galaxy | ||
- name: Upload the ansible hub collection to the ansible namespace | ||
ansible.hub.ah_collection_upload: | ||
path: "{{ ah_artifact_runner_absolute_path }}" | ||
version: "1.0.0" | ||
ah_host: "{{ ah_host }}" | ||
ah_token: "{{ ah_token }}" | ||
ah_path_prefix: "{{ ah_path_prefix }}" | ||
ah_username: "{{ ah_username }}" | ||
ah_password: "{{ ah_password }}" | ||
validate_certs: "{{ ah_validate_certs }}" | ||
|
||
- name: Approve the galaxy collection | ||
ah_approval: | ||
namespace: galaxy | ||
name: galaxy | ||
- name: Approve the ansible hub collection | ||
ansible.hub.ah_approval: | ||
namespace: ansible | ||
name: hub | ||
version: "1.0.0" | ||
ah_host: "{{ ah_host }}" | ||
ah_token: "{{ ah_token }}" | ||
ah_path_prefix: "{{ ah_path_prefix }}" | ||
ah_username: "{{ ah_username }}" | ||
ah_password: "{{ ah_password }}" | ||
validate_certs: "{{ ah_validate_certs }}" | ||
async: 600 | ||
poll: 10 | ||
|
||
- name: Delete the galaxy collection | ||
ah_collection: | ||
- name: Delete the ansible hub collection | ||
ansible.hub.ah_collection: | ||
state: absent | ||
namespace: galaxy | ||
name: galaxy | ||
namespace: ansible | ||
name: hub | ||
version: "1.0.0" | ||
ah_host: "{{ ah_host }}" | ||
ah_token: "{{ ah_token }}" | ||
ah_path_prefix: "{{ ah_path_prefix }}" | ||
|
||
- name: Deauthenticate | ||
ah_token: | ||
state: absent | ||
ah_host: "{{ ah_host }}" | ||
ah_token: "{{ ah_token }}" | ||
ah_path_prefix: "{{ ah_path_prefix }}" | ||
ah_username: "{{ ah_username }}" | ||
ah_password: "{{ ah_password }}" | ||
validate_certs: "{{ ah_validate_certs }}" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
authors: | ||
- Sean Sullivan @sean-m-sullivan | ||
- Tom Page @Tompage1994 | ||
- David Danielsson @djdanielsson | ||
dependencies: {} | ||
description: Ansible content that interacts with the Ansible Automation Hub or Galaxy NG API. | ||
documentation: https://github.com/redhat-cop/ah_configuration/blob/master/README.md | ||
license: | ||
- GPL-3.0-only | ||
namespace: {{ collection_namespace }} | ||
name: {{ collection_name }} | ||
version: {{ collection_version }} | ||
readme: README.md | ||
repository: {{ collection_repo }} | ||
issues: {{ collection_repo }}/issues | ||
tags: | ||
- cloud | ||
- infrastructure | ||
- galaxy | ||
- ansible | ||
- galaxy | ||
- automation | ||
build_ignore: | ||
- tools | ||
- setup.cfg | ||
- galaxy.yml.j2 | ||
- template_galaxy.yml | ||
- '*.tar.gz' | ||
... |
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
Oops, something went wrong.