# Releasing a collection with Zuul ###### tags: `Documentation` Note: Just a dumping ground of a conversation on matrix. It's possible we need to add this to the docs at some point. You can use Zuul to automate the release of your collection to Galaxy. This is available for collections included in the Ansible package, as well as collections that are not included in Ansible. The inclusion process is describe [here](https://github.com/ansible/zuul-config#enable-the-github-application). In projects.yaml you only need the publish-to-automation-hub job (e.g: https://github.com/ansible/zuul-config/blob/master/zuul.d/projects.yaml#L252). Also, if the collection is in the ansible-collections namespace, you can skip the PR2, the job is already automagically enabled. ## Troubleshooting Zuul CI errors You may see CI errors such as: ``` Running sanity test "validate-modules" Run command: /root/.ansible/test/venv/sanity.validate-modules/3.9/5e1e301c/bin/python /root/ansible/test/lib/ansible_test/_util/controller/tools/collection_detail.py /root/ansible_collections/adhawkins/borgbase Run command: /root/.ansible/test/venv/sanity.validate-modules/3.9/5e1e301c/bin/python /root/ansible/test/lib/ansible_test/_util/controller/sanity/validate-modules/validate-modules --format json --arg-spec plugins/modules/borgbase_repo.py plugins/modules/borgbase_ssh.py --collection ansible_collections/adhawkins/borgbase --collection-version 1.0.0 ERROR: Command "/root/.ansible/test/venv/sanity.validate-modules/3.9/5e1e301c/bin/python /root/ansible/test/lib/ansible_test/_util/controller/sanity/validate-modules/validate-modules --format json --arg-spec plugins/modules/borgbase_repo.py plugins/modules/borgbase_ssh.py --collection ansible_collections/adhawkins/borgbase --collection-version 1.0.0" returned exit status 1. >>> Standard Error ``` To troubleshoot this problem: 1. Note the test that is failing - validate-modules 2. Note the module or plugin it is failing at 3. Check the stack trace in the linked run output to determine where the failure is. For `validate-modules`, this will list something like: ``_doc, errors, traces = parse_yaml(doc_info['EXAMPLES']['value'],`` This tells you the problem is in the EXAMPLES block of the module DOCUMENTATION block. 4. Optionally, run the failed test locally to get more information. `ansible-test sanity --docker --color yes -v --test validate-modules`. ## Tests and checks before publishing a collection * - run sanity tests and fix errors (need list here) * `ansible-test sanity --docker` and fix any errors. * - ensure your collection is in the appropriate directory and folder structure (need details)