Skip to content

Commit

Permalink
ci(actions): Update Labeler action (#356)
Browse files Browse the repository at this point in the history
* ci(actions): Update Labeler action

* Refresh GH data
  • Loading branch information
titom73 authored May 8, 2021
1 parent 1b9f591 commit 97eef40
Show file tree
Hide file tree
Showing 6 changed files with 129 additions and 91 deletions.
56 changes: 6 additions & 50 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,52 +1,8 @@
#-------------------------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------
ARG VARIANT="3.6"
FROM avdteam/base:${VARIANT}

FROM python:3
WORKDIR /workspace
VOLUME ["/workspace"]

# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive

# This Dockerfile adds a non-root user with sudo access. Use the "remoteUser"
# property in devcontainer.json to use it. On Linux, the container user's GID/UIDs
# will be updated to match your local UID/GID (when using the dockerFile property).
# See https://aka.ms/vscode-remote/containers/non-root-user for details.
ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=$USER_UID

# Uncomment the following COPY line and the corresponding lines in the `RUN` command if you wish to
# include your requirements in the image itself. It is suggested that you only do this if your
# requirements rarely (if ever) change.
# COPY requirements.txt /tmp/pip-tmp/

# Configure apt and install packages
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils dialog 2>&1 \
#
# Verify git, process tools, lsb-release (common in install instructions for CLIs) installed
&& apt-get -y install git iproute2 procps lsb-release \
#
# Install pylint
&& pip --disable-pip-version-check --no-cache-dir install pylint \
#
# Update Python environment based on requirements.txt
# && pip --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
# && rm -rf /tmp/pip-tmp \
#
# Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user.
&& groupadd --gid $USER_GID $USERNAME \
&& useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \
# [Optional] Add sudo support for the non-root user
&& apt-get install -y sudo \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME\
&& chmod 0440 /etc/sudoers.d/$USERNAME \
#
# Clean up
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*

# Switch back to dialog for any ad-hoc use of apt-get
ENV DEBIAN_FRONTEND=dialog
USER avd
RUN rm -f /home/avd/.gitconfig
117 changes: 85 additions & 32 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,87 @@
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or the definition README at
// https://github.com/microsoft/vscode-dev-containers/tree/master/containers/python-3
{
"name": "Ansible CVP development",
"context": "..",
"dockerFile": "Dockerfile",

// Use 'settings' to set *default* container specific settings.json values on container create.
// You can edit these settings after create using File > Preferences > Settings > Remote.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"python.pythonPath": "/usr/local/bin/python",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.linting.pylintPath": "/usr/local/bin/pylint"
},

// Use 'appPort' to create a container with published ports. If the port isn't working, be sure
// your server accepts connections from all interfaces (0.0.0.0 or '*'), not just localhost.
// "appPort": [],

// Uncomment the next line to run commands after the container is created.
"postCreateCommand": "pip install -r requirements.txt && pip install -r requirements.dev.txt",

// Uncomment the next line to have VS Code connect as an existing non-root user in the container.
// On Linux, by default, the container user's UID/GID will be updated to match your local user. See
// https://aka.ms/vscode-remote/containers/non-root for details on adding a non-root user if none exist.
// "remoteUser": "vscode",

// Add the IDs of extensions you want installed when the container is created in the array below.
"extensions": [
"ms-python.python"
]
"name": "AVD Development",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick Python version of AVD runner: 3.6, 3.7, 3.8
"args": { "VARIANT": "3.6" },
},
"remoteUser": "avd",
"updateRemoteUserUID": true,
"workspaceMount": "source=${localWorkspaceFolder}/..,target=/workspace,type=bind,consistency=delegated",
"workspaceFolder": "/workspace",
"extensions": [
"christian-kohler.path-intellisense",
"codezombiech.gitignore",
"DavidAnson.vscode-markdownlint",
"donjayamanne.python-extension-pack",
"eamodio.gitlens",
"felipe-mendes.slack-theme",
"haaaad.ansible",
"jack89ita.copy-filename",
"jdinhlife.gruvbox",
"jebbs.markdown-extended",
"magicstack.MagicPython",
"mhutchie.git-graph",
"ms-python.python",
"ms-toolsai.jupyter",
"njpwerner.autodocstring",
"PKief.material-icon-theme",
"redhat.vscode-yaml",
"samuelcolvin.jinjahtml",
"timonwong.ansible-autocomplete",
"tuxtina.json2yaml",
"wholroyd.jinja",
"yzhang.markdown-all-in-one",
"coenraads.bracket-pair-colorizer-2",
"github.vscode-pull-request-github",
"ms-python.vscode-pylance"
],
"settings": {
"python.pythonPath": "/usr/local/bin/python",
"python.analysis.extraPaths": [
"/workspace/"
],
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"editor.rulers": [
80,
120
],
"editor.formatOnPaste": true,
"files.trimTrailingWhitespace": true,
"python.linting.pycodestyleEnabled": false,
"python.linting.pycodestyleArgs": [
"--max-line-length=120",
"--ignore=E501,722"
],
"python.linting.flake8Enabled": true,
"python.linting.flake8Args": [
"--max-line-length=120",
"--ignore=E722,E501",
"--verbose",
"--exclude=*.pyc *.git",
"--format=pylint"
],
"python.linting.pylintArgs": [
"--max-line-length=120",
"--disable=E501,W0142,W0403,W0613,W0232,R0903,R0913,C0103,R0914,C0304,F0401,W0402,E1101,W0614,C0111,C0301"
],
"autoDocstring.startOnNewLine": true,
"telemetry.enableCrashReporter": false,
"telemetry.enableTelemetry": false,
"gitlens.views.repositories.location": "scm",
"gitlens.views.fileHistory.location": "explorer",
"gitlens.views.lineHistory.location": "explorer",
"gitlens.views.search.location": "scm",
"gitlens.views.compare.location": "scm",
"gitlens.views.repositories.files.layout": "tree",
"editor.renderWhitespace": "all",
"files.autoSave": "onFocusChange",
"autoDocstring.includeName": true,
"autoDocstring.docstringFormat": "numpy",
"autoDocstring.includeExtendedSummary": true,
"path-intellisense.autoSlashAfterDirectory": true,
"editor.find.autoFindInSelection": "multiline",
"githubIssues.issueBranchTitle": "issues/${issueNumber}"
}
}
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Issue template
about: Report an issue
title: ""
labels: Triage
labels: 'status: Triage'
assignees: ''

