Skip to content

Instantly share code, notes, and snippets.

@majirosstefan
Created September 19, 2021 10:37
Show Gist options
  • Save majirosstefan/9ea546da3d986145c088b409e3c3aee6 to your computer and use it in GitHub Desktop.
Save majirosstefan/9ea546da3d986145c088b409e3c3aee6 to your computer and use it in GitHub Desktop.
zip, files, mail attachement, Sendgrid, base64
cavyResults=$(<./cavy_results.xml)
# read output from stdOut
templateDataString=$(node ./scripts/cavyParser/cavyResultsAsJson.js --convertXmlReport --xmlreport="$cavyResults" --subject="$SUBJECT" --appname="$APP_NAME")
# remove quotes from the start and the end, so we can embed it in into existing Sendgrid JSON request
templateData="${templateDataString%\"}"
templateData="${templateData#\"}"
echo "zipping attachements"
zip -r e2e-report.zip ./deviceLog.log ./reactLog.log ./cavy_results.xml ./jestOutput.txt
base64attachment=$(base64 ./e2e-report.zip)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment