Skip to content

Commit

Permalink
Add documentation build workflows (#125)
Browse files Browse the repository at this point in the history
* Add initial antsibull-docs files
* Add PR docs linting workflow
* Add collection namespace and name to doc validation workflow
* Add construct_docs workflow using Ansible Community actions
* Add publish_docs workflow
* Fix location of actions
* Update to reflect checkout path
* Add always() to antsibull.log artifact upload
* Comment out all existing requirements.txt
* Remove shared workflow
* Remove obsolete Python requirements
* Update to use common shared workflows
* Add documentation placeholders for all filters
* Remove conflicting 'tls' alias
* Move ClouderaManagerLookupBase to module_utils/cm_utils.py
* Remove erroneous option parameter and add environment variables for username and password
* Update docs for top links, Github edits, and extra links
* Rewrite README.md to align with content map
* Add CONTRIBUTING.md document
* Format galaxy.yml for consistency
* Update instructions for branching for clarity
* Clarify the ansible-galaxy and ansible-builder usage for dependencies
* Add additional tags
* Update copyright date
* Format versions
* Clarify Python and collection dependencies and installation processes
* Add note about Collection Metadata usage and update callout formatting

Signed-off-by: Webster Mudge <wmudge@cloudera.com>
  • Loading branch information
wmudge authored Sep 27, 2023
1 parent 972018f commit f0b8095
Show file tree
Hide file tree
Showing 36 changed files with 898 additions and 278 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/publish_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---

name: Publish documentation

on:
push:
branches:
- 'main'

workflow_dispatch:

jobs:
build-ansible-docs:
name: Build Ansible Docs
uses: cloudera-labs/github-actions/.github/workflows/construct-ansible-docs.yml@v1
with:
pages-upload: true
directory-upload: true
antsibull-log-upload: true

publish-ansible-docs:
name: Publish Ansible Docs
needs: build-ansible-docs
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy Github Pages
id: deployment
uses: actions/deploy-pages@v2
with:
artifact_name: github-pages
1 change: 0 additions & 1 deletion .github/workflows/validate_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ on:
branches:
- 'release/**'
- 'devel'
- 'devel-pvc-base'

jobs:
validate:
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/validate_pr_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---

name: Validate Pull Request documentation

on:
pull_request:
branches:
- 'release/**'
- 'devel'

workflow_dispatch:

jobs:
validate-docs:
name: Validate Ansible Docs
uses: cloudera-labs/github-actions/.github/workflows/lint-ansible-docs.yml@v1
with:
antsibull-log-upload: true
collection-namespace: cloudera
collection-name: cluster
82 changes: 82 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Contributing to cloudera.cluster

Thank you for considering contributions to the `cloudera.cluster` Ansible collection!

## Submitting a pull request

You can start work on issues that are not yet part of a [Milestone](https://github.com/cloudera-labs/cloudera.cluster/milestones) -- anything in our issue tracker that isn't assigned to a Milestone is considered the [backlog](https://github.com/cloudera-labs/cloudera.cluster/issues?q=is%3Aopen+is%3Aissue+no%3Amilestone).

Before you start working, please announce that you want to do so by commenting on the issue. _([Create an issue](https://github.com/cloudera-labs/cloudera.cluster/issues/new?labels=enhancement) if there isn't one yet, and you can also check out our [Discussions](https://github.com/cloudera-labs/cloudera.cluster/discussions) for ideas.)_ We try to ensure that all active work is assigned to a Milestone in order to keep our backlog accurate.

**When your work is ready for review, create a branch in your own forked repository from the `devel` branch and submit a pull request against `devel`, referencing your the issue.**

As a _best practice_, you can prefix your branches with:

|prefix|Description|Example|
|------|-----------|-------|
|`feature/`|A new feature or changes existing to existing code or documentation|`feature/update-this-modules-params`|
|`fix/`|A non-urgent bug fix|`fix/refactor-module-output-params`|
|`hotfix/`|An urgent bug fix|`hotfix/patch-insecure-module`|

> [!NOTE]
> :fire_extinguisher: A **hotfix** should branch from `main`. It will then be committed to both the `main` and `devel` branches.
## Signing your commits

Note that we require signed commits inline with [Developer Certificate of Origin](https://developercertificate.org/) best-practices for open source collaboration.

A signed commit is a simple one-liner at the end of your commit message that states that you wrote the patch or otherwise have the right to pass the change into open source. Signing your commits means you agree to:

```
Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
660 York Street, Suite 102,
San Francisco, CA 94110 USA
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
```

(See [developercertificate.org](https://developercertificate.org/))

To agree, make sure to add line at the end of every git commit message, like this:

```
Signed-off-by: John Doe <jdoe@example.com>
```

> [!NOTE]
> :rocket: Add the sign-off automatically when creating the commit via the `-s` flag, e.g. `git commit -s`.
## Still have questions? Opinions? Comments?

Come find us on our [Discussions](https://github.com/cloudera-labs/cloudera.cluster/discussions)!
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2021 Cloudera, Inc. All rights reserved.
Copyright 2023 Cloudera, Inc. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit f0b8095

Please sign in to comment.