diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 96a15a04f120593bbbfa6c0336feb30e41040cc8..a4387412b9bcb03553bd8ac1cca79ff6cff83a5d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -41,6 +41,15 @@ build: - kubectl config set-context k3s --cluster=k3s --user=default - kubectl config use-context k3s - kubectl version + - | + function expected_error() { + echo "Expected error but exited with $?, failing build!" + exit 1 + } + + function failed_as_expected() { + echo "Failed as expected and exited with $?" + } test-shellcheck: stage: test @@ -251,17 +260,6 @@ release-tag: only: - tags -before_script: - - | - function expected_error() { - echo "Expected error but exited with $?, failing build!" - exit 1 - } - - function failed_as_expected() { - echo "Failed as expected and exited with $?" - } - publish: extends: .semantic-release only: