Skip to content

Commit 0f640e1

Browse files
authored
Merge pull request #1 from tomarv2/develop
Develop
2 parents 7100417 + cc17a35 commit 0f640e1

File tree

6 files changed

+312
-4
lines changed

6 files changed

+312
-4
lines changed

.external_modules/aws/v0.0.1

Lines changed: 0 additions & 1 deletion
This file was deleted.

.external_modules/common/v0.0.1

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/workflows/onrelease.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
on:
2+
push:
3+
# Sequence of patterns matched against refs/tags
4+
tags:
5+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
6+
7+
name: release
8+
9+
jobs:
10+
generate-changelog:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
- uses: BobAnkh/auto-generate-changelog@master
17+
with:
18+
REPO_NAME: ''
19+
ACCESS_TOKEN: ${{secrets.GITHUB_TOKEN}}
20+
BRANCH: ''
21+
PATH: 'CHANGELOG.md'
22+
COMMIT_MESSAGE: 'docs(CHANGELOG): update release notes'
23+
TYPE: 'feat:Feature,fix:Bug Fixes,docs:Documentation,refactor:Refactor,perf:Performance Improvements'
24+
build:
25+
name: Create Release
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v2
30+
31+
- name: Create Release
32+
id: create_release
33+
uses: actions/create-release@v1
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
with:
37+
tag_name: ${{ github.ref }}
38+
release_name: Release ${{ github.ref }}
39+
body: |
40+
Release for version ${{ github.ref }}. Please check CHANGELOG.md for more information.
41+
draft: false
42+
prerelease: false

.github/workflows/pre-commit.yml

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: Pre-Commit
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
- develop
9+
10+
jobs:
11+
# Min Terraform version(s)
12+
getDirectories:
13+
name: Get root directories
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
19+
- name: Install Python
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: '3.8'
23+
architecture: 'x64'
24+
25+
- name: Build matrix
26+
id: matrix
27+
run: |
28+
DIRS=$(python -c "import json; import glob; print(json.dumps([x.replace('/versions.tf', '') for x in glob.glob('./**/versions.tf', recursive=True)]))")
29+
echo "::set-output name=directories::$DIRS"
30+
outputs:
31+
directories: ${{ steps.matrix.outputs.directories }}
32+
33+
preCommitMinVersions:
34+
name: Min TF validate
35+
needs: getDirectories
36+
runs-on: ubuntu-latest
37+
strategy:
38+
matrix:
39+
directory: ${{ fromJson(needs.getDirectories.outputs.directories) }}
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v2
43+
44+
- name: Install Python
45+
uses: actions/setup-python@v2
46+
with:
47+
python-version: '3.8'
48+
architecture: 'x64'
49+
50+
- name: Terraform min/max versions
51+
id: minMax
52+
uses: clowdhaus/terraform-min-max@v1.0.1
53+
with:
54+
directory: ${{ matrix.directory }}
55+
56+
- name: Install Terraform v${{ steps.minMax.outputs.minVersion }}
57+
uses: hashicorp/setup-terraform@v1
58+
with:
59+
terraform_version: ${{ steps.minMax.outputs.minVersion }}
60+
61+
- name: Install pre-commit dependencies
62+
run: pip install pre-commit
63+
64+
65+
# Max Terraform version
66+
getBaseVersion:
67+
name: Module max TF version
68+
runs-on: ubuntu-latest
69+
steps:
70+
- name: Checkout
71+
uses: actions/checkout@v2
72+
73+
- name: Terraform min/max versions
74+
id: minMax
75+
uses: clowdhaus/terraform-min-max@v1.0.1
76+
outputs:
77+
minVersion: ${{ steps.minMax.outputs.minVersion }}
78+
maxVersion: ${{ steps.minMax.outputs.maxVersion }}
79+
80+
preCommitMaxVersion:
81+
name: Max TF pre-commit
82+
runs-on: ubuntu-latest
83+
needs: getBaseVersion
84+
strategy:
85+
fail-fast: false
86+
matrix:
87+
version:
88+
- ${{ needs.getBaseVersion.outputs.maxVersion }}
89+
steps:
90+
- name: Checkout
91+
uses: actions/checkout@v2
92+
93+
- name: Install Python
94+
uses: actions/setup-python@v2
95+
with:
96+
python-version: '3.8'
97+
architecture: 'x64'
98+
99+
- name: Install Terraform v${{ matrix.version }}
100+
uses: hashicorp/setup-terraform@v1
101+
with:
102+
terraform_version: ${{ matrix.version }}
103+
104+
- name: Install pre-commit dependencies
105+
run: |
106+
pip install pre-commit
107+
pip install checkov
108+
curl -L "$(curl -s https://api.github.com/repos/terraform-docs/terraform-docs/releases/latest | grep -o -E "https://.+?-v1.0.1-linux-amd64" | head -n1)" > terraform-docs && chmod +x terraform-docs && sudo mv terraform-docs /usr/bin/
109+
curl -L "$(curl -s https://api.github.com/repos/terraform-linters/tflint/releases/latest | grep -o -E "https://.+?_linux_amd64.zip")" > tflint.zip && unzip tflint.zip && rm tflint.zip && sudo mv tflint /usr/bin/
110+
111+
- name: Execute pre-commit
112+
# Run all pre-commit checks on max version supported
113+
if: ${{ matrix.version == needs.getBaseVersion.outputs.maxVersion }}
114+
run: pre-commit run --color=always --show-diff-on-failure --all-files
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Bump version
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: Bump version and push tag
12+
id: tag_version
13+
uses: mathieudutour/github-tag-action@v6.0
14+
with:
15+
github_token: ${{ secrets.GITHUB_TOKEN }}
16+
17+
- name: Create a GitHub release
18+
uses: ncipollo/release-action@v1
19+
with:
20+
tag: ${{ steps.tag_version.outputs.new_tag }}
21+
name: Release ${{ steps.tag_version.outputs.new_tag }}
22+
body: ${{ steps.tag_version.outputs.changelog }}

