name: pre-commit run_id: commands[0] env HOME: /home/jenkins env LANG: C.UTF-8 env PATH: /w/workspace/oom-master-pre-commit-lint/.tox/pre-commit/bin:/opt/pyenv/bin:/tmp/venv-w4FK/bin:/opt/pyenv/shims:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin env PIP_DISABLE_PIP_VERSION_CHECK: 1 env PYTHONHASHSEED: 507017661 env PYTHONIOENCODING: utf-8 env SSH_AUTH_SOCK: ******************************** env TOX_ENV_DIR: /w/workspace/oom-master-pre-commit-lint/.tox/pre-commit env TOX_ENV_NAME: pre-commit env TOX_WORK_DIR: /w/workspace/oom-master-pre-commit-lint/.tox env VIRTUAL_ENV: /w/workspace/oom-master-pre-commit-lint/.tox/pre-commit env __TOX_ENVIRONMENT_VARIABLE_ORIGINAL_CI: true metadata pid: 2224 cwd: /w/workspace/oom-master-pre-commit-lint allow: /w/workspace/oom-master-pre-commit-lint/.tox/pre-commit/bin/* cmd: pre-commit run --all-files --show-diff-on-failure exit_code: 1 [INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Initializing environment for https://github.com/jorisroovers/gitlint. [INFO] Initializing environment for https://github.com/jorisroovers/gitlint:./gitlint-core[trusted-deps]. [INFO] Initializing environment for https://github.com/Lucas-C/pre-commit-hooks. [INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/Lucas-C/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... trim trailing whitespace.................................................Failed - hook id: trailing-whitespace - exit code: 1 - files were modified by this hook Fixing argo/updateVariables.sh Fixing argo/infra/kustomization.yaml Tabs remover.............................................................Passed pre-commit hook(s) made changes. If you are seeing this message in CI, reproduce locally with: `pre-commit run --all-files`. To run `pre-commit` as part of git workflow, use `pre-commit install`. All changes made by hooks: diff --git a/argo/infra/kustomization.yaml b/argo/infra/kustomization.yaml index 93fcc5963..d6fa4424b 100644 --- a/argo/infra/kustomization.yaml +++ b/argo/infra/kustomization.yaml @@ -39,4 +39,4 @@ resources: - infra-ingress.yaml - django-defectdojo.yaml - trivy-dojo-report-operator.yaml - + diff --git a/argo/updateVariables.sh b/argo/updateVariables.sh index ffa301e6a..cb972e311 100755 --- a/argo/updateVariables.sh +++ b/argo/updateVariables.sh @@ -23,15 +23,15 @@ VARS["GITHUB_REPO"]="ghcr.io" replace_in_file() { local file="$1" local tmpfile="${file}.tmp" - + cp "$file" "$tmpfile" - + for var in "${!VARS[@]}"; do # Replace with value # -i: inplace, but done with tmpfile, if Backup is required sed -i "s|<${var}>|${VARS[$var]}|g" "$tmpfile" done - + mv "$tmpfile" "$file" }