From 8677ffd1100db1c58bef408a06d9a734370ada8b Mon Sep 17 00:00:00 2001 From: Sameer Naik Date: Sun, 17 Apr 2016 09:34:31 +0530 Subject: [PATCH 1/2] download tarballs of gitlab-shell and gitlab-workhorse --- assets/build/install.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/assets/build/install.sh b/assets/build/install.sh index 18470084..e649b0a3 100755 --- a/assets/build/install.sh +++ b/assets/build/install.sh @@ -2,8 +2,8 @@ set -e GITLAB_CLONE_URL=https://gitlab.com/gitlab-org/gitlab-ce.git -GITLAB_SHELL_CLONE_URL=https://gitlab.com/gitlab-org/gitlab-shell.git -GITLAB_WORKHORSE_CLONE_URL=https://gitlab.com/gitlab-org/gitlab-workhorse.git +GITLAB_SHELL_URL=https://gitlab.com/gitlab-org/gitlab-shell/repository/archive.tar.gz +GITLAB_WORKHORSE_URL=https://gitlab.com/gitlab-org/gitlab-workhorse/repository/archive.tar.gz GEM_CACHE_DIR="${GITLAB_BUILD_DIR}/cache" @@ -45,8 +45,12 @@ EOF exec_as_git git config --global core.autocrlf input # install gitlab-shell -echo "Cloning gitlab-shell v.${GITLAB_SHELL_VERSION}..." -exec_as_git git clone -q -b v${GITLAB_SHELL_VERSION} --depth 1 ${GITLAB_SHELL_CLONE_URL} ${GITLAB_SHELL_INSTALL_DIR} +echo "Downloading gitlab-workhorse v.${GITLAB_SHELL_VERSION}..." +mkdir -p ${GITLAB_SHELL_INSTALL_DIR} +wget -cq ${GITLAB_SHELL_URL}?ref=v${GITLAB_SHELL_VERSION} -O ${GITLAB_BUILD_DIR}/gitlab-shell-${GITLAB_SHELL_VERSION}.tar.gz +tar xf ${GITLAB_BUILD_DIR}/gitlab-shell-${GITLAB_SHELL_VERSION}.tar.gz --strip 1 -C ${GITLAB_SHELL_INSTALL_DIR} +rm -rf ${GITLAB_BUILD_DIR}/gitlab-shell-${GITLAB_SHELL_VERSION}.tar.gz +chown -R ${GITLAB_USER}: ${GITLAB_SHELL_INSTALL_DIR} cd ${GITLAB_SHELL_INSTALL_DIR} exec_as_git cp -a ${GITLAB_SHELL_INSTALL_DIR}/config.yml.example ${GITLAB_SHELL_INSTALL_DIR}/config.yml @@ -55,8 +59,12 @@ exec_as_git ./bin/install # remove unused repositories directory created by gitlab-shell install exec_as_git rm -rf ${GITLAB_HOME}/repositories -echo "Cloning gitlab-workhorse v.${GITLAB_WORKHORSE_VERSION}..." -exec_as_git git clone -q -b v${GITLAB_WORKHORSE_VERSION} --depth 1 ${GITLAB_WORKHORSE_CLONE_URL} ${GITLAB_WORKHORSE_INSTALL_DIR} +echo "Downloading gitlab-workhorse v.${GITLAB_WORKHORSE_VERSION}..." +mkdir -p ${GITLAB_WORKHORSE_INSTALL_DIR} +wget -cq ${GITLAB_WORKHORSE_URL}?ref=v${GITLAB_WORKHORSE_VERSION} -O ${GITLAB_BUILD_DIR}/gitlab-workhorse-${GITLAB_WORKHORSE_VERSION}.tar.gz +tar xf ${GITLAB_BUILD_DIR}/gitlab-workhorse-${GITLAB_WORKHORSE_VERSION}.tar.gz --strip 1 -C ${GITLAB_WORKHORSE_INSTALL_DIR} +rm -rf ${GITLAB_BUILD_DIR}/gitlab-workhorse-${GITLAB_WORKHORSE_VERSION}.tar.gz +chown -R ${GITLAB_USER}: ${GITLAB_WORKHORSE_INSTALL_DIR} echo "Downloading Go ${GOLANG_VERSION}..." wget -cnv https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-amd64.tar.gz -P ${GITLAB_BUILD_DIR}/ From a5da5077775c441fd7b30de11aaf485aed9615f2 Mon Sep 17 00:00:00 2001 From: Sameer Naik Date: Sun, 17 Apr 2016 09:35:50 +0530 Subject: [PATCH 2/2] shallow clone gitlab-ce from the official github mirror --- assets/build/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/build/install.sh b/assets/build/install.sh index e649b0a3..8bc608cf 100755 --- a/assets/build/install.sh +++ b/assets/build/install.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -GITLAB_CLONE_URL=https://gitlab.com/gitlab-org/gitlab-ce.git +GITLAB_CLONE_URL=https://github.com/gitlabhq/gitlabhq.git GITLAB_SHELL_URL=https://gitlab.com/gitlab-org/gitlab-shell/repository/archive.tar.gz GITLAB_WORKHORSE_URL=https://gitlab.com/gitlab-org/gitlab-workhorse/repository/archive.tar.gz