I have a TeamCity server that builds my application and a YouTrack instance set up to track my feature requests/bugs. I have the TeamCity/YouTrack integration setup so the Issue log correctly fills out in TeamCity with the Items that have been closed in YouTrack since the last successful build. How can I set up TeamCity to email a user a nicely formatted email that contains this list of Issues?
this answer has been adopted from here
Open TeamCity in your browser.
Browse to Administration > User Management- Groups > All Users
Select the tab Notification Rules (you see the Email notifier rules by default)
Click on Add new rule
Select Builds from the selected build configuration and choose the builds you want notifications for
On the right hand side where it says Send notification when tick Build is successful
press Save
You should now get an email which has a summary of the changes, eg
Build Compilation :: myproject #2.0. successful (Tests passed: 1288)
Agent: buildagent-01
Changes included: 1 change.
Change 02b88b1b1345 by wturner (1 file): bug1 fixed
Related
I have a test-report file that resides in bamboo-artifact once the job is successfully executed. I want to email that report or file after successful execution. Is there any method I can include that file within a mail?
Adding artifacts in build notification mails is not possible in Bamboo.
So, You can either add this functionality (SMTP mail) in your code that will zip & mail the file
OR
You can customize the bamboo build notification by adding extra info By Customizing the notification following this Working with Freemarker
As part of my VSTS build/release definition set up, I would like to populate a dropdown list from the results of a preceding query. For instance, I want the query to return a list of all packages from an external repository and let's just say there are a total of 10 packages stored in that repository.
I then want the entire array of 10 packages displayed in a dropdown list, thereby ensuring that they can then be selected individually.
How can I accomplish this?
You can’t add dropdown list control to build/release definition, but you can custom build/release task to add a PickList control through VSTS extension.
There are some threads can help you:
Using a web API in task.json to fill picklists buildtask
How to display “Area path” in VSTS build task input PickList?
Service endpoints – Data sources
I have one TeamCity project Dac.Test that contains 3 configurations: DEV, QA, PROD.
Also I have some users associated with their Roles. Is this possible to hide / show certains configurations for selected users or groups?
For example: Users associated with group: Testers can see QA configuration, but not PROD and DEV.
There is no way of managing user permissions per-build, this is available on a project level only. You could create a sub-project in the Dac.Test project to cater for this
If you're looking for a way of stopping people from mistakenly running this build, the following approach will work.
This method uses a prompt box that will pop up after you click the run button, it also needs input from the user confirming that they mean to run the build.
No one can run this build by accident
Go to your build configuration in the TeamCity UI
From here, go to Edit Configuration Settings --> Parameters --> Add new parameter
Enter something like 'Confirmation' as the parameter name
Then beside 'Spec:', click the 'Edit...' button
Set up the parameter as shown in the following screenshot:
You will now be prompted and asked for confirmation when you click the run button. The user will have to enter 'YES' in the prompt box that appears, any other value will stop the user from building:
This is best accomplished by using TeamCity's built-in role management. Roles allow you to set fine-grained permissions for users and groups. One potential issue, however, is that roles are scoped to projects (not build configurations). You'll need to create a separate Dac.Test QA project+configuration and provide your Testers the necessary privileges there. You'll also need to make sure that they are stripped of all privileges for the Dac.Test project.
Is there any way to send an email in Hudson which has the list of recent changes in that build?
For example
Trigger a build and if you go recent changes there we have some recent changes. Once it is success, the email should have the list of the changes that happened in that particular build. After this, say the next build fails (build fail email will be triggered), but it records the changes and these change lists also should be included in next successful build.
You'll first need to install the Email-ext plugin for Hudson.
Inside the project configuration, under Post-build Actions click the Email Notification and Editable Email Notification checkboxes. Instead of having the Content be $PROJECT_DEFAULT_CONTENT you'll want to use a different token. Those are described when you click the help icon (?) for Content Token Reference.
Specifically to your example, add (or edit if it exists) the trigger for Success. Change the Content of the success email to use the token ${CHANGES_SINCE_LAST_SUCCESS, reverse, format, showPaths, changesFormat, pathFormat}. The different options are explained in the reference. If you just want the defaults, simply use ${CHANGES_SINCE_LAST_SUCCESS}
I am using the hudson "Publish artifacts to FTP" task after a build to put an installer up to a web site.
I would like to automatically add that link to my email.
unfortunately hudson makes up a directory name based on time and date and places the tile there.
Is there a way to get that value and put it in the build success email or otherwise automatically create the full url?
Hopefully you are using the "Hudson Email Extension" Plugin. This gives you many more customization options over the email support built into the core.
If you are, you might consider putting the token:
${ENV, var} - Displays an environment variable
...into the email. You could set an environment variable in your build script to the FTP link and then insert it into the email. I'm sorry I don't use the Publish Artifacts to FTP plugin myself, but you should be able to mimic the way that plugin sets the FTP destination, and then stick it into an environment variable, which the Email Extension Plugin can then use.