Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [skip ci] WIP: fix newline issues in examples and fixtures * Implement VarFiles for dependencies * Add support to report the junit results * Fix broken tests
- Loading branch information
1 parent
71c7d15
commit 636d119
Showing
33 changed files
with
278 additions
and
18 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
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,6 @@ | ||
# {{ .Title }} | ||
|
||
{{ .Description }}. It specifies both the | ||
[docs](/examples/docs) and [website](/examples/website) examples as dependencies to show how one boilerplate template | ||
can pull in another. It also defines all the variables needed for both of those dependencies at the top level to show | ||
how variable inheritance works. |
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,33 @@ | ||
variables: | ||
- name: Description | ||
description: Enter the description of this template | ||
|
||
- name: Version | ||
description: Enter the version number that will be used by the docs dependency | ||
|
||
- name: Title | ||
description: Enter the title for the dependencies example | ||
|
||
- name: WelcomeText | ||
description: Enter the welcome text used by the website dependency | ||
|
||
- name: ShowLogo | ||
description: Should the webiste show the logo (true or false)? | ||
type: bool | ||
default: true | ||
|
||
dependencies: | ||
- name: docs | ||
template-url: ../docs | ||
output-folder: ./docs | ||
var_files: | ||
- "{{ templateFolder }}/docs_vars.yml" | ||
|
||
- name: website | ||
template-url: ../website | ||
output-folder: ./website | ||
var_files: | ||
- "{{ templateFolder }}/website_vars.yml" | ||
|
||
skip_files: | ||
- path: "*_vars.yml" |
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 @@ | ||
Title: "I am vars for docs" |
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 @@ | ||
Title: "website vars!" |
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,6 @@ | ||
# {{ .Title }} | ||
|
||
{{ .Description }}. It specifies both the | ||
[docs](/examples/docs) and [website](/examples/website) examples as dependencies to show how one boilerplate template | ||
can pull in another. It also defines all the variables needed for both of those dependencies at the top level to show | ||
how variable inheritance works. |
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,33 @@ | ||
variables: | ||
- name: Description | ||
description: Enter the description of this template | ||
|
||
- name: Version | ||
description: Enter the version number that will be used by the docs dependency | ||
|
||
- name: Title | ||
description: Enter the title for the dependencies example | ||
|
||
- name: WelcomeText | ||
description: Enter the welcome text used by the website dependency | ||
|
||
- name: ShowLogo | ||
description: Should the webiste show the logo (true or false)? | ||
type: bool | ||
default: true | ||
|
||
dependencies: | ||
- name: docs | ||
template-url: ../docs | ||
output-folder: ./docs | ||
var_files: | ||
- "{{ templateFolder }}/docs_vars.yml" | ||
|
||
- name: website | ||
template-url: ../website | ||
output-folder: ./website | ||
var_files: | ||
- "{{ templateFolder }}/website_vars.yml" | ||
|
||
skip_files: | ||
- path: "*_vars.yml" |
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 @@ | ||
Title: "I am vars for docs" |
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 @@ | ||
Title: "website vars!" |
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 |
---|---|---|
|
@@ -6,4 +6,4 @@ | |
<h1>{{.WelcomeText}}</h1> | ||
{{if .ShowLogo}}<img src="logo.png">{{end}} | ||
</body> | ||
</html> | ||
</html> |
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 |
---|---|---|
|
@@ -6,4 +6,4 @@ | |
<h1>Welcome!</h1> | ||
<img src="logo.png"> | ||
</body> | ||
</html> | ||
</html> |
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 |
---|---|---|
|
@@ -6,4 +6,4 @@ | |
<h1>Welcome!</h1> | ||
<img src="logo.png"> | ||
</body> | ||
</html> | ||
</html> |
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 |
---|---|---|
|
@@ -6,4 +6,4 @@ | |
<h1>Welcome!</h1> | ||
<img src="logo.png"> | ||
</body> | ||
</html> | ||
</html> |
6 changes: 6 additions & 0 deletions
6
test-fixtures/examples-expected-output/dependencies-varfile-precedence/README.md
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,6 @@ | ||
# Dependencies example | ||
|
||
This is a boilerplate template that shows an example of using dependencies. It specifies both the | ||
[docs](/examples/docs) and [website](/examples/website) examples as dependencies to show how one boilerplate template | ||
can pull in another. It also defines all the variables needed for both of those dependencies at the top level to show | ||
how variable inheritance works. |
42 changes: 42 additions & 0 deletions
42
...ixtures/examples-expected-output/dependencies-varfile-precedence/docs/README.md
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,42 @@ | ||
# Docs example | ||
|
||
This shows an example of how to use boilerplate to fill in parts of your documentation. | ||
|
||
## Variables | ||
|
||
Here is how you can use a variable: | ||
|
||
The latest version of my app is 0.0.3. | ||
|
||
You could create a CI job that, for each release, regenerates your docs with the latest value of the `Version` variable | ||
passed in using the `--var` option. | ||
|
||
## Snippets | ||
|
||
Here is how to use the `snippet` helper to embed files or parts of files from source code: | ||
|
||
```html | ||
<html> | ||
<head> | ||
<title>{{.Title}}</title> | ||
</head> | ||
<body> | ||
<h1>{{.WelcomeText}}</h1> | ||
{{if .ShowLogo}}<img src="logo.png">{{end}} | ||
</body> | ||
</html> | ||
``` | ||
|
||
## Arithmetic | ||
|
||
Here is how you can use the arithmetic helpers to create a numbered list: | ||
|
||
1. Item | ||
2. Item | ||
3. Item | ||
|
||
And here is another way to do it using the slice helper: | ||
|
||
1. Item | ||
2. Item | ||
3. Item |
1 change: 1 addition & 0 deletions
1
...ependencies-varfile-precedence/docs/interpolated-folder-example-folder/my_example_file.py
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 @@ | ||
# This file and its parent folder both show an example of using Go template syntax and boilerplate variables in their names |
9 changes: 9 additions & 0 deletions
9
test-fixtures/examples-expected-output/dependencies-varfile-precedence/website/index.html
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,9 @@ | ||
<html> | ||
<head> | ||
<title>Boilerplate</title> | ||
</head> | ||
<body> | ||
<h1>Welcome!</h1> | ||
<img src="logo.png"> | ||
</body> | ||
</html> |
Binary file added
BIN
+36.4 KB
...tures/examples-expected-output/dependencies-varfile-precedence/website/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions
6
test-fixtures/examples-expected-output/dependencies-varfile/README.md
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,6 @@ | ||
# Dependencies example | ||
|
||
This is a boilerplate template that shows an example of using dependencies. It specifies both the | ||
[docs](/examples/docs) and [website](/examples/website) examples as dependencies to show how one boilerplate template | ||
can pull in another. It also defines all the variables needed for both of those dependencies at the top level to show | ||
how variable inheritance works. |
42 changes: 42 additions & 0 deletions
42
test-fixtures/examples-expected-output/dependencies-varfile/docs/README.md
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,42 @@ | ||
# I am vars for docs | ||
|
||
This shows an example of how to use boilerplate to fill in parts of your documentation. | ||
|
||
## Variables | ||
|
||
Here is how you can use a variable: | ||
|
||
The latest version of my app is 0.0.3. | ||
|
||
You could create a CI job that, for each release, regenerates your docs with the latest value of the `Version` variable | ||
passed in using the `--var` option. | ||
|
||
## Snippets | ||
|
||
Here is how to use the `snippet` helper to embed files or parts of files from source code: | ||
|
||
```html | ||
<html> | ||
<head> | ||
<title>{{.Title}}</title> | ||
</head> | ||
<body> | ||
<h1>{{.WelcomeText}}</h1> | ||
{{if .ShowLogo}}<img src="logo.png">{{end}} | ||
</body> | ||
</html> | ||
``` | ||
|
||
## Arithmetic | ||
|
||
Here is how you can use the arithmetic helpers to create a numbered list: | ||
|
||
1. Item | ||
2. Item | ||
3. Item | ||
|
||
And here is another way to do it using the slice helper: | ||
|
||
1. Item | ||
2. Item | ||
3. Item |
1 change: 1 addition & 0 deletions
1
...ed-output/dependencies-varfile/docs/interpolated-folder-example-folder/my_example_file.py
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 @@ | ||
# This file and its parent folder both show an example of using Go template syntax and boilerplate variables in their names |
9 changes: 9 additions & 0 deletions
9
test-fixtures/examples-expected-output/dependencies-varfile/website/index.html
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,9 @@ | ||
<html> | ||
<head> | ||
<title>website vars!</title> | ||
</head> | ||
<body> | ||
<h1>Welcome!</h1> | ||
<img src="logo.png"> | ||
</body> | ||
</html> |
Binary file added
BIN
+36.4 KB
test-fixtures/examples-expected-output/dependencies-varfile/website/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
|
@@ -6,4 +6,4 @@ | |
<h1>Welcome!</h1> | ||
<img src="logo.png"> | ||
</body> | ||
</html> | ||
</html> |
Oops, something went wrong.