inspec/.expeditor/buildkite/verify.sh
Miah Johnson 66fbe4d907
Merge pull request #4776 from inspec/mj/debug
something wonky going on with /tmp, lets debug
2019-12-10 13:41:46 -08:00

38 lines
845 B
Bash
Executable file

#!/bin/bash
echo "--- dependencies"
. .expeditor/buildkite/cache_support.sh
install_cache_deps sudo
echo "--- setting up user"
export LANG=C.UTF-8 LANGUAGE=C.UTF-8
useradd -m -U --uid 2000 normal
echo "normal ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/normal
echo "--- updating rubygems"
gem update --system -N
echo "--- system details"
uname -a
gem env
bundle --version
mount
df /tmp
echo $TMPDIR
echo "--- pull bundle cache"
pull_bundle
echo "--- bundle"
bundle config --local path vendor/bundle
bundle install --jobs=7 --retry=3 --without tools maintenance deploy
echo "--- push bundle cache"
push_bundle
echo "+++ bundle exec rake ${RAKE_TASK:-}"
# TODO: run this as non-root:
# chown -R normal:normal /home/normal /workdir
# su normal -c "bundle exec rake ${RAKE_TASK:-}"
# shellcheck disable=SC2086
bundle exec rake ${RAKE_TASK:-}