summaryrefslogtreecommitdiff
path: root/bin/setup
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-07-06 11:03:35 -0600
committermo khan <mo.khan@gmail.com>2020-07-10 08:53:37 -0600
commit36cdb0040abda394264455a1fdf3d6782af95ceb (patch)
tree54093c956c0f4dcf4c2ad352847017aee9a88edc /bin/setup
parentc7385965b4166fb6ab2db3387c67cd54aef1b8df (diff)
Isolate license_management ruby from project
* Target ruby version 2.7.1 * Add spec to fetch gems from a custom source * Add proxy to rubygems.org config * Specify default env vars to support offline environment * Cleanup custom certificates after spec * Inline docker-test script * Do not install license_finder with each installed ruby * Increase gem log verbosity and include backtrace * Extract test fixtures for the different ruby scenarios * Find *.gemspec files in gems dir * Use RUBYLIB to hijack src path * Run scan from project path dir
Diffstat (limited to 'bin/setup')
-rwxr-xr-xbin/setup11
1 files changed, 8 insertions, 3 deletions
diff --git a/bin/setup b/bin/setup
index b54a99f..03f0938 100755
--- a/bin/setup
+++ b/bin/setup
@@ -1,11 +1,16 @@
-#!/bin/sh
+#!/bin/bash -l
set -e
cd "$(dirname "$0")/.."
-gem install bundler --conservative -v '~> 2.0' -q
-bundle install --quiet
+export PATH="/builds/gitlab-org/security-products/license-management/exe:/opt/gitlab/embedded/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+
if [ ! -f /usr/sbin/haproxy ] && command -v apt-get; then
apt-get update -y && apt-get install -y --no-install-recommends haproxy
fi
+
+[[ -z "$CI_JOB_ID" ]] && enable_dev_mode
+bundle config --local path vendor
+bundle config --local jobs "$(nproc)"
+bundle install