This repository has been archived by the owner on Mar 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
/
system_report.sh
136 lines (118 loc) · 4.52 KB
/
system_report.sh
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#!/bin/bash
set -e
if [[ "${IS_IGNORE_ERRORS}" == "true" ]] ; then
echo " (i) Ignore Errors: enabled"
set +e
else
echo " (i) Ignore Errors: disabled"
fi
function dpkgVersion() {
if [[ $# -eq 0 ]] ; then
echo 'dpkgVersion: Package arg is required'
exit 1
fi
ver_line="$(dpkg -s $1 | sed -n 's/Version: \(.*\)/\1/p')" ;
echo "* $1: $ver_line"
}
echo
echo '#'
echo '# This System Report was generated by: https://github.com/bitrise-docker/bitrise-base/blob/master/system_report.sh'
echo '# Pull Requests are welcome!'
echo '#'
echo
echo
echo "=== Revision / ID ======================"
echo "* BITRISE_DOCKER_REV_NUMBER_BASE: $BITRISE_DOCKER_REV_NUMBER_BASE"
echo "========================================"
echo
echo
echo "=== Pre-installed lib versions ========"
dpkgVersion zlib1g-dev
dpkgVersion libssl-dev
dpkgVersion libreadline6-dev
dpkgVersion libyaml-dev
dpkgVersion libsqlite3-dev
echo "======================================="
echo
# Make sure that the reported version is only
# a single line!
echo
echo "=== Pre-installed tool versions ========"
ver_line="$(go version)" ; echo "* Go: $ver_line"
ver_line="$(ruby --version)" ; echo "* Ruby: $ver_line"
ver_line="$(bundle --version)" ; echo " * bundler: $ver_line"
ver_line="$(gem --version)" ; echo " * rubygems: $ver_line"
ver_line="$(python --version 2>&1 >/dev/null)" ; echo "* Python: $ver_line"
ver_line="$(pip --version)" ; echo " * pip: $ver_line"
ver_line="$(node --version)" ; echo "* Node.js: $ver_line"
ver_line="$(npm --version)" ; echo "* NPM: $ver_line"
ver_line="$(yarn --version)" ; echo "* Yarn: $ver_line"
ver_line="$(aws --version)" ; echo "* aws: $ver_line"
ver_line="$(jq --version)" ; echo "* jq: $ver_line"
ver_line="$(aws --version)" ; echo "* aws-cli: $ver_line"
echo
ver_line="$(git --version)" ; echo "* git: $ver_line"
ver_line="$(git lfs version)" ; echo "* git lfs: $ver_line"
ver_line="$(hg --version | grep version)" ; echo "* mercurial/hg: $ver_line"
ver_line="$(curl --version | grep curl)" ; echo "* curl: $ver_line"
ver_line="$(wget --version | grep 'GNU Wget')" ; echo "* wget: $ver_line"
ver_line="$(rsync --version | grep version)" ; echo "* rsync: $ver_line"
ver_line="$(unzip -v | head -n 1)" ; echo "* unzip: $ver_line"
ver_line="$(zip -v | head -n 2 | tail -n 1)"; echo "* zip: $ver_line"
ver_line="$(tar --version | head -n 1)" ; echo "* tar: $ver_line"
ver_line="$(tree --version)" ; echo "* tree: $ver_line"
ver_line="$(gcc --version | head -n 1)" ; echo "* gcc: $ver_line"
ver_line="$(clang --version | head -n 1)" ; echo "* clang: $ver_line"
ver_line="$(convert --version | head -1)" ; echo "* imagemagick (convert): $ver_line"
echo
ver_line="$(sudo --version 2>&1 | grep 'Sudo version')" ; echo "* sudo: $ver_line"
echo
ver_line="$(docker --version)" ; echo "* docker: $ver_line"
ver_line="$(docker-compose --version)" ; echo "* docker-compose: $ver_line"
echo
echo "--- Bitrise CLI tool versions"
ver_line="$(bitrise --version)" ; echo "* bitrise: $ver_line"
ver_line="$(/root/.bitrise/tools/stepman --version)" ; echo "* stepman: $ver_line"
ver_line="$(/root/.bitrise/tools/envman --version)" ; echo "* envman: $ver_line"
if [[ "$CI" == "false" ]] ; then
set +e
fi
ver_line="$(bitrise-bridge --version || echo 'No bitrise-bridge installed')" ; echo "* bitrise-bridge: $ver_line"
set -e
echo "========================================"
echo
echo
echo "=== All Ruby GEMs ======================"
gem list
echo "========================================"
echo
echo
echo "=== Linux info ========================="
echo "* uname -a"
uname -a
echo "* uname -r"
uname -r
echo "* lsb_release --all"
lsb_release --all
echo "========================================"
echo
echo
echo "=== Docker info ========================"
docker info
echo "========================================"
echo
echo
echo "=== Docker pre-cached images ==========="
docker images --format '{{ .Repository }} - {{ .Size }}'
echo "========================================"
echo
echo
echo "=== System infos ======================="
echo "* Free disk space under / :"
df -kh /
echo "* Free disk space under /bitrise/ :"
df -kh /bitrise/src
echo "* Free RAM & swap:"
free -mh
echo "========================================"
echo