#!/bin/bash # -- -- function logo() { git config --global color.ui auto cat <<'EOF' {{ logo }} EOF } # -- -- # -- -- refname="$1" _oldrev="$2" rev="$3" post_trigger_ci_jobs() { local host="ci_server" local port="9000" local path="/job" local json_payload=$(printf '{"type": "ci_pipeline", "arguments": {"remote": "%s", "rev": "%s", "refname": "%s"}}' "$1" "$2" "$3") which curl 2&>/dev/null || apk add -q curl curl -X POST \ -H "Content-Type: application/json" \ -H "Connection: close" \ -d "$json_payload" \ --no-progress-meter \ "http://$host:$port$path" } # -- -- # --
-- remote="ssh://{{ src_domain }}:2222/$(basename "$PWD")" logo post_trigger_ci_jobs "$remote" "$rev" "$refname" # --
--