Commit f73a3bc6 authored by Jacob Vosmaer's avatar Jacob Vosmaer
Browse files

Adjust Makefile and release.sh for gitlab-runner

parent ad15e5de
PROJECT=gitlab PROJECT=gitlab-runner
RELEASE_BUCKET=downloads-packages RELEASE_BUCKET=downloads-packages
RELEASE_BUCKET_REGION=eu-west-1 RELEASE_BUCKET_REGION=eu-west-1
SECRET_DIR:=$(shell openssl rand -hex 20)
PLATFORM_DIR:=$(shell ruby -rjson -e 'puts JSON.parse(`bin/ohai`).values_at("platform", "platform_version").join("-")') PLATFORM_DIR:=$(shell ruby -rjson -e 'puts JSON.parse(`bin/ohai`).values_at("platform", "platform_version").join("-")')
   
build: build:
...@@ -16,8 +15,6 @@ on_tag: ...@@ -16,8 +15,6 @@ on_tag:
git describe --exact-match git describe --exact-match
   
purge: purge:
# Force a new clone of gitlab-rails because we change remotes for CE/EE
rm -rf /var/cache/omnibus/src/gitlab-rails
# Force a new download of Curl's certificate bundle because it gets updated # Force a new download of Curl's certificate bundle because it gets updated
# upstream silently once every while # upstream silently once every while
rm -rf /var/cache/omnibus/cache/cacert.pem rm -rf /var/cache/omnibus/cache/cacert.pem
...@@ -32,14 +29,7 @@ move_to_platform_dir: ...@@ -32,14 +29,7 @@ move_to_platform_dir:
mkdir pkg mkdir pkg
mv ${PLATFORM_DIR} pkg/ mv ${PLATFORM_DIR} pkg/
   
sync: move_to_secret_dir md5 s3_sync sync: md5 s3_sync
move_to_secret_dir:
if support/is_gitlab_ee.sh || support/is_gitlab_com.sh ; then \
mv pkg ${SECRET_DIR} \
&& mkdir pkg \
&& mv ${SECRET_DIR} pkg/ \
; fi
   
md5: md5:
find pkg -name '*.json' -exec cat {} \; find pkg -name '*.json' -exec cat {} \;
......
...@@ -4,16 +4,16 @@ ...@@ -4,16 +4,16 @@
build="$(date '+%s')-$$" build="$(date '+%s')-$$"
   
# Install/update gems for omnibus-ruby # Install/update gems for omnibus-ruby
bundle install bundle install --binstubs
   
# Do the build and capture its output in a .log file # Do the build and capture its output in a .log file
make do_release 2>&1 | tee -a ${build}.log make do_release 2>&1 | tee -a ${build}.log
   
# Check the exit status of `make`, not `tee` # Check the exit status of `make`, not `tee`
if [[ ${PIPESTATUS[0]} -eq 0 ]]; then if [[ ${PIPESTATUS[0]} -eq 0 ]]; then
subject="omnibus-gitlab build ${build} SUCCESS" subject="omnibus-gitlab-runner build ${build} SUCCESS"
else else
subject="omnibus-gitlab build ${build} FAIL" subject="omnibus-gitlab-runner build ${build} FAIL"
fi fi
   
# We assume that email to the current system user will somehow reach the right # We assume that email to the current system user will somehow reach the right
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment