-
Notifications
You must be signed in to change notification settings - Fork 159
Expand file tree
/
Copy pathsetup-prerequisites.sh
More file actions
61 lines (49 loc) · 1.67 KB
/
setup-prerequisites.sh
File metadata and controls
61 lines (49 loc) · 1.67 KB
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
#!/usr/bin/env bash
###############################################################################
# (C) Copyright IBM Corp. 2020
#
# SPDX-License-Identifier: Apache-2.0
###############################################################################
set -ex
# required_build - executes for every build
required_build(){
# Clean up the packages and docker files not on the Mac
if [[ "$OSTYPE" != "darwin"* ]]
then
sudo apt clean
docker rmi $(docker image ls -aq)
df -h
fi
# build binaries
mvn -B install --file fhir-examples --no-transfer-progress
mvn -B install --file fhir-parent -DskipTests -P include-fhir-igs,integration --no-transfer-progress
# Build from dockerfile
docker build fhir-install --build-arg VERBOSE=false -t linuxforhealth/fhir-server
echo "Building fhir-bulkdata-server image!!"
docker build fhir-install-bulkdata --build-arg VERBOSE=false -t linuxforhealth/fhir-bulkdata-server
}
# audit_build - executes for each audit type.
audit_build(){
AUDIT="${1}"
if [ -f "build/audit/${AUDIT}/setup-prerequisites.sh" ]
then
echo "Running [${AUDIT}] setting setup prerequisites"
bash build/audit/${AUDIT}/setup-prerequisites.sh
fi
}
###############################################################################
# Store the current directory to reset to
pushd $(pwd) > /dev/null
if [ -z "${WORKSPACE}" ]
then
echo "The WORKSPACE value is unset"
exit -1
fi
# Change to the release directory
cd "${WORKSPACE}"
required_build
audit_build "${1}"
# Reset to Original Directory
popd > /dev/null
# EOF
###############################################################################