Skip to content

Commit

Permalink
Documentation and GitHub Actions Cleanup (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
herve4m authored Aug 5, 2024
1 parent bb26801 commit 94dc8f5
Show file tree
Hide file tree
Showing 111 changed files with 377 additions and 11,652 deletions.
3 changes: 2 additions & 1 deletion .ansible-lint
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
exclude_paths:
- tests/sample_manual_test.yml
- changelogs
supported_ansible_also:
- "2.14"
32 changes: 0 additions & 32 deletions .github/actions/fix-crun/action.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/files/galaxy.yml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
namespace: {{ collection_namespace }}
name: {{ collection_name }}
version: {{ collection_version }}
readme: README.md
authors:
- Hervé Quatremain <herve.quatremain@redhat.com>
- Tom Page <tpage@redhat.com>
description: Ansible modules to manage Quay Container Registry installations
license:
- GPL-3.0-or-later
tags:
- application
- quay
- registry
repository: {{ collection_repo }}

# The URL to any online docs
documentation: {{ collection_repo }}

# The URL to the home page of the collection/project
homepage: {{ collection_repo }}

# The URL to the collection issue tracker
issues: {{ collection_repo }}/issues
...
4 changes: 2 additions & 2 deletions .github/workflows/ansible-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
working-directory: ./ansible_collections/infra/quay_configuration/tests

- name: Deploy Quay
run: docker-compose up -d
run: docker compose up -d
working-directory: ./ansible_collections/infra/quay_configuration/tests

- uses: actions/setup-python@v5
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
--group-by version
working-directory: ./ansible_collections/infra/quay_configuration

# See the repots at https://codecov.io/gh/infra/quay_configuration
# See the reports at https://codecov.io/gh/infra/quay_configuration
- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false
Expand Down
36 changes: 0 additions & 36 deletions .github/workflows/ansible-sanity.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/doc-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Linting Collection Documentation

on:
push:
branches:
- main
pull_request:

jobs:
documentation-linting:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install required packages
run: pip install -Iv ansible-core antsibull-docs

- uses: actions/checkout@v4

- name: Lint documentation
run: antsibull-docs lint-collection-docs --plugin-docs .
...
22 changes: 22 additions & 0 deletions .github/workflows/pre-commit-sanity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
# This workflow runs pre-commit, which executes Ansible and YAML linting.
# See .pre-commit-config.yaml for more details.
# The workflow also runs Ansible sanity tests
name: Pre-commit and Sanity Tests

on:
push:
branches:
- main
pull_request:

jobs:
pre-commit_and_sanity:
uses:
redhat-cop/ansible_collections_tooling/.github/workflows/pre_commit_and_sanity.yml@main
with:
collection_namespace: infra
collection_name: quay_configuration
collection_version: 2.0.0
collection_repo: https://github.com/redhat-cop/quay_configuration
...
26 changes: 0 additions & 26 deletions .github/workflows/pre-commit.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/update-pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Update pre-commit Configuration

on:
schedule:
- cron: "4 2 * * 0"

jobs:
pre-commit:
uses:
redhat-cop/ansible_collections_tooling/.github/workflows/update_precommit.yml@main
with:
github_actor: ${{ github.actor }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
...
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repos:
types:
- yaml
- repo: https://github.com/psf/black
rev: 24.4.2
rev: 24.8.0
hooks:
- id: black
name: black
Expand Down
6 changes: 6 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,10 @@ rules:
- 'on'
- 'true'
- 'false'
comments:
min-spaces-from-content: 1
comments-indentation: disable
octal-values:
forbid-implicit-octal: true
forbid-explicit-octal: true
...
73 changes: 43 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,65 @@
# Quay Container Registry Collection for Ansible

[![Code Linting](https://github.com/redhat-cop/quay_configuration/actions/workflows/pre-commit.yml/badge.svg)](https://github.com/redhat-cop/quay_configuration/actions/workflows/pre-commit.yml)
[![Sanity Test](https://github.com/redhat-cop/quay_configuration/actions/workflows/ansible-sanity.yml/badge.svg)](https://github.com/redhat-cop/quay_configuration/actions/workflows/ansible-sanity.yml)
[![Sanity Test](https://github.com/redhat-cop/quay_configuration/actions/workflows/pre-commit-sanity.yml/badge.svg)](https://github.com/redhat-cop/quay_configuration/actions/workflows/pre-commit-sanity.yml)
[![Integration Test](https://github.com/redhat-cop/quay_configuration/actions/workflows/ansible-integration.yml/badge.svg)](https://github.com/redhat-cop/quay_configuration/actions/workflows/ansible-integration.yml)


The collection provides modules for managing your Quay Container Registry deployment.

## Included Content

The modules have been tested against versions 3.10, 3.11, and 3.12 of Quay Container Registry.
After you install the collection, use the `ansible-doc` command to access the collection documentation.

### Modules

Run the `ansible-doc -l infra.quay_configuration` command to list the modules that the collection provides.
For accessing the documentation of a module, use the `ansible-doc infra.quay_configuration.<module-name>` command.

You can also access the documentation from [Ansible Galaxy](https://galaxy.ansible.com/ui/repo/published/infra/quay_configuration/docs/).

Name | Description
---: | :---
[quay_api_token](https://github.com/redhat-cop/quay_configuration/blob/main/docs/quay_api_token_module.rst) | Create OAuth access tokens for accessing the Quay Container Registry API
[quay_application](https://github.com/redhat-cop/quay_configuration/blob/main/docs/quay_application_module.rst) | Manage Quay Container Registry applications
[quay_default_perm](https://github.com/redhat-cop/quay_configuration/blob/main/docs/quay_default_perm_module.rst) | Manage Quay Container Registry default repository permissions
[quay_docker_token](https://github.com/redhat-cop/quay_configuration/blob/main/docs/quay_docker_token_module.rst) | Manage tokens for accessing Quay Container Registry repositories
[quay_first_user](https://github.com/redhat-cop/quay_configuration/blob/main/docs/quay_first_user_module.rst) | Create the first user account
[quay_layer_info](https://github.com/redhat-cop/quay_configuration/blob/main/docs/quay_layer_info_module.rst) | Gather information about image layers in Quay Container Registry
[quay_manifest_label](https://github.com/redhat-cop/quay_configuration/blob/main/docs/quay_manifest_label_module.rst) | Manage Quay Container Registry image manifest labels
[quay_manifest_label_info](https://github.com/redhat-cop/quay_configuration/blob/main/docs/quay_manifest_label_info_module.rst) | Gather information about manifest labels in Quay Container Registry
[quay_message](https://github.com/redhat-cop/quay_configuration/blob/main/docs/quay_message_module.rst) | Manage Quay Container Registry global messages
[quay_notification](https://github.com/redhat-cop/quay_configuration/blob/main/docs/quay_notification_module.rst) | Manage Quay Container Registry repository notifications
[quay_organization](https://github.com/redhat-cop/quay_configuration/blob/main/docs/quay_organization_module.rst) | Manage Quay Container Registry organizations
[quay_proxy_cache](https://github.com/redhat-cop/quay_configuration/blob/main/docs/quay_proxy_cache_module.rst) | Manage Quay Container Registry proxy cache configurations
[quay_quota](https://github.com/redhat-cop/quay_configuration/blob/main/docs/quay_quota_module.rst) | Manage Quay Container Registry organizations quota
[quay_repository](https://github.com/redhat-cop/quay_configuration/blob/main/docs/quay_repository_module.rst) | Manage Quay Container Registry repositories
[quay_repository_mirror](https://github.com/redhat-cop/quay_configuration/blob/main/docs/quay_repository_mirror_module.rst) | Manage Quay Container Registry repository mirrors
[quay_robot](https://github.com/redhat-cop/quay_configuration/blob/main/docs/quay_robot_module.rst) | Manage Quay Container Registry robot accounts
[quay_tag](https://github.com/redhat-cop/quay_configuration/blob/main/docs/quay_tag_module.rst) | Manage Quay Container Registry image tags
[quay_tag_info](https://github.com/redhat-cop/quay_configuration/blob/main/docs/quay_tag_info_module.rst) | Gather information about tags in a Quay Container Registry repository
[quay_team](https://github.com/redhat-cop/quay_configuration/blob/main/docs/quay_team_module.rst) | Manage Quay Container Registry teams
[quay_team_ldap](https://github.com/redhat-cop/quay_configuration/blob/main/docs/quay_team_ldap_module.rst) | Synchronize Quay Container Registry teams with LDAP groups
[quay_team_oidc](https://github.com/redhat-cop/quay_configuration/blob/main/docs/quay_team_oidc_module.rst) | Synchronize Quay Container Registry teams with OIDC groups
[quay_user](https://github.com/redhat-cop/quay_configuration/blob/main/docs/quay_user_module.rst) | Manage Quay Container Registry users
[quay_vulnerability_info](https://github.com/redhat-cop/quay_configuration/blob/main/docs/quay_vulnerability_info_module.rst) | Gather information about image vulnerabilities in Quay Container Registry
`quay_api_token` | Create OAuth access tokens for accessing the Quay Container Registry API
`quay_application` | Manage Quay Container Registry applications
`quay_default_perm` | Manage Quay Container Registry default repository permissions
`quay_docker_token` | Manage tokens for accessing Quay Container Registry repositories
`quay_first_user` | Create the first user account
`quay_layer_info` | Gather information about image layers in Quay Container Registry
`quay_manifest_label` | Manage Quay Container Registry image manifest labels
`quay_manifest_label_info` | Gather information about manifest labels in Quay Container Registry
`quay_message` | Manage Quay Container Registry global messages
`quay_notification` | Manage Quay Container Registry repository notifications
`quay_organization` | Manage Quay Container Registry organizations
`quay_proxy_cache` | Manage Quay Container Registry proxy cache configurations
`quay_quota` | Manage Quay Container Registry organizations quota
`quay_repository` | Manage Quay Container Registry repositories
`quay_repository_mirror` | Manage Quay Container Registry repository mirror configurations
`quay_robot` | Manage Quay Container Registry robot accounts
`quay_tag` | Manage Quay Container Registry image tags
`quay_tag_info` | Gather information about tags in a Quay Container Registry repository
`quay_team` | Manage Quay Container Registry teams
`quay_team_ldap` | Synchronize Quay Container Registry teams with LDAP groups
`quay_team_oidc` | Synchronize Quay Container Registry teams with OIDC groups
`quay_user` | Manage Quay Container Registry users


### Jinja2 Filters

Run the `ansible-doc -t filter -l infra.quay_configuration` command to list the filters that the collection provides.
For accessing the documentation of a filter, use the `ansible-doc -t filter infra.quay_configuration.<filter-name>` command.

Name | Description
---: | :---
[quay_docker_config](https://github.com/redhat-cop/quay_configuration/blob/main/docs/quay_docker_config_filter.rst) | Build a Docker configuration in JSON format
`quay_docker_config` | Build a Docker configuration in JSON format

### Roles

Run the `ansible-doc -t role -l infra.quay_configuration` command to list the roles that the collection provides.
For accessing the documentation of a role, use the `ansible-doc -t role infra.quay_configuration.<role-name>` command.

Name | Description
---: | :---
[quay_org](https://github.com/redhat-cop/quay_configuration/blob/main/roles/quay_org/README.md) ([variables](https://github.com/redhat-cop/quay_configuration/blob/main/docs/quay_org_role.rst)) | Create and configure a Quay Container Registry organization | [quay_org](https://github.com/redhat-cop/quay_configuration/blob/main/docs/quay_org_role.rst)

`quay_org` | Create and configure a Quay Container Registry organization

## Installing the Collection

Expand All @@ -68,7 +80,7 @@ collections:
Use the `ansible-galaxy collection install -r collections/requirements.yml` command to install the collection from this file.
If you manage your Ansible project in automation controller, then automation controller detects this `collections/requirements.yml` file, and automatically installs the collection.

You can also download the tar archive from [Ansible Galaxy](https://galaxy.ansible.com/herve4m/quay), and then manually install the collection.
You can also download the tar archive from [Ansible Galaxy](https://galaxy.ansible.com/infra/quay_configuration), and then manually install the collection.

See [Ansible -- Using collections](https://docs.ansible.com/ansible/latest/user_guide/collections_using.html) for more details.

Expand Down Expand Up @@ -168,6 +180,7 @@ When your play calls multiple modules from the collection, you can group common
For example, instead of repeating the `quay_host`, `quay_username`, and `quay_password` parameters in each task, you can declare them at the top of your play:

```yaml
---
- name: Creating the development organization and the developers team
hosts: localhost
Expand Down
15 changes: 0 additions & 15 deletions docs/environment_variables.rst

This file was deleted.

Loading

0 comments on commit 94dc8f5

Please sign in to comment.