-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhancement: Generate cookie cutter templates and apply linting on th…
…em (#123) * reset branch for cleanup * generate plugin names * use script to extract plugin names * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update crypto in requirments.yml --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
c69541c
commit 7d8f040
Showing
7 changed files
with
141 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
src/molecule_plugins/docker/playbooks/create.yml yaml[line-length] | ||
src/molecule_plugins/docker/playbooks/destroy.yml yaml[line-length] | ||
|
||
src/molecule_plugins/gce/playbooks/handlers/main.yml yaml[line-length] | ||
src/molecule_plugins/gce/playbooks/tasks/create_linux_instance.yml yaml[line-length] | ||
src/molecule_plugins/gce/playbooks/tasks/create_windows_instance.yml yaml[line-length] | ||
|
||
src/molecule_plugins/podman/playbooks/create.yml yaml[line-length] | ||
|
||
test/azure/scenarios/driver/azure/molecule/multi-node/prepare.yml fqcn[action-core] | ||
|
||
test/gce/scenarios/linux/converge.yml fqcn[action-core] | ||
test/gce/scenarios/linux/create.yml fqcn[action-core] | ||
test/gce/scenarios/linux/destroy.yml fqcn[action-core] | ||
test/gce/scenarios/linux/handlers/main.yml fqcn[action-core] | ||
test/gce/scenarios/linux/handlers/main.yml yaml[line-length] | ||
test/gce/scenarios/linux/molecule.yml yaml[line-length] | ||
test/gce/scenarios/linux/prepare.yml fqcn[action-core] | ||
test/gce/scenarios/linux/tasks/create_linux_instance.yml fqcn[action-core] | ||
test/gce/scenarios/linux/tasks/create_linux_instance.yml yaml[line-length] | ||
test/gce/scenarios/linux/tasks/create_windows_instance.yml fqcn[action-core] | ||
test/gce/scenarios/linux/tasks/create_windows_instance.yml yaml[line-length] | ||
test/gce/scenarios/linux/verify.yml fqcn[action-core] | ||
|
||
test/gce/scenarios/windows/converge.yml fqcn[action-core] | ||
test/gce/scenarios/windows/create.yml fqcn[action-core] | ||
test/gce/scenarios/windows/destroy.yml fqcn[action-core] | ||
test/gce/scenarios/windows/handlers/main.yml fqcn[action-core] | ||
test/gce/scenarios/windows/handlers/main.yml yaml[line-length] | ||
test/gce/scenarios/windows/molecule.yml yaml[line-length] | ||
test/gce/scenarios/windows/prepare.yml fqcn[action-core] | ||
test/gce/scenarios/windows/tasks/create_linux_instance.yml fqcn[action-core] | ||
test/gce/scenarios/windows/tasks/create_linux_instance.yml yaml[line-length] | ||
test/gce/scenarios/windows/tasks/create_windows_instance.yml fqcn[action-core] | ||
test/gce/scenarios/windows/tasks/create_windows_instance.yml yaml[line-length] | ||
test/gce/scenarios/windows/verify.yml fqcn[action-core] | ||
|
||
test/roles/azureplugin/meta/main.yml meta-incorrect | ||
test/roles/azureplugin/meta/main.yml meta-no-info | ||
test/roles/azureplugin/meta/main.yml schema[meta] | ||
test/roles/azureplugin/molecule/default/create.yml yaml[octal-values] | ||
test/roles/azureplugin/molecule/default/destroy.yml yaml[octal-values] | ||
test/roles/azureplugin/molecule/default/verify.yml yaml[indentation] | ||
test/roles/azureplugin/tests/test.yml name[play] | ||
|
||
test/roles/dockerplugin/meta/main.yml meta-incorrect | ||
test/roles/dockerplugin/meta/main.yml meta-no-info | ||
test/roles/dockerplugin/meta/main.yml schema[meta] | ||
test/roles/dockerplugin/molecule/default/converge.yml fqcn[action-core] | ||
test/roles/dockerplugin/molecule/default/verify.yml yaml[indentation] | ||
test/roles/dockerplugin/tests/test.yml name[play] | ||
|
||
test/roles/ec2plugin/meta/main.yml meta-incorrect | ||
test/roles/ec2plugin/meta/main.yml meta-no-info | ||
test/roles/ec2plugin/meta/main.yml schema[meta] | ||
test/roles/ec2plugin/molecule/default/converge.yml fqcn[action-core] | ||
test/roles/ec2plugin/molecule/default/create.yml fqcn[action-core] | ||
test/roles/ec2plugin/molecule/default/create.yml fqcn[action] | ||
test/roles/ec2plugin/molecule/default/create.yml fqcn[keyword] | ||
test/roles/ec2plugin/molecule/default/create.yml key-order[task] | ||
test/roles/ec2plugin/molecule/default/create.yml name[missing] | ||
test/roles/ec2plugin/molecule/default/create.yml no-handler | ||
test/roles/ec2plugin/molecule/default/create.yml risky-file-permissions | ||
test/roles/ec2plugin/molecule/default/destroy.yml fqcn[action-core] | ||
test/roles/ec2plugin/molecule/default/destroy.yml fqcn[action] | ||
test/roles/ec2plugin/molecule/default/destroy.yml fqcn[keyword] | ||
test/roles/ec2plugin/molecule/default/destroy.yml risky-file-permissions | ||
test/roles/ec2plugin/molecule/default/prepare.yml fqcn[action-core] | ||
test/roles/ec2plugin/molecule/default/verify.yml yaml[indentation] | ||
test/roles/ec2plugin/tests/test.yml name[play] | ||
|
||
test/roles/gceplugin/meta/main.yml meta-incorrect | ||
test/roles/gceplugin/meta/main.yml meta-no-info | ||
test/roles/gceplugin/meta/main.yml schema[meta] | ||
test/roles/gceplugin/molecule/default/verify.yml yaml[indentation] | ||
test/roles/gceplugin/tests/test.yml name[play] | ||
|
||
test/roles/podmanplugin/meta/main.yml meta-incorrect | ||
test/roles/podmanplugin/meta/main.yml meta-no-info | ||
test/roles/podmanplugin/meta/main.yml schema[meta] | ||
test/roles/podmanplugin/molecule/default/verify.yml yaml[indentation] | ||
test/roles/podmanplugin/tests/test.yml name[play] | ||
|
||
test/roles/vagrantplugin/meta/main.yml meta-incorrect | ||
test/roles/vagrantplugin/meta/main.yml meta-no-info | ||
test/roles/vagrantplugin/meta/main.yml schema[meta] | ||
test/roles/vagrantplugin/molecule/default/verify.yml yaml[indentation] | ||
test/roles/vagrantplugin/tests/test.yml name[play] | ||
|
||
test/roles/containersplugin/meta/main.yml meta-incorrect | ||
test/roles/containersplugin/meta/main.yml meta-no-info | ||
test/roles/containersplugin/meta/main.yml schema[meta] | ||
test/roles/containersplugin/molecule/default/verify.yml yaml[indentation] | ||
test/roles/containersplugin/tests/test.yml name[play] | ||
test/roles/containersplugin/molecule/default/converge.yml fqcn[action-core] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import sys | ||
|
||
|
||
def print_plugin_names() -> None: | ||
import toml | ||
|
||
if len(sys.argv) != 2: | ||
raise SystemExit(f"Usage: {sys.argv[0]} <filename>") | ||
|
||
filename = sys.argv[1] | ||
with open(filename) as f: | ||
toml_data = toml.load(f) | ||
|
||
result = toml_data["project"]["entry-points"]["molecule.driver"].keys() | ||
for i in result: | ||
print(i) # noqa: T201 | ||
|
||
|
||
if __name__ == "__main__": | ||
print_plugin_names() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
rm -rf test/roles/* || true | ||
mkdir -p test/roles | ||
|
||
while IFS='' read -r line; do DRIVER_NAMES+=("$line"); done < <(python "tools/extract_plugin_names.py" "pyproject.toml") | ||
|
||
cd test/roles | ||
for DRIVER_NAME in "${DRIVER_NAMES[@]}"; do | ||
molecule init role roles."${DRIVER_NAME}"plugin --driver-name="${DRIVER_NAME}" | ||
done | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters