Commit fff945f0 authored by Jacob Vosmaer's avatar Jacob Vosmaer
Browse files
parents ceee1417 f73a3bc6
PLATFORM_DIR:=$(shell ruby -rjson -e 'puts JSON.parse(`bin/ohai`).values_at("platform", "platform_version").join("-")')
bin/omnibus build ${PROJECT} --override append_timestamp:false --log-level info
do_release: no_changes on_tag purge build move_to_platform_dir sync
git diff --quiet HEAD
git describe --exact-match
# Force a new download of Curl's certificate bundle because it gets updated
# upstream silently once every while
rm -rf /var/cache/omnibus/cache/cacert.pem
# Clear out old packages to prevent uploading them a second time to S3
rm -rf /var/cache/omnibus/pkg
mkdir -p pkg
(cd pkg && find . -delete)
# Instead of pkg/gitlab-xxx.deb, put all files in pkg/ubuntu/gitlab-xxx.deb
mv pkg ${PLATFORM_DIR}
mkdir pkg
mv ${PLATFORM_DIR} pkg/
sync: md5 s3_sync
find pkg -name '*.json' -exec cat {} \;
aws s3 sync pkg/ s3://${RELEASE_BUCKET} --acl public-read --region ${RELEASE_BUCKET_REGION}
gitlab-runner Omnibus project
See [doc/](doc/
Below is the auto-generated README from omnibus-ruby.
This project creates full-stack platform-specific packages for
# Omnibus packages for GitLab Runner
- [Installation instructions](install/
# Installing GitLab Runner
Below we describe the one-time steps you need to perform to set up a new
gitlab-runner instance.
## Ubuntu 12.04, 14.04 and Centos 6
# Create the user that will run your builds
sudo useradd -m -r gitlab-runner
# Register your runner instance with a GitLab CI Coordinator
sudo /opt/gitlab-runner/bin/setup -C /home/gitlab-runner
# Install and start the gitlab-runner Upstart script
sudo cp /opt/gitlab-runner/doc/install/upstart/gitlab-runner.conf /etc/init/
sudo service gitlab-runner start
The runner will write log messages via Upstart to
# Upstart configuration file for gitlab-ci-runner
# Control with:
# sudo service gitlab-runner start
description "GitLab Runner"
author "GitLab B.V."
start on runlevel [2345]
env HOME=/home/gitlab-runner
# Always restart the runner if it dies / exits
# Log to /var/log/upstart/
console log
# Run the process as gitlab-runner:gitlab-runner
setuid gitlab-runner
setgid gitlab-runner
export HOME=$HOME
exec /opt/gitlab-runner/bin/runner -C $HOME
end script
# Generate a build ID based on the current time and the PID of this script
build="$(date '+%s')-$$"
# Install/update gems for omnibus-ruby
bundle install --binstubs
# Do the build and capture its output in a .log file
make do_release 2>&1 | tee -a ${build}.log
# Check the exit status of `make`, not `tee`
if [[ ${PIPESTATUS[0]} -eq 0 ]]; then
subject="omnibus-gitlab-runner build ${build} SUCCESS"
subject="omnibus-gitlab-runner build ${build} FAIL"
# We assume that email to the current system user will somehow reach the right
# human eyes
tail -n 20 ${build}.log | sed 's/.*\r//' | mail -s "${subject}" $(cat ~/.forward)
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