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

Collection is published to Automation Hub #56

Open
2 tasks
izgeri opened this issue Jan 25, 2021 · 2 comments
Open
2 tasks

Collection is published to Automation Hub #56

izgeri opened this issue Jan 25, 2021 · 2 comments

Comments

@izgeri
Copy link
Contributor

izgeri commented Jan 25, 2021

At current, this collection is listed in Automation Hub but does not automatically update there with new releases; new releases are only automatically published to Ansible Galaxy.

In this card, we want to update our pipeline to also auto-publish to Automation Hub. We should probably also add a section to the README about installing from automation hub.

References:

AC:

  • Tag builds publish to Automation Hub
  • README explains how to install from Galaxy OR Automation Hub (it is left to the user to decide which to use)
@izgeri
Copy link
Contributor Author

izgeri commented Feb 11, 2021

Note: I tried to manually upload v1.1.0 to automation hub, but the upload failed:

Importing with galaxy-importer 0.2.14 

Invalid collection metadata. Each author in 'authors' list must not be greater than 64 characters

  File "/venv/lib64/python3.6/site-packages/rq/worker.py", line 936, in perform_job
    rv = job.perform()
  File "/venv/lib64/python3.6/site-packages/rq/job.py", line 684, in perform
    self._result = self._execute()
  File "/venv/lib64/python3.6/site-packages/rq/job.py", line 690, in _execute
    return self.func(*self.args, **self.kwargs)
  File "/app/galaxy_ng/app/tasks/publishing.py", line 47, in import_and_move_to_staging
    expected_version=kwargs['expected_version'],
  File "/venv/lib64/python3.6/site-packages/pulp_ansible/app/tasks/collections.py", line 149, in import_collection
    artifact_file, filename=filename, logger=user_facing_logger
  File "/venv/lib64/python3.6/site-packages/galaxy_importer/collection.py", line 57, in import_collection
    return _import_collection(file, filename, logger, cfg)
  File "/venv/lib64/python3.6/site-packages/galaxy_importer/collection.py", line 77, in _import_collection
    data = CollectionLoader(extract_dir, filename, cfg=cfg, logger=logger).load()
  File "/venv/lib64/python3.6/site-packages/galaxy_importer/collection.py", line 142, in load
    self._load_collection_manifest()
  File "/venv/lib64/python3.6/site-packages/galaxy_importer/collection.py", line 178, in _load_collection_manifest
    raise exc.ManifestValidationError(str(e))

izgeri pushed a commit that referenced this issue Feb 11, 2021
In an effort to publish this integration to Ansible Hub for #56, we attempted
to upload our latest release and failed with the error:

> Invalid collection metadata. Each author in 'authors' list must not be greater
> than 64 characters

This commit fixes the error and adds a check to our pipeline to ensure that
we don't only discover galaxy-importer errors on publish.

This commit also updates the pipeline to always build the release, and not just
on tag or master branch builds, so that we can discover validation errors in
branch builds.
@izgeri
Copy link
Contributor Author

izgeri commented Feb 11, 2021

Note that in #59 we suggest a fix to add pipeline validation that will enable us to successfully publish the collection to AH - it still outputs warnings (though it is not yet failing the build at this time):

[2021-02-11T22:21:58.095Z] WARNING: roles/conjur_host_identity/tasks/summon-conjur.yml:2: [E208] File permissions unset or incorrect
[2021-02-11T22:21:58.095Z] ERROR: WARNING  Listing 1 violation(s) that are fatal
[2021-02-11T22:21:58.095Z] ERROR: You can skip specific rules or tags by adding them to your configuration file:
[2021-02-11T22:21:58.095Z] ERROR: 
[2021-02-11T22:21:58.095Z] ERROR: ┌──────────────────────────────────────────────────────────────────────────────┐
[2021-02-11T22:21:58.095Z] ERROR: │ # .ansible-lint                                                              │
[2021-02-11T22:21:58.095Z] ERROR: │ warn_list:  # or 'skip_list' to silence them completely                      │
[2021-02-11T22:21:58.095Z] ERROR: │   - '208'  # File permissions unset or incorrect                             │
[2021-02-11T22:21:58.095Z] ERROR: │   - experimental  # all rules tagged as experimental                         │
[2021-02-11T22:21:58.095Z] ERROR: └──────────────────────────────────────────────────────────────────────────────┘
[2021-02-11T22:21:58.095Z] Loading lookup conjur_variable
[2021-02-11T22:21:58.095Z] Loading python dependencies
[2021-02-11T22:21:58.095Z] Collection loading complete
[2021-02-11T22:21:58.095Z] Importer processing completed successfully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant