-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-flow.bootstrap
61 lines (50 loc) · 1.72 KB
/
build-flow.bootstrap
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
BootStrap: docker
From: ubuntu:xenial
%labels
AUTHOR [email protected]
%setup
%post
# If not provided by environment, default to the latest release.
# NOTE: Currently passing from host does not work so you have to
# edit this by hand.
if test -z "$opm_version"
then
opm_version=release
fi
# Update apt and install generic requirements
apt-get -u update
apt-get install -y python-software-properties software-properties-common wget
# Release and testing come from a ppa
if [ "$opm_version" = "release" ]
then
apt-add-repository ppa:opm/ppa
fi
if [ "$opm_version" = "testing" ]
then
apt-add-repository ppa:opm/testing
fi
# While nightlies come from a self-hosted apt
if test "$opm_version" != "release" && test "$opm_version" != "testing"
then
wget -qO - http://opm-project.org/package/nightly-xenial/repokey.gpg | apt-key add -
apt-add-repository http://opm-project.org/package/nightly-xenial
fi
apt-get update
# No version specified, just install latest package from registered repo
if test "$opm_version" = "release" || test "$opm_version" = "testing" \
|| test "$opm_version" = "nightly"
then
apt-get install -y libopm-simulators1-bin
else
# We need to specify the version for each module if a nightly is used
apt-get install -y libopm-simulators1-bin=$opm_version* \
libopm-simulators1=$opm_version* \
libopm-core1=$opm_version* \
libopm-grid1=$opm_version* \
libopm-output1=$opm_version* \
libopm-parser1=$opm_version* \
libopm-common1=$opm_version* \
libecl1=$opm_version*
fi
# To get access to host scratch directories
mkdir -p /scratch