Skip to content
This repository was archived by the owner on Jul 3, 2023. It is now read-only.

Commit 5587d96

Browse files
authored
fix: Address linting issues, add automated tests
Update module to leverage common validation pipeline + address issues as part of this effort.
2 parents b64869e + 5a3a273 commit 5587d96

37 files changed

+1610
-390
lines changed

.github/settings.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# The settings are inherited from common repository repo-settings (same file name and location)
2+
# You can append settings that are deeply-merged with the inherited settings.
3+
#
4+
# When you have installed the GitHub App "repo-settings" in this repository,
5+
# any change of this settings.yml file is detected by the GitHub App and
6+
# the settings of this repository are updated immediately.
7+
8+
_extends: repo-settings:.github/common-settings.yml
9+
10+
# repo-specific settings
11+
#
12+
repository:
13+
# By changing this field, you rename the repository.
14+
name: "terraform-ibm-kms"
15+
16+
# The description is displayed under the repository name on the
17+
# organization page and in the 'About' section of the repository.
18+
description: "Terraform modules to create and work with IBM Key Management Service"

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: CI-Pipeline
2+
3+
# Controls when the workflow will run
4+
on:
5+
# Triggers the workflow on push or pull request events but only for the main branch
6+
push:
7+
branches: [main]
8+
pull_request:
9+
branches: [main]
10+
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
13+
14+
jobs:
15+
call-terraform-ci-pipeline:
16+
uses: terraform-ibm-modules/common-pipeline-assets/.github/workflows/[email protected]
17+
secrets: inherit

.github/workflows/release.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Release-Pipeline
2+
3+
on:
4+
workflow_run:
5+
workflows: [CI-Pipeline]
6+
branches: [main]
7+
types:
8+
- completed
9+
10+
# Allows you to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
13+
jobs:
14+
call-terraform-release-pipeline:
15+
if: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') }}
16+
uses: terraform-ibm-modules/common-pipeline-assets/.github/workflows/[email protected]
17+
secrets: inherit

.github/workflows/test.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/workflows/validate_terraform.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.gitignore

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,56 @@
11
# Local .terraform directories
22
**/.terraform/*
3+
34
# .tfstate files
45
*.tfstate
56
*.tfstate.*
67
*.terraform.lock.hcl
8+
79
# Crash log files
810
crash.log
9-
.DS_Store
11+
1012
# Exclude all .tfvars files, which are likely to contain sentitive data, such as
1113
# password, private keys, and other secrets. These should not be part of version
1214
# control as they are data points which are potentially sensitive and subject
1315
# to change depending on the environment.
16+
#
17+
*.tfvars
18+
19+
# Ignore files for local testing
20+
test.tf
21+
22+
# Ignore override files as they are usually used to override resources locally and so
23+
# are not checked in
24+
override.tf
25+
override.tf.json
26+
*_override.tf
27+
*_override.tf.json
28+
29+
# Include override files you do wish to add to version control using negated pattern
30+
#
31+
# !example_override.tf
32+
33+
# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
34+
# example: *tfplan*
35+
36+
# Ignore CLI configuration files
37+
.terraformrc
38+
terraform.rc
39+
40+
# Ignore .tfsec
41+
.tfsec/
42+
43+
# Ignore brew lock
44+
Brewfile.lock.json
45+
46+
# Ignore Mac files
47+
.DS_Store
48+
49+
# Ignore IDE files
50+
.idea/
51+
52+
# Node modules
53+
/node_modules
1454

55+
# Ignore .vscode files
56+
.vscode/

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "common-dev-assets"]
2+
path = common-dev-assets
3+
url = https://github.com/terraform-ibm-modules/common-dev-assets

.pre-commit-config.yaml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./common-dev-assets/module-assets/.pre-commit-config.yaml

.releaserc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"tagFormat": "v${version}",
3+
"branches": ["main"],
4+
"plugins": [
5+
"@semantic-release/commit-analyzer",
6+
"@semantic-release/release-notes-generator",
7+
"@semantic-release/github",
8+
["@semantic-release/git", {
9+
"assets": "false"
10+
}],
11+
["@semantic-release/exec", {
12+
"successCmd": "echo \"SEMVER_VERSION=${nextRelease.version}\" >> $GITHUB_ENV"
13+
}]
14+
]
15+
}

0 commit comments

Comments
 (0)