-
Notifications
You must be signed in to change notification settings - Fork 900
/
Copy pathbefore_install
executable file
·46 lines (38 loc) · 1.25 KB
/
before_install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
set -e
APP_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." &>/dev/null && pwd)
if [ -n "$CI" ]; then
echo "== Installing system packages =="
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev
echo
# Install gettext for I18n msgfmt specs
sudo apt-get install -y gettext
echo
if [ -n "$ACT" ]; then
# Install cmake so we can build rugged gem
sudo apt-get install -y cmake
echo
fi
# Install ansible-runner for ansible-runner execution specs
if [ -n "$ACT" ]; then
sudo apt-get install -y python3-pip ansible
fi
pip3 install ansible-runner 'setuptools>=62.4.0'
ansible --version
ansible-runner --version
echo
fi
if [ -n "$CI" ]; then
echo "== Setup git config =="
git config --global user.name "ManageIQ"
git config --global user.email "[email protected]"
git config --global init.defaultBranch "master"
echo
# Gemfile.lock.release only applies to non-master branches and PRs to non-master branches
if [[ "$GITHUB_REPOSITORY_OWNER" = "ManageIQ" && "$GITHUB_BASE_REF" != "master" && "$GITHUB_REF_NAME" != "master" && "$GITHUB_REF_NAME" != "dependabot/"* ]]; then
echo "== Setup Gemfile.lock.release =="
cp -f "$APP_ROOT/Gemfile.lock.release" "$APP_ROOT/Gemfile.lock"
echo
fi
fi