-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from sassoftware/staging
3.3.0 - July 20, 2023
- Loading branch information
Showing
64 changed files
with
508 additions
and
311 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
name: Linter Analysis | ||
on: | ||
push: | ||
branches: [ '*' ] # '*' will cause the workflow to run on all commits to all branches. | ||
|
||
jobs: | ||
# Hadolint: Job-1 | ||
Hadolint: | ||
name: Hadolint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run Hadolint Action | ||
uses: jbergstroem/[email protected] | ||
with: | ||
dockerfile: ./Dockerfile | ||
config_file: linting-configs/.hadolint.yaml | ||
error_level: 1 # Fail CI based on hadolint output (-1: never, 0: error, 1: warning, 2: info) | ||
|
||
# ShellCheck: Job-2 | ||
ShellCheck: | ||
name: ShellCheck | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
|
||
# .shellcheckrc is read from the current dir | ||
- name: Copy Config to Parent Level Directory | ||
run: cp $(pwd)/linting-configs/.shellcheckrc . | ||
|
||
- name: Run ShellCheck Action | ||
uses: ludeeus/action-shellcheck@master | ||
with: | ||
severity: error | ||
|
||
# TFLint: Job-3 | ||
TFLint: | ||
name: TFLint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Cache Plugin Directory | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.tflint.d/plugins | ||
key: ubuntu-latest-tflint-${{ hashFiles('.tflint.hcl') }} | ||
|
||
- name: Setup TFLint | ||
uses: terraform-linters/[email protected] | ||
with: | ||
tflint_version: latest | ||
github_token: ${{ secrets.LINTER_TOKEN }} | ||
|
||
- name: Initializing viya4-iac-k8s | ||
run: terraform init | ||
|
||
- name: Initializing TFLint | ||
run: TFLINT_LOG=info tflint --init -c "$(pwd)/linting-configs/.tflint.hcl" | ||
|
||
- name: Run TFLint Action | ||
run: TFLINT_LOG=info tflint -c "$(pwd)/linting-configs/.tflint.hcl" --recursive | ||
|
||
# ansible-lint: Job-4 | ||
Ansible-Lint: | ||
name: ansible-lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
|
||
# The latest ansible/ansible-lint-action removed the | ||
# ability to specify configs from other dirs | ||
- name: Copy Config to Parent Level Directory | ||
run: cp $(pwd)/linting-configs/.ansible-lint . | ||
|
||
# ansible-lint does not seem to recognize the .yaml | ||
# extension for the requirements file and it is not | ||
# configurable | ||
- name: Updates requirements extension | ||
run: cp $(pwd)/requirements.yaml requirements.yml | ||
|
||
- name: Install requirements.yaml | ||
run: ansible-galaxy install -r ./requirements.yaml | ||
|
||
- name: Run ansible-lint Action | ||
uses: ansible/[email protected] | ||
env: | ||
ANSIBLE_ROLES_PATH: "./roles" |
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
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
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
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,50 @@ | ||
--- | ||
# .ansible-lint | ||
|
||
profile: moderate | ||
verbosity: 1 | ||
strict: true | ||
|
||
# Enforce variable names to follow pattern below, in addition to Ansible own | ||
# requirements, like avoiding python identifiers. To disable add `var-naming` | ||
# to skip_list. | ||
var_naming_pattern: ^[a-zA-Z0-9_]*$ | ||
|
||
use_default_rules: true | ||
|
||
# Ansible-lint is able to recognize and load skip rules stored inside | ||
# `.ansible-lint-ignore` (or `.config/ansible-lint-ignore.txt`) files. | ||
# To skip a rule just enter filename and tag, like "playbook.yml package-latest" | ||
# on a new line. | ||
skip_list: | ||
- role-name # roles are dynamically selected based on user's choice so we do need to use paths | ||
- yaml[line-length] # it's easier to understand/debug the underlying command when it's not broken up, excessively long lines that make sense to split up should be caught during code review, | ||
- name[template] # task name is being templated, this can be ignored | ||
- command-instead-of-shell # shell should only be used when necessary, swap to command TODO future update requires functionality change | ||
- command-instead-of-module # there are some cases where command calls could be replaced with modules TODO future update requires functionality change | ||
- deprecated-module # In future look for suitable replacement TODO future update requires functionality change | ||
|
||
# Ansible-lint does not automatically load rules that have the 'opt-in' tag. | ||
# You must enable opt-in rules by listing each rule 'id' below. | ||
enable_list: | ||
- args | ||
- empty-string-compare | ||
- no-log-password | ||
- no-same-owner | ||
- yaml | ||
|
||
# exclude_paths included in this file are parsed relative to this file's location | ||
# and not relative to the CWD of execution. CLI arguments passed to the --exclude | ||
# option are parsed relative to the CWD of execution. | ||
exclude_paths: | ||
- examples/bare-metal/sample-ansible-vars.yaml # ignore this file, spacing is done for doc purposes | ||
|
||
# Offline mode disables installation of requirements.yml and schema refreshing | ||
offline: false | ||
|
||
# Define required Ansible's variables to satisfy syntax check | ||
extra_vars: | ||
kubernetes_cri: containerd | ||
kubernetes_cni: calico | ||
kubernetes_loadbalancer: kube_vip | ||
deployment_type: vsphere |
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,3 @@ | ||
ignored: | ||
- DL3008 # Specify version with apt-get install -y <package>=<version> : https://github.com/hadolint/hadolint/wiki/DL3008 | ||
- DL3015 # Require --no-install-recommends to get all required packages for sshpass |
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 @@ | ||
# Review 'man shellcheck' section 'RC FILES' for instructions on adding directives. | ||
|
||
# Allow using `which` since it gives full paths and is common enough | ||
# https://github.com/koalaman/shellcheck/wiki/SC2230 | ||
# https://www.shellcheck.net/wiki/SC2068 we split the string back into an array | ||
disable=SC2230,SC2068 |
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,27 @@ | ||
# For more information on configuring TFlint; see https://github.com/terraform-linters/tflint/blob/master/docs/user-guide/config.md | ||
|
||
# For more information on plugins see https://github.com/terraform-linters/tflint/blob/master/docs/user-guide/plugins.md | ||
|
||
# For more information on TFlint Ruleset for Terraform; see https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.3.0/docs/rules/README.md | ||
|
||
# For more information on TFlint Ruleset for GCP, see https://github.com/terraform-linters/tflint-ruleset-google/blob/master/README.md | ||
|
||
config { | ||
# Enables module inspection. | ||
module = true | ||
} | ||
|
||
plugin "terraform" { | ||
enabled = true | ||
preset = "recommended" | ||
} | ||
|
||
# We specify the versions and providers in the top level versions.tf. | ||
# This stops it from throwing a warning when scanning our modules | ||
# in ./modules | ||
rule "terraform_required_version" { | ||
enabled = false | ||
} | ||
rule "terraform_required_providers" { | ||
enabled = false | ||
} |
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
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
Oops, something went wrong.