Skip to content

Commit

Permalink
Unmute scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavier Metichecchia authored and Xavier Metichecchia committed Dec 18, 2024
1 parent 6868b1f commit 97b4794
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions scripts/pipeline/cloud-gov-post-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@ ROOT_DIR=$(git rev-parse --show-toplevel)
# Read the drush-post-deploy.sh file line by line
while IFS= read -r command || [[ -n "$command" ]]; do
# Debugging: Print the current command being processed
# echo "Processing command: ${command}"
echo "Processing command: ${command}"

# Skip comments, empty lines, or echo commands
if [[ "${command}" != "#"* ]] && [[ -n "${command}" ]] && [[ "${command}" != "echo "* ]]; then
# echo "Running command: ${command}"
echo "Running command: ${command}"

# Call the cloud-gov-remote-command script with the project and branch
bash ./scripts/pipeline/cloud-gov-remote-command.sh "${PROJECT}-cms-${BRANCH}" "${command}" < /dev/null >/dev/null 2>&1
bash ./scripts/pipeline/cloud-gov-remote-command.sh "${PROJECT}-cms-${BRANCH}" "${command}" #< /dev/null >/dev/null 2>&1

# Check for errors and exit if a command fails
if [[ $? -ne 0 ]]; then
# echo "Error: Command '${command}' failed!" #>&2
echo "Error: Command '${command}' failed!" #>&2
exit 1
fi
fi
done < <(cat "${ROOT_DIR}/scripts/drush-post-deploy.sh")

# Indicate script completion
# echo "All commands processed successfully!"
echo "All commands processed successfully!"
exit 0

#Casey's Original Script
Expand Down
2 changes: 1 addition & 1 deletion scripts/pipeline/cloud-gov-remote-command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if [ -z "${show_output}" ]; then
echo "Running command: '$(echo "${command}" | cut -d' ' -f1,2)'..."
{
sshpass -f "${ssh_passwd}" ssh -F "${ssh_config}" "ssh.fr.cloud.gov" "touch ~/.bashrc && source ~/.bashrc && PATH=\$PATH:${bin_path} ${command}"
} > /dev/null 2>&1
} #> /dev/null 2>&1
else
sshpass -f "${ssh_passwd}" ssh -F "${ssh_config}" "ssh.fr.cloud.gov" "touch ~/.bashrc && source ~/.bashrc && PATH=\$PATH:${bin_path} ${command}"
fi

0 comments on commit 97b4794

Please sign in to comment.