---
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Feature request
about: Suggest an idea for this project
title: 'Feature Request - '
labels: 'Triage'
labels: 'status: Triage'
assignees: ''

---
Expand Down
19 changes: 14 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<!--- Provide a general summary of your changes in the Title above -->
## Change Summary

<!-- Enter short PR description -->

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
Expand All @@ -11,20 +13,27 @@
- [ ] Other (please describe):

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

Fixes #<ISSUE ID>

## Component(s) name

`arista.cvp.<role-name>`

## Proposed changes
<!--- Describe your changes in detail -->
<!--- Describe data model implemented for new features -->

## 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 code has been rebased from devel before I start
- [ ] I have read the [**CONTRIBUTING**](https://www.avd.sh/docs/contributing/) document.
- [ ] 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`).
- [ ] I have updated [molecule CI](https://github.com/aristanetworks/ansible-avd/tree/devel/ansible_collections/arista/avd/molecule) testing accordingly
- [ ] All new and existing tests passed ([`pre-commit`](https://www.avd.sh/docs/installation/development/#python-virtual-environment), `make linting` and `make sanity-lint`).
24 changes: 22 additions & 2 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,42 @@
"module: cv_configlet":
- ansible_collections/arista/cvp/plugins/modules/cv_configlet.py

"module: cv_configlet_v3":
- ansible_collections/arista/cvp/plugins/modules/cv_configlet_v3.py
- ansible_collections/arista/cvp/plugins/module_utils/configlet_tools.py

"module: cv_container":
- ansible_collections/arista/cvp/plugins/modules/cv_container.py

"module: cv_container_v3":
- ansible_collections/arista/cvp/plugins/modules/cv_container_v3.py
- ansible_collections/arista/cvp/plugins/module_utils/container_tools.py

"module: cv_device":
- ansible_collections/arista/cvp/plugins/modules/cv_device.py

"module: cv_device_v3":
- ansible_collections/arista/cvp/plugins/modules/cv_device_v3.py
- ansible_collections/arista/cvp/plugins/module_utils/device_tools.py

"module: cv_facts":
- ansible_collections/arista/cvp/plugins/modules/cv_facts.py

"module: cv_task":
- ansible_collections/arista/cvp/plugins/modules/cv_task.py

"module: cv_task_v3":
- ansible_collections/arista/cvp/plugins/modules/cv_task_v3.py
- ansible_collections/arista/cvp/plugins/module_utils/task_tools.py

"module_utils: cv_client":
- ansible_collections/arista/cvp/plugins/module_utils/*
- ansible_collections/arista/cvp/plugins/module_utils/**/*

"data-model changes":
- ansible_collections/arista/cvp/plugins/module_utils/schema_v1.py
- ansible_collections/arista/cvp/plugins/module_utils/schema_v3.py

"role: ztp_configuration":
- ansible_collections/arista/cvp/roles/dhcp_configuration/*
- ansible_collections/arista/cvp/roles/dhcp_configuration/**/*
Expand All @@ -40,6 +60,6 @@
- development/Makefile

"type: dependencies":
- development/requirements-dev.txt
- development/requirements.txt
- ansible_collections/arista/cvp/requirements-dev.txt
- ansible_collections/arista/cvp/requirements.txt
- ansible_collections/arista/cvp/docs/requirements.txt

0 comments on commit 97eef40

Please sign in to comment.