Feature/gitops (#37)
CI Git-Pages Main / Load git-pages.gitea-env.conf to pipeline env (push) Successful in 34s
CI Main / Check existing artifact (push) Successful in 22s
CI Git-Pages Main / Build & Push Helm chart (push) Successful in 48s
CI Main / Bats tests (push) Successful in 1m34s
acc-tests Cucumber test report
CI Main / Cucumber tests (push) Successful in 1m45s
CI Main / Load example-gitea-env.conf to pipeline env (push) Successful in 34s
CI Git-Pages Main / Check existing artifact (push) Successful in 21s
ci-helm-build-push Helm push 0.1.5
unit-tests Bats test report
CI Git-Pages Main / Update chart to the cluster (push) Failing after 0s
ci-docker-build-push Docker push 0.2.25
CI Git-Pages Main / Report Summary (push) Successful in 7s
CI Main / Build & Push Docker (push) Successful in 44s
CI Main / GitOps (push) Failing after 22s
CI Main / Move provider version tag (push) Has been skipped
CI Main / Report Summary (push) Successful in 6s
CI Git-Pages Main / Load git-pages.gitea-env.conf to pipeline env (push) Successful in 34s
CI Main / Check existing artifact (push) Successful in 22s
CI Git-Pages Main / Build & Push Helm chart (push) Successful in 48s
CI Main / Bats tests (push) Successful in 1m34s
acc-tests Cucumber test report
CI Main / Cucumber tests (push) Successful in 1m45s
CI Main / Load example-gitea-env.conf to pipeline env (push) Successful in 34s
CI Git-Pages Main / Check existing artifact (push) Successful in 21s
ci-helm-build-push Helm push 0.1.5
unit-tests Bats test report
CI Git-Pages Main / Update chart to the cluster (push) Failing after 0s
ci-docker-build-push Docker push 0.2.25
CI Git-Pages Main / Report Summary (push) Successful in 7s
CI Main / Build & Push Docker (push) Successful in 44s
CI Main / GitOps (push) Failing after 22s
CI Main / Move provider version tag (push) Has been skipped
CI Main / Report Summary (push) Successful in 6s
Co-authored-by: moilanik <niko.moilanen@tietoevry.com> Reviewed-on: #37
This commit was merged in pull request #37.
This commit is contained in:
Executable
+40
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env bash
|
||||
echo "git $*" >> "${GIT_CALLS_FILE:-/dev/null}"
|
||||
|
||||
[ -z "${GIT_MOCK_FAIL:-}" ] || { echo "git: mock forced failure" >&2; exit 1; }
|
||||
|
||||
if [ "${1:-}" = "push" ] && [ -n "${GIT_MOCK_FAIL_PUSH:-}" ]; then
|
||||
echo "git: mock push failure" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Skip -c config arguments
|
||||
while [ "${1:-}" = "-c" ]; do
|
||||
shift 2
|
||||
done
|
||||
|
||||
case "$1" in
|
||||
clone)
|
||||
TARGET_DIR="${@: -1}"
|
||||
mkdir -p "${TARGET_DIR}/$(dirname "$INPUT_FILE")"
|
||||
echo 'version: 0.1.0' > "${TARGET_DIR}/${INPUT_FILE}"
|
||||
echo "Cloning into '$TARGET_DIR'..."
|
||||
;;
|
||||
add|commit|push|config|init)
|
||||
;;
|
||||
diff)
|
||||
# Default: exit 1 = has changes → proceed to commit
|
||||
# GIT_MOCK_DIFF_NO_CHANGES=1 → exit 0 = no changes → "no change" path
|
||||
if [ -n "${GIT_MOCK_DIFF_NO_CHANGES:-}" ]; then
|
||||
exit 0
|
||||
fi
|
||||
exit 1
|
||||
;;
|
||||
rev-parse)
|
||||
echo "mock-sha-9876543210fedcba9876543210fedcba98765432"
|
||||
;;
|
||||
*)
|
||||
echo "git: unknown command: $*" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user