Skip to content

Commit 6fab671

Browse files
committed
Add bug report issue templates
1 parent 6ba800b commit 6fab671

File tree

4 files changed

+204
-11
lines changed

4 files changed

+204
-11
lines changed
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
name: Local installation bug report
3+
about: Create a bug report
4+
labels:
5+
- kind/bug
6+
- area/docker
7+
---
8+
9+
<!--
10+
Thank you for helping to improve pre-commit-terraform!
11+
12+
Please be sure to search for open issues before raising a new one. We use issues
13+
for bug reports and feature requests. Please note, this template is for bugs
14+
report, not feature requests.
15+
-->
16+
17+
### Describe the bug
18+
19+
<!--
20+
Please let us know what behavior you expected and how terraform-docs diverged
21+
from that behavior.
22+
-->
23+
24+
25+
### How can we reproduce it?
26+
27+
<!--
28+
Help us to reproduce your bug as succinctly and precisely as possible. Any and
29+
all steps or script that triggers the issue are highly appreciated!
30+
31+
Do you have long logs to share? Please use collapsible sections, that can be created via:
32+
33+
<details><summary>SECTION_NAME</summary>
34+
35+
```bash
36+
YOUR_LOG_HERE
37+
```
38+
39+
</details>
40+
-->
41+
42+
43+
### Environment information
44+
45+
* OS:
46+
47+
<!-- I.e.:
48+
OS: Windows 10
49+
OS: Win10 with Ubuntu 20.04 on WSL2
50+
OS: MacOS
51+
OS: Ubuntu 20.04
52+
-->
53+
54+
* `docker info`:
55+
56+
<details><summary><code>command output</summary>
57+
58+
```bash
59+
INSERT_OUTPUT_HERE
60+
```
61+
62+
</details>
63+
64+
* Docker image tag/git commit:
65+
66+
* Tools versions. Don't forget to specify right tag in command -
67+
`TAG=latest && docker run --entrypoint cat pre-commit:$TAG /usr/bin/tools_versions_info`
68+
69+
```bash
70+
INSERT_OUTPUT_HERE
71+
```
72+
73+
* `.pre-commit-config.yaml`:
74+
75+
<details><summary>file content</summary>
76+
77+
```bash
78+
INSERT_FILE_CONTENT_HERE
79+
```
80+
81+
</details>
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
---
2+
name: Docker bug report
3+
about: Create a bug report
4+
labels:
5+
- kind/bug
6+
- area/local_installation
7+
---
8+
9+
<!--
10+
Thank you for helping to improve pre-commit-terraform!
11+
12+
Please be sure to search for open issues before raising a new one. We use issues
13+
for bug reports and feature requests. Please note, this template is for bugs
14+
report, not feature requests.
15+
-->
16+
17+
### Describe the bug
18+
19+
<!--
20+
Please let us know what behavior you expected and how terraform-docs diverged
21+
from that behavior.
22+
-->
23+
24+
25+
### How can we reproduce it?
26+
27+
<!--
28+
Help us to reproduce your bug as succinctly and precisely as possible. Any and
29+
all steps or script that triggers the issue are highly appreciated!
30+
31+
Do you have long logs to share? Please use collapsible sections, that can be created via:
32+
33+
<details><summary>SECTION_NAME</summary>
34+
35+
```bash
36+
YOUR_LOG_HERE
37+
```
38+
39+
</details>
40+
-->
41+
42+
43+
### Environment information
44+
45+
* OS:
46+
<!-- I.e.:
47+
OS: Windows 10
48+
OS: Win10 with Ubuntu 20.04 on WSL2
49+
OS: MacOS
50+
OS: Ubuntu 20.04
51+
-->
52+
53+
* `uname -a` and/or `systeminfo | Select-String "^OS"` output:
54+
55+
```bash
56+
INSERT_OUTPUT_HERE
57+
```
58+
59+
<!-- I.e.:
60+
```bash
61+
PS C:\Users\vm> systeminfo | Select-String "^OS"
62+
63+
OS Name: Microsoft Windows 10 Pro
64+
OS Version: 10.0.19043 N/A Build 19043
65+
OS Manufacturer: Microsoft Corporation
66+
OS Configuration: Standalone Workstation
67+
OS Build Type: Multiprocessor Free
68+
69+
$ uname -a
70+
Linux DESKTOP-C7315EF 5.4.72-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
71+
```
72+
-->
73+
74+
* Tools availability and versions:
75+
76+
<!-- For check all needed version run next script:
77+
78+
$0 << EOF
79+
pre-commit --version 2>/dev/null || echo "pre-commit SKIPPED"
80+
terraform --version | head -n 1 2>/dev/null || echo "terraform SKIPPED"
81+
python --version 2>/dev/null || echo "python SKIPPED"
82+
python3 --version 2>/dev/null || echo "python3 SKIPPED"
83+
echo -n "checkov " && checkov --version 2>/dev/null || echo "checkov SKIPPED"
84+
terraform-docs --version 2>/dev/null || echo "terraform-docs SKIPPED"
85+
terragrunt --version 2>/dev/null || echo "terragrunt SKIPPED"
86+
echo -n "terrascan " && terrascan version 2>/dev/null || echo "terrascan SKIPPED"
87+
tflint --version 2>/dev/null || echo "tflint SKIPPED"
88+
echo -n "tfsec " && tfsec --version 2>/dev/null || echo "tfsec SKIPPED"
89+
EOF
90+
91+
-->
92+
93+
```bash
94+
INSERT_TOOLS_VERSIONS_HERE
95+
```
96+
97+
98+
* `.pre-commit-config.yaml`:
99+
100+
<details><summary>file content</summary>
101+
102+
```bash
103+
INSERT_FILE_CONTENT_HERE
104+
```
105+
106+
</details>

