We have part of our babmoo setup working, but i cannot work out the last bit!
Steps are
1) Get from repos - Done
2) Build .NET project using visual studio build - done
3) Label repos that a build has taken place
4) Copy successful build to shared folder or even local folder for that matter - HOW DO I DO THAT????
5) Email team sucess email with list of JIRA tasks that were complete - HOW DO I DO THAT?
ANy help we can get would be awesome.
Thanks
For the email, we call a vbs script which contains other information than what the build success email sends. This includes where to get the code to deploy, location of a report we produce, the branch/tag and some other information required by our client.
It looks like this:
Dim tag, branch, deploymentLoc, sigLine, bodyLine tag = WScript.Arguments(1) branch = WScript.Arguments(2) deploymentLoc = WScript.Arguments(3) sigLine = WScript.Arguments(4) reportloc=Wscript.Arguments(5) bodyLine = (tag) & vbcrlf & (branch) & vbcrlf & (deploymentLoc) & vbcrlf & (reportloc) & vbcrlf & vbcrlf & vbcrlf & (sigLine) Set objMessage = CreateObject("CDO.Message") objMessage.Subject = WScript.Arguments(0) objMessage.From = "fromaddress@domain.com" objMessage.To = "groupaddress@domain.com" objMessage.TextBody = bodyLine '==This section provides the configuration information for the remote SMTP server. '==Normally you will only change the server name or IP. objMessage.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Name or IP of Remote SMTP Server objMessage.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.your_mailserver.com" 'Server port (typically 25) objMessage.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 objMessage.Configuration.Fields.Update '==End remote SMTP server configuration section== objMessage.Send
Then we pass in all the args referenced in the top
for #3, "Copy successful build",
what we do is we configure all important build result files as artifact.
then in a 'dependent' build we run a script that uses something like this:
and I guess this script could also use a command line mailer to mail build results when this 'wget' completes.
or I you could define an environment variable in your task like this:
buildsrcdir=${bamboo.build.working.directory}
then in a task script or build script you could copy things
cp $buildsrcdir/mybuiltfile /some/new/location
I also have certain builds send mail when they are done (Notification = All Jobs Completed) and in order to add site specific info, from the build script, I echo to stderr and the echo message is in the build result email.
echo "Build directory: $buildsrcdir" > /dev/stderr
echo "Release directory: /some/new/dir" > /dev/stderr
https://answers.atlassian.com/questions/148547/add-build-information-to-the-successful-build-email
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.