Skip to content

Commit ac042cb

Browse files
author
ROCHE Jean Francois
committed
Merge pull request #5 in TER/terraform-vcloud-linuxvm from ~JFROCHE/terraform-vcloud-linuxvm:feat/upgrade-provider to master
* commit '2fa38b7d1ad45a21c7e35b28524eee9300b4d7bc': ci: add linter Update changelog Bump version: 0.9.0 → 1.0.0 chore: update readme Update changelog chore: add helper script to upload releases test: use vault to get vcloud credentials chore: update pre-commit config & fix lint chore: go vendoring test: create/test/destroy vm using basic example chore: add validation for zone and dc variables fix: instance fact is empty by default feat: add defaults for storage profile feat: set rhel 8 as default template feat: breaking change: enable cpu/memory hot add Update changelog Bump version: 0.8.0 → 0.9.0 Update changelog chore: add helper files to release
2 parents 0e1d3db + 2fa38b7 commit ac042cb

File tree

218 files changed

+48233
-121
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

218 files changed

+48233
-121
lines changed

.bumpversion.cfg

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[bumpversion]
2+
current_version = 1.0.0
3+
commit = True
4+
tag = True
5+
6+
[bumpversion:file:version.txt]

.chglog/CHANGELOG.tpl.md

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{{ if .Versions -}}
2+
<a name="unreleased"></a>
3+
## [Unreleased]
4+
5+
{{ if .Unreleased.CommitGroups -}}
6+
{{ range .Unreleased.CommitGroups -}}
7+
### {{ .Title }}
8+
{{ range .Commits -}}
9+
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
10+
{{ end }}
11+
{{ end -}}
12+
{{ end -}}
13+
{{ end -}}
14+
15+
{{ range .Versions }}
16+
<a name="{{ .Tag.Name }}"></a>
17+
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }}
18+
{{ range .CommitGroups -}}
19+
### {{ .Title }}
20+
{{ range .Commits -}}
21+
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
22+
{{ end }}
23+
{{ end -}}
24+
25+
{{- if .RevertCommits -}}
26+
### Reverts
27+
{{ range .RevertCommits -}}
28+
- {{ .Revert.Header }}
29+
{{ end }}
30+
{{ end -}}
31+
32+
{{- if .MergeCommits -}}
33+
### Pull Requests
34+
{{ range .MergeCommits -}}
35+
- {{ .Header }}
36+
{{ end }}
37+
{{ end -}}
38+
39+
{{- if .NoteGroups -}}
40+
{{ range .NoteGroups -}}
41+
### {{ .Title }}
42+
{{ range .Notes }}
43+
{{ .Body }}
44+
{{ end }}
45+
{{ end -}}
46+
{{ end -}}
47+
{{ end -}}
48+
49+
{{- if .Versions }}
50+
[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD
51+
{{ range .Versions -}}
52+
{{ if .Tag.Previous -}}
53+
[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
54+
{{ end -}}
55+
{{ end -}}
56+
{{ end -}}

.chglog/config.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
style: github
3+
template: CHANGELOG.tpl.md
4+
info:
5+
title: CHANGELOG
6+
repository_url: http://stash.cirb.lan/projects/CICD/repos/terraform-vcloud-linux-vm
7+
options:
8+
commits:
9+
commit_groups:
10+
header:
11+
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
12+
pattern_maps:
13+
- Type
14+
- Scope
15+
- Subject
16+
notes:
17+
keywords:
18+
- BREAKING CHANGE

.envrc

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
source_up
2+
[[ -f .envrc.local ]] && source ".envrc.local"
3+
export VAULT_ADDR="https://hashivault.cirb.lan"
24
use_nix

.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.terraform
2+
plan
3+
.envrc.local
4+
*.tfstate
5+
*.tfstate.backup
6+
*.lock.hcl
7+
*.bz2

.pre-commit-config.yaml

+22-54
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,43 @@
11
---
22
repos:
3-
-
4-
repo: 'https://github.com/pre-commit/pre-commit-hooks.git'
5-
rev: v2.1.0
3+
- repo: 'https://github.com/pre-commit/pre-commit-hooks.git'
4+
rev: v3.4.0
65
hooks:
7-
-
8-
id: trailing-whitespace
9-
stages:
10-
- commit
11-
- push
6+
- id: trailing-whitespace
127
exclude: '^test/vendor/*'
13-
-
14-
id: check-yaml
15-
stages:
16-
- commit
17-
- push
8+
- id: check-yaml
189
exclude: '^test/vendor/*'
19-
-
20-
id: check-json
21-
stages:
22-
- commit
23-
- push
10+
- id: check-json
2411
exclude: '^test/vendor/*'
25-
-
26-
id: check-merge-conflict
27-
stages:
28-
- commit
29-
- push
30-
-
31-
repo: 'https://github.com/jumanjihouse/pre-commit-hooks.git'
12+
- id: check-merge-conflict
13+
- repo: 'https://github.com/jumanjihouse/pre-commit-hooks.git'
3214
rev: 1.10.2
3315
hooks:
34-
-
35-
id: shellcheck
36-
stages:
37-
- commit
38-
- push
39-
-
40-
id: shfmt
41-
stages:
42-
- commit
43-
- push
44-
-
45-
repo: 'https://github.com/adrienverge/yamllint'
46-
rev: v1.13.0
16+
- id: shellcheck
17+
- id: shfmt
18+
- repo: 'https://github.com/adrienverge/yamllint'
19+
rev: v1.26.0
4720
hooks:
48-
-
49-
id: yamllint
50-
stages:
51-
- commit
52-
- push
21+
- id: yamllint
5322
exclude: '^test/vendor/*'
54-
-
55-
repo: 'https://github.com/jorisroovers/gitlint.git'
23+
- repo: 'https://github.com/jorisroovers/gitlint.git'
5624
rev: v0.10.0
5725
hooks:
58-
-
59-
id: gitlint
26+
- id: gitlint
6027
stages:
6128
- commit-msg
62-
-
63-
repo: 'https://github.com/antonbabenko/pre-commit-terraform'
29+
- repo: 'https://github.com/antonbabenko/pre-commit-terraform'
6430
rev: v1.22.0
6531
hooks:
6632
- id: terraform_fmt
6733
- id: terraform_docs
68-
-
69-
repo: 'https://github.com/dnephin/pre-commit-golang'
70-
rev: HEAD
34+
- repo: 'https://github.com/kuleuven/pre-commit-golang.git'
35+
rev: 9f264676658ed379d73624df77bde7f501bde89a
7136
hooks:
72-
- id: go-fmt
37+
- id: golangci-lint-repo-mod
7338
exclude: '^test/vendor/*'
74-
- id: go-lint
39+
- repo: 'https://github.com/Bahjat/pre-commit-golang.git'
40+
rev: 85c26d4d1c8a086095a057bbdf8adf56af603ce4
41+
hooks:
42+
- id: gofumpt
7543
exclude: '^test/vendor/*'

.yamllint

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
# Based on ansible-lint config
3+
extends: default
4+
5+
rules:
6+
braces:
7+
max-spaces-inside: 1
8+
level: error
9+
brackets:
10+
max-spaces-inside: 1
11+
level: error
12+
colons:
13+
max-spaces-after: -1
14+
level: error
15+
commas:
16+
max-spaces-after: -1
17+
level: error
18+
comments: disable
19+
comments-indentation: disable
20+
document-start: disable
21+
empty-lines:
22+
max: 3
23+
level: error
24+
hyphens:
25+
level: error
26+
indentation: disable
27+
key-duplicates: enable
28+
line-length: disable
29+
new-line-at-end-of-file: disable
30+
new-lines:
31+
type: unix
32+
trailing-spaces: disable
33+
truthy: disable

CHANGELOG.md

+103-24
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,119 @@
11
<a name="unreleased"></a>
22
## [Unreleased]
33

4-
### Ci
5-
- fix release
6-
- generate changelog upon release
74

5+
<a name="v1.0.0"></a>
6+
## [v1.0.0] - 2021-03-15
7+
### Chore
8+
- update readme
9+
- add helper script to upload releases
10+
- update pre-commit config & fix lint
11+
- go vendoring
12+
- add validation for zone and dc variables
813

9-
<a name="v0.2.1"></a>
10-
## v0.2.1 - 2020-01-16
11-
### Build
12-
- update terraform
14+
### Feat
15+
- add defaults for storage profile
16+
- set rhel 8 as default template
17+
- breaking change: enable cpu/memory hot add
18+
19+
### Fix
20+
- instance fact is empty by default
21+
22+
### Test
23+
- use vault to get vcloud credentials
24+
- create/test/destroy vm using basic example
25+
26+
### BREAKING CHANGE
27+
28+
You will need to upgrade the vcd provider version in
29+
your code as well. Use `pkgs.unstable.terraform-provider-vcd` instead of
30+
`pkgs.terraform-provider-vcd` in your `shell.nix'.
31+
32+
33+
<a name="v0.9.0"></a>
34+
## [v0.9.0] - 2021-02-15
35+
### Chore
36+
- add helper files to release
37+
38+
### Feat
39+
- **ansible:** add environment fact in ansible
40+
41+
### Fix
42+
- missing default puppet directories
43+
- salt is not always in the template
44+
45+
46+
<a name="v0.8"></a>
47+
## [v0.8] - 2020-11-17
48+
### Feat
49+
- Create ip variable to be able to set one to a vm
50+
51+
### Fix
52+
- lint
53+
54+
55+
<a name="v0.7"></a>
56+
## [v0.7] - 2020-11-10
57+
58+
<a name="v0.6"></a>
59+
## [v0.6] - 2020-10-19
60+
### Feat
61+
- enable user to define extra metadata
62+
63+
64+
<a name="v0.5"></a>
65+
## [v0.5] - 2020-06-05
66+
67+
<a name="v0.4"></a>
68+
## [v0.4] - 2020-06-05
69+
70+
<a name="v0.3"></a>
71+
## [v0.3] - 2020-03-16
72+
### Feat
73+
- add parameter to power on/off the vm
74+
75+
### Fix
76+
- ignore changest to the template/catalog
1377

14-
### Ci
15-
- fix release
16-
- fix missing git user informations
17-
- remove local terraform state
18-
- update terratest
19-
- remove containers at the end of the tests
20-
- improve tests & lint
21-
- ignore vendor
2278

23-
### Doc
24-
- update input/output documentation
79+
<a name="v0.2"></a>
80+
## [v0.2] - 2020-02-25
81+
### Chore
82+
- store puppet and ansible facts as ini file
2583

2684
### Feat
27-
- add release pipeline
85+
- add pre_script variable
2886

2987
### Fix
30-
- add suffix to user password in vault
88+
- **fdisk:** do not print anything on stderr while testing
89+
- **salt:** override the default minion_id
3190

3291
### Lint
33-
- drop auto generation of documentation
34-
- stop using tflint and do not run tests
92+
- fmt
3593

36-
### Nix
37-
- use buildGoModule to declare go dependencies
94+
95+
<a name="v0.1"></a>
96+
## v0.1 - 2020-02-20
97+
### Feat
98+
- add ip in output
99+
- follow cirb hostname naming convention
100+
- enable usage of an extra disk
101+
- **customization:** run user post script in postcustomization
102+
- **metadata:** add dc metadata
103+
- **storage profile:** add variable to define the storage profile
104+
105+
### Fix
106+
- missing instance metadata in vcloud metadata
107+
- **internal-disk:** wait for disk to be created
38108

39109

40-
[Unreleased]: https://gitea.icts.kuleuven.be/ceif-lnx/rabbitmq.lnx1/compare/v0.2.1...HEAD
110+
[Unreleased]: http://stash.cirb.lan/projects/CICD/repos/terraform-vcloud-linux-vm/compare/v1.0.0...HEAD
111+
[v1.0.0]: http://stash.cirb.lan/projects/CICD/repos/terraform-vcloud-linux-vm/compare/v0.9.0...v1.0.0
112+
[v0.9.0]: http://stash.cirb.lan/projects/CICD/repos/terraform-vcloud-linux-vm/compare/v0.8...v0.9.0
113+
[v0.8]: http://stash.cirb.lan/projects/CICD/repos/terraform-vcloud-linux-vm/compare/v0.7...v0.8
114+
[v0.7]: http://stash.cirb.lan/projects/CICD/repos/terraform-vcloud-linux-vm/compare/v0.6...v0.7
115+
[v0.6]: http://stash.cirb.lan/projects/CICD/repos/terraform-vcloud-linux-vm/compare/v0.5...v0.6
116+
[v0.5]: http://stash.cirb.lan/projects/CICD/repos/terraform-vcloud-linux-vm/compare/v0.4...v0.5
117+
[v0.4]: http://stash.cirb.lan/projects/CICD/repos/terraform-vcloud-linux-vm/compare/v0.3...v0.4
118+
[v0.3]: http://stash.cirb.lan/projects/CICD/repos/terraform-vcloud-linux-vm/compare/v0.2...v0.3
119+
[v0.2]: http://stash.cirb.lan/projects/CICD/repos/terraform-vcloud-linux-vm/compare/v0.1...v0.2

Jenkinsfile

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
library 'cirb'
2+
3+
pipeline {
4+
agent { label 'middleware' }
5+
6+
options {
7+
disableConcurrentBuilds()
8+
buildDiscarder(logRotator(numToKeepStr: '10'))
9+
}
10+
11+
stages {
12+
stage ('Lint') {
13+
steps {
14+
checkout scm
15+
script {
16+
make = new brussels.bric.Make()
17+
make.make(target: 'lint', useNixShell: true)
18+
}
19+
}
20+
}
21+
}
22+
post {
23+
cleanup {
24+
deleteDir()
25+
}
26+
}
27+
}

0 commit comments

Comments
 (0)