Commit 0a9edbfb authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Corrige limpieza tras deploy y relaunch

Omite el uso de comillas para el valor de la ruta, ya que si no falla al
resolver caracteres especiales, como el indicador del home del usuario
(~). Esto corrige la limpieza de recursos de deploy, que falla desde
3c83b18c.

Aplica misma lógica de limpieza a relaunch, para no dejar directorios
vacíos en el host.
parent 25731030
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ deployExitCode=${?}

if [ "${OMIT_CLEAN_DEPLOY}" -eq 0 ]
then
	cleanDeployCmd="rm -rf \"${deployHome}\""
	cleanDeployCmd="rm -r ${deployHome}"
	runRemoteCmd "${cleanDeployCmd}"
else
	echo -e "\n${INFO_COLOR}Deployment resources cleaning omitted${NULL_COLOR}"
+9 −5
Original line number Diff line number Diff line
@@ -29,7 +29,12 @@ then
	echo -e "${INFO_COLOR}Sending relaunch resources to host ${DATA_COLOR}${remoteHost}${INFO_COLOR} ..${NULL_COLOR}"
	echo -e "  ${INFO_COLOR}relaunch path [ ${DATA_COLOR}${relaunchHome}${INFO_COLOR} ]${NULL_COLOR}"

	if scp ${SSH_PARAMS} "${relaunchEnvFile}" "${SSH_REMOTE}:${relaunchHome}"
	scp ${SSH_PARAMS} "${relaunchEnvFile}" "${SSH_REMOTE}:${relaunchHome}"
	sendResourcesExitCode=${?}

	rm "${relaunchEnvFile}"

	if [ "${sendResourcesExitCode}" -eq 0 ]
	then
		echo -e "\n${PASS_COLOR}Relaunch resources successfully sent!${NULL_COLOR}\n"
	else
@@ -50,10 +55,9 @@ then
		echo -e "\n${FAIL_COLOR}Login to registry failed!${NULL_COLOR}"
	fi

	# Se limpian ficheros de credenciales.
	rmRelaunchEnvFileCmd="rm -f ${relaunchEnvFile}"
	eval "${rmRelaunchEnvFileCmd}"
	runRemoteCmd "${moveToRelaunchDirCmd}${rmRelaunchEnvFileCmd}"
	# Se limpia la ruta de trabajo.
	cleanRelaunchCmd="rm -r ${relaunchHome}"
	runRemoteCmd "${cleanRelaunchCmd}"
else
	echo -e "${INFO_COLOR}Omitting login to registry${NULL_COLOR}"
fi