Skip to content
This repository has been archived by the owner on Jun 28, 2019. It is now read-only.

Picli generate defaults #29

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/functional/cookiecutter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"global_directory": "piedpiper.d",
"project_name": "my_project",
"ci_provider": "gitlab-ci",
"default_vars_directory": "default_vars.d",
"version": "0.0.0"
}
23 changes: 23 additions & 0 deletions tests/functional/readme_cookiecutter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# cookiecutter installation (with pip)

```
pip install --user cookiecutter
```

# Generating the template

In a terminal, navigate to a location where you want to deploy the `piedpiper.d` folder
```
cd /path/to/picli/tests/functional/my_custom_project
```

To accept the default values located in cookiecutter.json, run:
```
cookiecutter --no-input /path/to/picli/tests/functional
```

To replace some or all default values with user-specified variables, run:
```
cookiecutter /path/to/picli/tests/functional
```
When prompted, press the return key to accept the default (indicated within brackets `[default_value]`) or type in a user-defined value instead.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
file: "src/config.py"
styler: "noop"
sast: "noop"
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
pi_style:
- name: "*"
styler: noop
pi_sast:
- name: "*"
sast: noop
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
pi_style:
- name: "*.cc"
styler: cpplint
- name: "*.h"
styler: cpplint
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
pi_style:
- name: "*.py"
styler: flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
pi_sast_pipe_vars:
run_pipe: true
url: http://172.17.0.1:8080/function
version: latest
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
pi_style_pipe_vars:
run_pipe: true
version: latest
url: http://172.17.0.1:8080/function
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
pi_validate_pipe_vars:
run_pipe: true
url: http://172.17.0.1:8080/function
version: latest
policy:
enabled: true
enforcing: true
version: 0.0.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
pi_global_vars:
project_name: "{{cookiecutter.project_name}}"
ci_provider: "{{cookiecutter.ci_provider}}"
vars_dir: "{{cookiecutter.default_vars_directory}}"
version: "{{cookiecutter.version}}"