forked from ansible/galaxy_ng
-
Notifications
You must be signed in to change notification settings - Fork 0
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 ansible hub collection testing
No-Issue
- Loading branch information
1 parent
2b87a18
commit 8b97635
Showing
6 changed files
with
85 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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
ah_host: http://localhost:55001 | ||
ah_username: iqe_admin | ||
ah_password: redhat | ||
ah_path_prefix: galaxy | ||
ah_artifact_runner_absolute_path: /home/runner/work/galaxy_ng/galaxy_ng/galaxy_collection/galaxy-galaxy-1.0.0.tar.gz | ||
ah_username: "iqe_admin" | ||
ah_password: "redhat" | ||
ah_validate_certs: "false" | ||
ah_artifact_runner_absolute_path: /home/runner/work/galaxy_ng/galaxy_ng/galaxy_collection/ansible-hub-1.0.0.tar.gz |