Skip to content
Snippets Groups Projects
Commit 8f33d5b5 authored by Andreas Hamacher's avatar Andreas Hamacher
Browse files

Merge branch 'cicd' of gitlab.erc.monash.edu.au:hpc-team/ansible_cluster_in_a_box into cicd

parents 6ad8641d dcfad55f
No related branches found
No related tags found
3 merge requests!297Cicd merge back,!284Cicd,!282CICD
......@@ -62,13 +62,14 @@ yamllint:
- yamllint -c ./.yamllintheat.yaml ./heat
ansiblelint:
allow_failure: true
stage: lint
tags:
- ansiblelint
script:
- echo "stage ansiblelint"
- cd CICD
- python ansiblelint/run_lint.py master_playbook.yml
- python3 ansiblelint/run_lint.py --targets master_playbook.yml
build_cluster_cicd:
......
logdir
......@@ -94,7 +94,9 @@ plays/roles/ldapclient/tasks/main.yml 3 E201 INFO Trailing whitespace
plays/roles/ldapclient/tasks/main.yml 5 E201 INFO Trailing whitespace
plays/roles/move_homedir/tasks/main.yml 3 E201 INFO Trailing whitespace
plays/roles/mysql/handlers/main.yml 2 E201 INFO Trailing whitespace
plays/roles/mysql/tasks/mysql_server.yml 13 E201 INFO Trailing whitespace
plays/roles/mysql/tasks/mysql_server.yml 35 E201 INFO Trailing whitespace
plays/roles/mysql/tasks/mysql_server.yml 37 E201 INFO Trailing whitespace
plays/roles/nfs-client/handlers/main.yml 6 E201 INFO Trailing whitespace
plays/roles/nfs-client/tasks/main.yml 6 E201 INFO Trailing whitespace
plays/roles/nfs-client/tasks/mountFileSystem.yml 1 E201 INFO Trailing whitespace
......
......@@ -26,6 +26,7 @@ plays/roles/jasons_ssh_ca/handlers/main.yml 2 E502 MEDIUM All tasks should be na
plays/roles/jasons_ssh_ca/tasks/main.yml 2 E502 MEDIUM All tasks should be named
plays/roles/lmod/tasks/main.yml 2 E502 MEDIUM All tasks should be named
plays/roles/mysql/tasks/main.yml 2 E502 MEDIUM All tasks should be named
plays/roles/mysql/tasks/mysql_server.yml 32 E503 MEDIUM Tasks that run when changed should likely be handlers
plays/roles/slurm-common/tasks/installMungeFromSource.yml 46 E503 MEDIUM Tasks that run when changed should likely be handlers
plays/roles/slurm-common/tasks/main.yml 95 E306 MEDIUM Shells that use pipes should set the pipefail option
plays/roles/slurm-start/tasks/main.yml 41 E503 MEDIUM Tasks that run when changed should likely be handlers
......
filepath line rule serverity rule description
plays/nfssqlnodes.yml 49 E204 VERY_LOW Lines should be no longer than 160 chars
plays/roles/lmod/tasks/main.yml 52 E204 VERY_LOW Lines should be no longer than 160 chars
plays/roles/mysql/tasks/mysql_server.yml 38 E204 VERY_LOW Lines should be no longer than 160 chars
plays/roles/mysql/tasks/mysql_server.yml 42 E204 VERY_LOW Lines should be no longer than 160 chars
plays/roles/mysql/tasks/mysql_server.yml 32 E204 VERY_LOW Lines should be no longer than 160 chars
plays/roles/mysql/tasks/mysql_server.yml 40 E204 VERY_LOW Lines should be no longer than 160 chars
plays/roles/mysql/tasks/mysql_server.yml 44 E204 VERY_LOW Lines should be no longer than 160 chars
plays/roles/upgrade/tasks/main.yml 20 E403 VERY_LOW Package installs should not use latest
plays/roles/upgrade/tasks/main.yml 32 E403 VERY_LOW Package installs should not use latest
plays/roles/upgrade/tasks/main.yml 38 E403 VERY_LOW Package installs should not use latest
......
......@@ -139,9 +139,13 @@ plays/roles/move_homedir/tasks/main.yml:3: [E201] [INFO] Trailing whitespace
plays/roles/move_homedir/tasks/main.yml:9: [E305] [HIGH] Use shell only when shell functionality is required
plays/roles/mysql/handlers/main.yml:2: [E201] [INFO] Trailing whitespace
plays/roles/mysql/tasks/main.yml:2: [E502] [MEDIUM] All tasks should be named
plays/roles/mysql/tasks/mysql_server.yml:13: [E201] [INFO] Trailing whitespace
plays/roles/mysql/tasks/mysql_server.yml:32: [E204] [VERY_LOW] Lines should be no longer than 160 chars
plays/roles/mysql/tasks/mysql_server.yml:32: [E503] [MEDIUM] Tasks that run when changed should likely be handlers
plays/roles/mysql/tasks/mysql_server.yml:35: [E201] [INFO] Trailing whitespace
plays/roles/mysql/tasks/mysql_server.yml:38: [E204] [VERY_LOW] Lines should be no longer than 160 chars
plays/roles/mysql/tasks/mysql_server.yml:42: [E204] [VERY_LOW] Lines should be no longer than 160 chars
plays/roles/mysql/tasks/mysql_server.yml:37: [E201] [INFO] Trailing whitespace
plays/roles/mysql/tasks/mysql_server.yml:40: [E204] [VERY_LOW] Lines should be no longer than 160 chars
plays/roles/mysql/tasks/mysql_server.yml:44: [E204] [VERY_LOW] Lines should be no longer than 160 chars
plays/roles/nfs-client/handlers/main.yml:6: [E201] [INFO] Trailing whitespace
plays/roles/nfs-client/meta/main.yml:2: [E701] [HIGH] No 'galaxy_info' found
plays/roles/nfs-client/tasks/main.yml:6: [E201] [INFO] Trailing whitespace
......
......@@ -13,7 +13,6 @@ def parse_argument():
parser.add_argument('--logdir', type=Path, default=Path( __file__ + '/../logdir').resolve(), nargs='?', help='log directory default to ./ansiblelint/logdir')
args = parser.parse_args()
args.logdir.mkdir(exist_ok=True)
return args
def parse_rule_output(line):
......@@ -49,6 +48,7 @@ def main():
cmd += ' 2>&1 | tee {}'.format(str(logfile.resolve()))
# print(cmd)
output = subprocess.check_output(cmd, shell=True)
print(output.decode())
output = output.decode().splitlines()
# print(output)
output = [parse_rule_output(line) for line in output]
......@@ -65,8 +65,6 @@ def main():
with current_log.open(mode='w') as f:
f.writelines(['filepath\tline\trule\tserverity\trule description\n'])
# print(v[-1])
# return
f.writelines(['\t'.join(list(i)) + '\n' for i in v])
sys.exit(exit_code)
# return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment