forked from Azure/asa-in-spark
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
54 lines (44 loc) · 1.65 KB
/
build.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
#!/bin/bash
if [ "$1" == "debug" ]; then
echo "[INFO] Not generating ASA-x.x.x.jar as debug mode is enabled and user wants to troubleshoot the build process"
exit 0
fi
echo "Cleaning existing build files..."
rm -rf cpp/build dotnet/bin dotnet/obj java/target || true
echo "Older build deleted"
echo "Downloading maven dependencies..."
cd java
mvn compile
cd ..
echo "Creating cpp build..."
mkdir -p cpp/build
cd cpp/build
cmake ..
cmake --build .
cd ../..
echo "cpp build created successfully"
echo """
====================================================================================================================================
Make sure azure credentials were provided successfully while building the docker image.
If not then stop this build.sh script and run
$ cd dotnet && dotnet restore --interactive
Open the URL on a browser and enter the code when prompted to authenticate
After the authentication, rerun the build.sh
For more information:
Azure Credential provider was installed while building the docker image to interactively acquire credentials for Azure Artifacts
https://github.com/microsoft/artifacts-credprovider
====================================================================================================================================
"""
echo "Creating dotnet build ..."
# This is where it hits case sensitive dir name errors. Wierd, but it works if triggerred second time
cd dotnet && (dotnet build || dotnet build) && cd ..
echo "Creating ASA-x.x.x.jar ..."
cd java
mvn package
# At this point jar should be created
ls -lh target/*.jar
echo "Jar created successfully"
cd ..
echo "Running sbt test..."
# Run test
cd scala && sbt test