.gitignore

Lines changed: 134 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,137 @@ _testmain.go
7979
/test/run.out
8080
/test/times.out
8181

82-
# ignore test file(s)
83-
**test**
82+
<<<<<<< HEAD
83+
# Python
84+
# Editors
85+
.vscode/
86+
.idea/
87+
88+
# Vagrant
89+
.vagrant/
90+
91+
# Mac/OSX
92+
.DS_Store
93+
94+
# Windows
95+
Thumbs.db
96+
97+
# Source for the following rules: https://raw.githubusercontent.com/github/gitignore/master/Python.gitignore
98+
# Byte-compiled / optimized / DLL files
99+
__pycache__/
100+
*.py[cod]
101+
*$py.class
102+
103+
# C extensions
104+
*.so
105+
106+
# Distribution / packaging
107+
.Python
108+
build/
109+
develop-eggs/
110+
dist/
111+
downloads/
112+
eggs/
113+
.eggs/
114+
lib/
115+
lib64/
116+
parts/
117+
sdist/
118+
var/
119+
wheels/
120+
*.egg-info/
121+
.installed.cfg
122+
*.egg
123+
MANIFEST
124+
125+
# PyInstaller
126+
# Usually these files are written by a python script from a template
127+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
128+
*.manifest
129+
*.spec
130+
131+
# Installer logs
132+
pip-log.txt
133+
pip-delete-this-directory.txt
134+
135+
# Unit test / coverage reports
136+
htmlcov/
137+
.tox/
138+
.nox/
139+
.coverage
140+
.coverage.*
141+
.cache
142+
nosetests.xml
143+
coverage.xml
144+
*.cover
145+
.hypothesis/
146+
.pytest_cache/
147+
148+
# Translations
149+
*.mo
150+
*.pot
151+
152+
# Django stuff:
153+
*.log
154+
local_settings.py
155+
db.sqlite3
156+
157+
# Flask stuff:
158+
instance/
159+
.webassets-cache
160+
161+
# Scrapy stuff:
162+
.scrapy
163+
164+
# Sphinx documentation
165+
docs/_build/
166+
167+
# PyBuilder
168+
target/
169+
170+
# Jupyter Notebook
171+
.ipynb_checkpoints
172+
173+
# IPython
174+
profile_default/
175+
ipython_config.py
176+
177+
# pyenv
178+
.python-version
179+
180+
# celery beat schedule file
181+
celerybeat-schedule
182+
183+
# SageMath parsed files
184+
*.sage.py
185+
186+
# Environments
187+
.env
188+
.venv
189+
env/
190+
venv/
191+
ENV/
192+
env.bak/
193+
venv.bak/
194+
195+
# Spyder project settings
196+
.spyderproject
197+
.spyproject
198+
199+
# Rope project settings
200+
.ropeproject
201+
202+
# mkdocs documentation
203+
/site
204+
205+
# mypy
206+
.mypy_cache/
207+
.dmypy.json
208+
dmypy.json
209+
210+
# ignore test related file(s)
211+
**/test**
212+
**.
213+
214+
# ignore terraform external modules
215+
**/.external_modules

0 commit comments

Comments
 (0)