diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:04:41 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:04:41 +0000 |
commit | 975f66f2eebe9dadba04f275774d4ab83f74cf25 (patch) | |
tree | 89bd26a93aaae6a25749145b7e4bca4a1e75b2be /ansible_collections/purestorage/fusion/.github | |
parent | Initial commit. (diff) | |
download | ansible-975f66f2eebe9dadba04f275774d4ab83f74cf25.tar.xz ansible-975f66f2eebe9dadba04f275774d4ab83f74cf25.zip |
Adding upstream version 7.7.0+dfsg.upstream/7.7.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/purestorage/fusion/.github')
9 files changed, 325 insertions, 0 deletions
diff --git a/ansible_collections/purestorage/fusion/.github/CONTRIBUTING.md b/ansible_collections/purestorage/fusion/.github/CONTRIBUTING.md new file mode 100644 index 000000000..a9054d18c --- /dev/null +++ b/ansible_collections/purestorage/fusion/.github/CONTRIBUTING.md @@ -0,0 +1,19 @@ +# WELCOME TO PURE STORAGE FUSION ANSIBLE COLLECTION GITHUB + +Hi! Nice to see you here! + +## QUESTIONS ? + +The GitHub issue tracker is not the best place for questions for various reasons, but the [mailing list](mailto:pure-ansible-team@purestorage.com) is a very helpful places for those things. + +## CONTRIBUTING ? + +By contributing you agree that these contributions are your own (or approved by your employer) and you grant a full, complete, irrevocable copyright license to all users and developers of the project, present and future, pursuant to the license of the project. + +## BUG TO REPORT ? + +You can report bugs or make enhancement requests at the [Ansible GitHub issue page](http://github.com/Pure-Storage-Ansible/Fusion-Collection/issues/new/choose) by filling out the issue template that will be presented. + +Also please make sure you are testing on the latest released version of Ansible or the development branch; see the [Installation Guide](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) for details. + +Thanks! diff --git a/ansible_collections/purestorage/fusion/.github/ISSUE_TEMPLATE/bug_report.md b/ansible_collections/purestorage/fusion/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 000000000..dd84ea782 --- /dev/null +++ b/ansible_collections/purestorage/fusion/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/ansible_collections/purestorage/fusion/.github/ISSUE_TEMPLATE/feature_request.md b/ansible_collections/purestorage/fusion/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 000000000..bbcbbe7d6 --- /dev/null +++ b/ansible_collections/purestorage/fusion/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/ansible_collections/purestorage/fusion/.github/pull_request_template.md b/ansible_collections/purestorage/fusion/.github/pull_request_template.md new file mode 100644 index 000000000..27079cb18 --- /dev/null +++ b/ansible_collections/purestorage/fusion/.github/pull_request_template.md @@ -0,0 +1,25 @@ +##### SUMMARY +<!--- Describe the change below, including rationale and design decisions --> + +<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> + +##### ISSUE TYPE +<!--- Pick one below and delete the rest --> +- Bugfix Pull Request +- Docs Pull Request +- Feature Pull Request +- New Module Pull Request +- New Role Pull Request + +##### COMPONENT NAME +<!--- Write the short name of the module, plugin, task or feature below --> + +##### ADDITIONAL INFORMATION +<!--- Include additional information to help people understand the change here --> +<!--- A step-by-step reproduction of the problem is helpful if there is no related issue --> +- All new PRs must include a changelog fragment +- Details of naming convention and format can be found [here](https://docs.ansible.com/ansible/latest/community/development_process.html#creating-a-changelog-fragment) +<!--- Paste verbatim command output below, e.g. before and after your change --> +```paste below + +``` diff --git a/ansible_collections/purestorage/fusion/.github/workflows/ansible-lint.yaml b/ansible_collections/purestorage/fusion/.github/workflows/ansible-lint.yaml new file mode 100644 index 000000000..0b2102184 --- /dev/null +++ b/ansible_collections/purestorage/fusion/.github/workflows/ansible-lint.yaml @@ -0,0 +1,10 @@ +name: Ansible Lint # feel free to pick your own name +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Run ansible-lint + uses: ansible-community/ansible-lint-action@main diff --git a/ansible_collections/purestorage/fusion/.github/workflows/black.yaml b/ansible_collections/purestorage/fusion/.github/workflows/black.yaml new file mode 100644 index 000000000..68061652a --- /dev/null +++ b/ansible_collections/purestorage/fusion/.github/workflows/black.yaml @@ -0,0 +1,11 @@ +name: Black + +on: [push, pull_request] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + - uses: psf/black@stable diff --git a/ansible_collections/purestorage/fusion/.github/workflows/create-release.yaml b/ansible_collections/purestorage/fusion/.github/workflows/create-release.yaml new file mode 100644 index 000000000..25725c15d --- /dev/null +++ b/ansible_collections/purestorage/fusion/.github/workflows/create-release.yaml @@ -0,0 +1,117 @@ +name: Release Collection + +on: workflow_dispatch +jobs: + create_github_release: + runs-on: ubuntu-latest + environment: fusion-env + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Get version from galaxy.yml + run: | + RELEASE_VERSION=$(grep 'version:' galaxy.yml | awk '{print $2}') + echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV + + - name: Check if tag exists + env: + GITHUB_TOKEN: ${{ github.TOKEN }} + run: | + trap "exit 0" EXIT + response=$(gh api -H "Accept: application/vnd.github+json" /repos/${{ github.repository }}/git/ref/tags/$RELEASE_VERSION) + if [[ "$response" == *"$RELEASE_VERSION"* ]]; then + trap "exit 1" EXIT + echo "Error: Tag $RELEASE_VERSION already exists" + exit 1 + fi + + - name: Extract changelog + run: | + awk -v version="$RELEASE_VERSION" ' + BEGIN { targetVersionFound = 0; previousVersionFound = 0 } + { + if (match($0, "^v"version) > 0) { + targetVersionFound = 1; + } else if (targetVersionFound && match($0, "^v") > 0) { + previousVersionFound = 1; + } + + if (targetVersionFound && !previousVersionFound) { + print $0; + } + } + ' CHANGELOG.rst > changelog + + - name: Create a release + env: + GITHUB_TOKEN: ${{ github.TOKEN }} + run: gh release create "${{ env.RELEASE_VERSION }}" --title "Fusion Collection v${{ env.RELEASE_VERSION }}" --notes-file changelog + + publish_collection_to_galaxy: + runs-on: ubuntu-latest + environment: fusion-env + needs: create_github_release + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Get version from galaxy.yml + run: | + RELEASE_VERSION=$(grep 'version:' galaxy.yml | awk '{print $2}') + echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.x" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install ansible ansible-lint yamllint + + - name: Build Ansible Collection + run: ansible-galaxy collection build + + - name: Release to Ansible Galaxy + run: ansible-galaxy collection publish --api-key=${{ secrets.ANSIBLE_GALAXY_API_KEY }} ./purestorage-fusion-${{ env.RELEASE_VERSION }}.tar.gz + + publish_collection_to_automation_hub: + runs-on: ubuntu-latest + environment: fusion-env + needs: create_github_release + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Get version from galaxy.yml + run: | + RELEASE_VERSION=$(grep 'version:' galaxy.yml | awk '{print $2}') + echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.x" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install ansible ansible-lint yamllint + + - name: Build Ansible Collection + run: ansible-galaxy collection build + - name: Create config for Automation Hub + run: | + cat << EOF > ansible.cfg + [galaxy] + server_list = rh_automation_hub + [galaxy_server.rh_automation_hub] + url=${{ secrets.RH_AUTOMATION_HUB_URL }} + auth_url=${{ secrets.RH_SSO_URL }} + token=${{ secrets.RH_AUTOMATION_HUB_TOKEN }} + EOF + + - name: Release to Automation Hub + run: ansible-galaxy collection publish ./purestorage-fusion-${{ env.RELEASE_VERSION }}.tar.gz diff --git a/ansible_collections/purestorage/fusion/.github/workflows/main.yml b/ansible_collections/purestorage/fusion/.github/workflows/main.yml new file mode 100644 index 000000000..da0a69969 --- /dev/null +++ b/ansible_collections/purestorage/fusion/.github/workflows/main.yml @@ -0,0 +1,66 @@ +name: Pure Storage Ansible CI + +on: + pull_request: + push: + schedule: + - cron: '25 10 * * *' + +jobs: + build: + name: Build purefusion on Ansible ${{ matrix.ansible }} (Python ${{ matrix.python-version }}) + runs-on: ubuntu-20.04 + strategy: + matrix: + ansible: + - stable-2.11 + - stable-2.12 + - stable-2.13 + - stable-2.14 + - stable-2.15 + - devel + python-version: + - 3.8 + - 3.9 + - "3.10" + - "3.11" + exclude: + - python-version: "3.11" + ansible: stable-2.11 + - python-version: "3.11" + ansible: stable-2.12 + - python-version: "3.11" + ansible: stable-2.13 + - python-version: "3.10" + ansible: stable-2.11 + - python-version: 3.8 + ansible: stable-2.14 + - python-version: 3.8 + ansible: stable-2.15 + - python-version: 3.8 + ansible: devel + steps: + - name: Check out code + uses: actions/checkout@v3 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python${{ matrix.python }} -m pip install --upgrade pip + python${{ matrix.python }} -m pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check + python${{ matrix.python }} -m pip install purefusion pytest + + - name: Run sanity tests + run: | + pwd + mkdir -p ansible_collections/purestorage/fusion + rsync -av . ansible_collections/purestorage/fusion --exclude ansible_collection/purestorage/fusion + cd ansible_collections/purestorage/fusion + ansible-test sanity -v --color --python ${{ matrix.python-version }} --docker + + - name: Run unit tests + run: python -m pytest --import-mode=append tests diff --git a/ansible_collections/purestorage/fusion/.github/workflows/stale.yml b/ansible_collections/purestorage/fusion/.github/workflows/stale.yml new file mode 100644 index 000000000..7bbc0505b --- /dev/null +++ b/ansible_collections/purestorage/fusion/.github/workflows/stale.yml @@ -0,0 +1,19 @@ +name: Mark stale issues and pull requests + +on: + schedule: + - cron: "0 0 * * *" + +jobs: + stale: + + runs-on: ubuntu-latest + + steps: + - uses: actions/stale@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: 'Stale issue message' + stale-pr-message: 'Stale pull request message' + stale-issue-label: 'no-issue-activity' + stale-pr-label: 'no-pr-activity' |