Dockerfile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -123,18 +123,18 @@ RUN . /.env && \
123123
) && chmod +x tfsec \
124124
; fi
125125

126-
# Checking binaries versions
126+
# Checking binaries versions and write it to debug file
127127
RUN . /.env && \
128-
echo "\n\n" && \
129-
pre-commit --version && \
130-
terraform --version | head -n 1 && \
131-
(if [ "$CHECKOV_VERSION" != "false" ]; then echo -n "checkov " && checkov --version; else echo "checkov SKIPPED" ; fi) && \
132-
(if [ "$TERRAFORM_DOCS_VERSION" != "false" ]; then ./terraform-docs --version; else echo "terraform-docs SKIPPED"; fi) && \
133-
(if [ "$TERRAGRUNT_VERSION" != "false" ]; then ./terragrunt --version; else echo "terragrunt SKIPPED" ; fi) && \
134-
(if [ "$TERRASCAN_VERSION" != "false" ]; then echo -n "terrascan " && ./terrascan version; else echo "terrascan SKIPPED" ; fi) && \
135-
(if [ "$TFLINT_VERSION" != "false" ]; then ./tflint --version; else echo "tflint SKIPPED" ; fi) && \
136-
(if [ "$TFSEC_VERSION" != "false" ]; then echo -n "tfsec " && ./tfsec --version; else echo "tfsec SKIPPED" ; fi) && \
137-
echo "\n\n"
128+
F=tools_versions_info && \
129+
pre-commit --version >> $F && \
130+
terraform --version | head -n 1 >> $F && \
131+
(if [ "$CHECKOV_VERSION" != "false" ]; then echo "checkov $(checkov --version)" >> $F; else echo "checkov SKIPPED" >> $F ; fi) && \
132+
(if [ "$TERRAFORM_DOCS_VERSION" != "false" ]; then ./terraform-docs --version >> $F; else echo "terraform-docs SKIPPED" >> $F; fi) && \
133+
(if [ "$TERRAGRUNT_VERSION" != "false" ]; then ./terragrunt --version >> $F; else echo "terragrunt SKIPPED" >> $F ; fi) && \
134+
(if [ "$TERRASCAN_VERSION" != "false" ]; then echo "terrascan $(./terrascan version)" >> $F; else echo "terrascan SKIPPED" >> $F ; fi) && \
135+
(if [ "$TFLINT_VERSION" != "false" ]; then ./tflint --version >> $F; else echo "tflint SKIPPED" >> $F ; fi) && \
136+
(if [ "$TFSEC_VERSION" != "false" ]; then echo "tfsec $(./tfsec --version)" >> $F; else echo "tfsec SKIPPED" >> $F ; fi) && \
137+
echo "\n\n" && cat $F && echo "\n\n"
138138

139139
# based on debian:buster-slim
140140
# https://github.com/docker-library/python/blob/master/3.9/buster/slim/Dockerfile

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,12 @@ Docker:
163163
docker run -v $(pwd):/lint -w /lint pre-commit run -a
164164
```
165165

166+
> You be able list tools versions when needed
167+
>
168+
> ```bash
169+
> TAG=latest && docker run --entrypoint cat pre-commit:$TAG /usr/bin/tools_versions_info
170+
> ```
171+
166172
## Available Hooks
167173
168174
There are several [pre-commit](https://pre-commit.com/) hooks to keep Terraform configurations (both `*.tf` and `*.tfvars`) and Terragrunt configurations (`*.hcl`) in a good shape:

0 commit comments

Comments
 (0)