forked from kumarsanthosh653/SaiJavaCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildspec.yml
More file actions
35 lines (31 loc) · 1.05 KB
/
buildspec.yml
File metadata and controls
35 lines (31 loc) · 1.05 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
version: 0.2
phases:
install:
runtime-versions:
java: corretto11
commands:
- echo "Installing Java version 11 ..."
- export JAVA_HOME="$JAVA_11_HOME"
- export JRE_HOME="$JRE_11_HOME"
- export JDK_HOME="$JDK_11_HOME"
- for tool_path in "$JAVA_HOME"/bin/*;
do tool=`basename "$tool_path"`;
if [ $tool != 'java-rmi.cgi' ];
then
update-alternatives --list "$tool" | grep -q "$tool_path" \
&& update-alternatives --set "$tool" "$tool_path";
fi;
done
- mvn clean package
pre_build:
commands:
- echo "Nothing to do in the pre_build phase..."
build:
commands:
- echo "Build started"
- scp -i $narsan.pem target/webapp.war ec2-user@13.126.207.243:/home/ec2-user/webapp.war
# Replace "/path/to/your/private-key.pem", "your-app.war", "user", "your-linux-machine-ip", and "/path/to/tomcat/webapps/" with your actual values
post_build:
commands:
- echo "Build completed"
- echo "Additional post_build commands, if any"