ClickHouse/ci/get-sources.sh
alexey-milovidov 589899ac25
Added scripts for various CI tasks (in progress). (#2356)
* Added initial scripts for CI [#CLICKHOUSE-2]

* CI: development [#CLICKHOUSE-2]

* CI: development [#CLICKHOUSE-2]

* CI: development [#CLICKHOUSE-2]

* CI: development [#CLICKHOUSE-2]

* CI: development [#CLICKHOUSE-2]

* CI: development [#CLICKHOUSE-2]

* CI: development [#CLICKHOUSE-2]

* CI: development [#CLICKHOUSE-2]

* CI: development [#CLICKHOUSE-2]

* CI: development [#CLICKHOUSE-2]

* CI: development [#CLICKHOUSE-2]

* CI: development [#CLICKHOUSE-2]

* CI: development [#CLICKHOUSE-2]

* CI: development [#CLICKHOUSE-2]

* CI: development [#CLICKHOUSE-2]

* CI: development [#CLICKHOUSE-2]

* CI: development [#CLICKHOUSE-2]

* CI: development [#CLICKHOUSE-2]

* CI: development [#CLICKHOUSE-2]

* CI: development [#CLICKHOUSE-2]

* CI: development [#CLICKHOUSE-2]

* CI: development [#CLICKHOUSE-2]

* CI: development [#CLICKHOUSE-2]

* CI: development [#CLICKHOUSE-2]

* CI: development [#CLICKHOUSE-2]

* CI: development [#CLICKHOUSE-2]

* CI: development [#CLICKHOUSE-2]

* CI: development [#CLICKHOUSE-2]
2018-05-14 02:12:30 +03:00

19 lines
503 B
Bash
Executable File

#!/usr/bin/env bash
set -e -x
source default-config
if [[ "$SOURCES_METHOD" == "clone" ]]; then
$SUDO apt-get install -y git
SOURCES_DIR="${WORKSPACE}/sources"
mkdir -p "${SOURCES_DIR}"
git clone --recursive --branch "$SOURCES_BRANCH" "$SOURCES_CLONE_URL" "${SOURCES_DIR}"
pushd "${SOURCES_DIR}"
git checkout "$SOURCES_COMMIT"
popd
elif [[ "$SOURCES_METHOD" == "local" ]]; then
ln -f -s "${PROJECT_ROOT}" "${WORKSPACE}/sources"
else
die "Unknown SOURCES_METHOD"
fi