-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy
More file actions
28 lines (26 loc) · 1.01 KB
/
Copy pathdeploy
File metadata and controls
28 lines (26 loc) · 1.01 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
#!/bin/bash
set +x
file="$(pwd)/c_programs/ABC.exe"
[[ -f "$file" ]] && sudo rm -f "$file"
pwd; sudo chmod 777 build; ./build 1> /dev/null
echo -e "\n\n**************************** This is a Deploy JOB $file **************************** "
if [[ -f "$file" ]]; then
echo -e "\nSTEP 1: Deploying $file with default input........"
$file -v -i <<<"5 400 500 600"
if [ $? -eq 0 ]; then
if [[ -x "$file" ]]; then
echo -e "\nSTEP 2: Deployment Successful - Build pushed to artifactory"
echo " ARTIFACTORY_PATH: /home/ec2-user/builds/$file"
fi
else
echo -e "**************** ERROR *********************\n"
echo "Deployment failure - ABC.exe cannot be executed "
echo -e "********************************************\n"
exit 1
fi
else
echo -e "**************** ERROR *********************\n"
echo "Build - ABC.exe notfound $file "
echo -e "********************************************\n"
exit 1
fi