Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template Subfolder convention in README/existing templates #166

Open
kevya-google opened this issue Aug 24, 2023 · 0 comments
Open

Template Subfolder convention in README/existing templates #166

kevya-google opened this issue Aug 24, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@kevya-google
Copy link
Contributor

TL;DR

Establish a recommended convention of having template files that are intended to be included placed in a subfolder one directory below the spec.yaml. This way, other files that are repo-specific (such as .vscode and .gitignore) or metadata for the template won't need to be excluded as part of the spec.yaml (for example, imagine a README.md for describing how to use the template on the same level as the spec.yaml and another README.md in the template folder meant to be included in the render describing details about the template code). However, this shouldn't be strictly enforced, providing some flexibility to template authors as there could be some templates that have a need for follow up actions, different files for different environments, other layout requirements, etc.

Context: https://docs.google.com/document/d/12iN2g1Idz6fW5ZqaokTmSFZf5kHXaWeewULWy2q5GfE/edit#heading=h.z1xyeclrumgj

Detailed design

No response

Alternatives considered

No response

Additional information

No response

@kevya-google kevya-google added the enhancement New feature or request label Aug 24, 2023
@kevya-google kevya-google self-assigned this Aug 24, 2023
@kevya-google kevya-google changed the title Template Subfolder convention in README/existing tempaltes Template Subfolder convention in README/existing templates Sep 5, 2023
kevya-google added a commit that referenced this issue Sep 11, 2023
…ion (#180)

Addresses #173, also reformats
subdirectory contents in accordance to
#166.

Template structure:
```
$ tree -all
.
├── contents
│   ├── go.mod
│   ├── go.sum
│   ├── main.go
│   ├── main_test.go
│   └── README.md
├── deployments
│   ├── config
│   │   └── autopush-rest-server.env
│   ├── contents
│   │   └── Dockerfile
│   ├── README.md
│   ├── spec.yaml
│   └── workflows
│       ├── ci-rest-server.yaml
│       └── deploy-rest-server.yaml
├── README.md
└── spec.yaml

```
Rendered template structure:
```
$ tree -all
.
├── Dockerfile
├── .github
│   ├── config
│   │   └── autopush-rest-server.env
│   └── workflows
│       ├── ci-rest-server.yaml
│       └── deploy-rest-server.yaml
├── go.mod
├── go.sum
├── main.go
├── main_test.go
└── README.md
```
chloechien pushed a commit that referenced this issue Sep 12, 2023
…ion (#180)

Addresses #173, also reformats
subdirectory contents in accordance to
#166.

Template structure:
```
$ tree -all
.
├── contents
│   ├── go.mod
│   ├── go.sum
│   ├── main.go
│   ├── main_test.go
│   └── README.md
├── deployments
│   ├── config
│   │   └── autopush-rest-server.env
│   ├── contents
│   │   └── Dockerfile
│   ├── README.md
│   ├── spec.yaml
│   └── workflows
│       ├── ci-rest-server.yaml
│       └── deploy-rest-server.yaml
├── README.md
└── spec.yaml

```
Rendered template structure:
```
$ tree -all
.
├── Dockerfile
├── .github
│   ├── config
│   │   └── autopush-rest-server.env
│   └── workflows
│       ├── ci-rest-server.yaml
│       └── deploy-rest-server.yaml
├── go.mod
├── go.sum
├── main.go
├── main_test.go
└── README.md
```
@kevya-google kevya-google removed their assignment Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant