Merge "bug fixing uCPE"
[eliot.git] / jjb / eliot / eliot-kubeedge-deploy.sh
1 #!/bin/bash
2
3 set -x
4
5 # log info to console
6 echo "Starting the deployment on baremetal environment using $INSTALLER_TYPE. This could take some time..."
7 echo "--------------------------------------------------------"
8 echo
9
10 rm -rf $WORKSPACE/scripts/src/config_kubeedge
11
12 cp /home/jenkins/nodelist_kubeedge $WORKSPACE/scripts/src/config_kubeedge
13
14 cd $WORKSPACE/scripts/src
15 source /root/.profile
16 sudo ./kubeedge_setup.sh
17
18 if [ $? -ne 0 ]; then
19     echo "depolyment failed!"
20     deploy_ret=1
21 fi
22
23
24 echo "Logs uploading to nexus repo"
25
26 export ARCHIVE_ARTIFACTS="**/*.log"
27 export NEXUS_URL=https://nexus.akraino.org
28 export SILO=huawei
29 export JENKINS_HOSTNAME=http://159.138.47.166:8080
30 export BUILD_URL="${JENKINS_HOSTNAME}/job/${JOB_NAME}/${BUILD_NUMBER}"
31 export NEXUS_PATH="${SILO}/job/${JOB_NAME}/${BUILD_NUMBER}"
32 lftools deploy archives -p "$ARCHIVE_ARTIFACTS" "$NEXUS_URL" "$NEXUS_PATH" "$WORKSPACE"
33 lftools deploy logs $NEXUS_URL $NEXUS_PATH $BUILD_URL
34
35 echo $BUILD_URL
36
37 echo "Logs uploaded to $NEXUS_URL/content/sites/logs/$NEXUS_PATH"
38
39
40
41 echo
42 echo "--------------------------------------------------------"
43 echo "Done!"
44
45 exit $deploy_ret
46