5 ### Setting up variables used in the script ###
6 build_node_ip=$(openstack server list -c Name -c Networks -f value | egrep ${openstack_build_stack_name} | awk '{print $NF}' | sed 's/.*=//g')
7 ssh_cmd="ssh -o StrictHostKeychecking=no -i ${ssh_key} ${remote_user}@${build_node_ip}"
9 ### Concat'ing the onap and rke images lists ###
10 RESULT=$(${ssh_cmd} "sudo bash -c \"cat ${data_list_dir}/rke_docker_images.list >> ${data_list_dir}/onap_docker_images.list\"")
11 if [[ $? -ne 0 ]]; then
12 echo "Failed to concat the lists: ${RESULT}"
16 ### Building the nexus blob ###
17 RESULT=$(${ssh_cmd} "sudo ${build_dir}/build_nexus_blob.sh")
18 if [[ $? -ne 0 ]]; then
19 echo "Failed to build nexus blob: ${RESULT}"
23 ### Deleting docker images and npm files in order to free up space on the server ###
24 RESULT=$(${ssh_cmd} "sudo rm -f ${resources_dir}/offline_data/docker_images_for_nexus/*")
25 if [[ $? -ne 0 ]]; then
26 echo "Failed to cleanup nexus docker images: ${RESULT}"
30 RESULT=$(${ssh_cmd} "sudo rm -rf ${resources_dir}/offline_data/npm_tar")
31 if [[ $? -ne 0 ]]; then
32 echo "Failed to cleanup npm directory: ${RESULT}"