From 4af010242bc0e16c75742355fc9ffa8dab4ff41d Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Thu, 29 Dec 2022 12:33:19 +0100 Subject: [PATCH] Adding Github output sections into gitlab/linter.yaml --- .gitlab-ci.yml | 2 +- gitlab/linter.yaml | 50 +++++++++++++++++++++++++++++----------------- 2 files changed, 33 insertions(+), 19 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index da42af1..194429d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,7 +25,7 @@ YAML-linter: - docker script: - > - echo -e "\e[0Ksection_start:$( date +%s ):install_yamllint[collapsed=true]\r\e[0KGenerate locales ..."; + echo -e "\e[0Ksection_start:$( date +%s ):install_yamllint[collapsed=true]\r\e[0KInstalling yamllint ..."; apt install --yes yamllint; echo -e "\e[0Ksection_end:$( date +%s ):install_yamllint\r\e[0K" - python --version diff --git a/gitlab/linter.yaml b/gitlab/linter.yaml index 7c62b74..38800c1 100644 --- a/gitlab/linter.yaml +++ b/gitlab/linter.yaml @@ -20,16 +20,16 @@ Linter: before_script: - locale -a - > - echo -e "\e[0Ksection_start:$( date +%s ):apt_update[collapsed=true]\r\e[0KAPT update ..." - apt update + echo -e "\e[0Ksection_start:$( date +%s ):apt_update[collapsed=true]\r\e[0KAPT update ..."; + apt update; echo -e "\e[0Ksection_end:$( date +%s ):apt_update\r\e[0K" - > - echo -e "\e[0Ksection_start:$( date +%s ):dist_upgrade[collapsed=true]\r\e[0KAPT dist-upgrade ..." - apt dist-upgrade --yes + echo -e "\e[0Ksection_start:$( date +%s ):dist_upgrade[collapsed=true]\r\e[0KAPT dist-upgrade ..."; + apt dist-upgrade --yes; echo -e "\e[0Ksection_end:$( date +%s ):dist_upgrade\r\e[0K" - > - echo -e "\e[0Ksection_start:$( date +%s ):install_additional[collapsed=true]\r\e[0KInstalling additional packages ..." - apt install --yes --no-install-recommends sudo locales gettext + echo -e "\e[0Ksection_start:$( date +%s ):install_additional[collapsed=true]\r\e[0KInstalling additional packages ..."; + apt install --yes --no-install-recommends sudo locales gettext; echo -e "\e[0Ksection_end:$( date +%s ):install_additional\r\e[0K" - > if test -f /etc/locale.gen; then @@ -43,24 +43,38 @@ Linter: else echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen fi - - locale-gen + - > + echo -e "\e[0Ksection_start:$( date +%s ):locale_gen[collapsed=true]\r\e[0KGenerate locales ..."; + locale-gen; + echo -e "\e[0Ksection_end:$( date +%s ):locale_gen\r\e[0K" - locale -a - - pip install --upgrade pip - > + echo -e "\e[0Ksection_start:$( date +%s ):update_pip[collapsed=true]\r\e[0KUpdating pip via pip ..."; + pip install --upgrade pip; + echo -e "\e[0Ksection_end:$( date +%s ):update_pip\r\e[0K" + - > + echo -e "\e[0Ksection_start:$( date +%s ):update_outdated[collapsed=true]\r\e[0KUpdating Outdated pip modules ..."; if [[ -n "${UPDATE_ALL_PIP_MODULES}" && "${UPDATE_ALL_PIP_MODULES}" == "y" ]] ; then - echo ' ' - echo "Updating all outdated PIP modules." + echo ' '; + echo "Updating all outdated PIP modules."; for module in $( pip list --outdated | awk '{if(NR>=3) print $1}' ); do - echo ' ' - echo "Updating module '${module}' ..." - pip install --upgrade "${module}" - done - echo ' ' - fi + echo ' '; + echo "Updating module '${module}' ..."; + pip install --upgrade "${module}"; + done; + echo ' '; + fi; + echo -e "\e[0Ksection_end:$( date +%s ):update_outdated\r\e[0K" script: - - apt install --yes shellcheck yamllint + - > + echo -e "\e[0Ksection_start:$( date +%s ):install_yamllint[collapsed=true]\r\e[0KInstalling yamllint ..."; + apt install --yes shellcheck yamllint + echo -e "\e[0Ksection_end:$( date +%s ):install_yamllint\r\e[0K" - python --version - - pip install --upgrade --upgrade-strategy eager flake8 pylint + - > + echo -e "\e[0Ksection_start:$( date +%s ):install_flake[collapsed=true]\r\e[0KInstalling flake8 and pylint ..."; + pip install --upgrade --upgrade-strategy eager flake8 pylint; + echo -e "\e[0Ksection_end:$( date +%s ):install_flake\r\e[0K" - > if [[ -f ".gitlab-ci.yml" ]] ; then YAML_FILE_PATHS=".gitlab-ci.yml"; else YAML_FILE_PATHS=""; fi; if [[ -d ".github" ]] ; then -- 2.39.5