Team City Artifact Limit - build

I need to limit the number of Artifacts a particular build is keeping. This one build generates very large artifact output which will eat through disk space. Ideally I would like to configure just that build to keep a maximum of the last 3 successful builds but I don't want this limit applied to all projects.

Go to:
Administration
Build History Clean-up (right menu)
At the bottom select your project / build under "Manage cleanup rules for"
Click "Edit"
In the popup, select "Custom" for "Clean artifacts"
Put "3" in "Older than the -th successful build"
Save.
This is as close to what you want. The only devation being that it will only discard artifacts after the nth successful build.
Or, another option presented in the settings is cleanup based on a date, like "Only keep the past 7 days".
Update for TeamCity 9.x and above:
Administration
Click the Edit link for any of your branches or <root project>*
Clean-up rules on left hand menu
Under What to clean-up choose the Edit link.
Under the Artifacts section, put a value in the box: Older than the []-th successful build.
*Please note that TeamCity uses inheritance so if you edit the <root project>, all your projects will be affected. This is also the case if you set options for project groups.
Update for TeamCity 2019
Find the builds of the project you want to change.
Select Edit Build Configuration in the top right.
Find the project inheritance hierarchy breadcrumb in the top left.
It will look similar to: Administration / <Root project> / YourParentProject
Click on the project that is the direct parent to the project you want to edit. (YourParentProject in the example above.)
Click on Clean-up Rules from the menu on the left.
Find you project in the list shown in the main window and click the edit button found at the end of the project's row.
Select retention rules as desired.

Related

How do I add a new Razor Page Template to Visual Studio in ASP.NET Core 2.1?

I've got the Templates folder in my project hierarchy, and I've been modifying those pretty heavily to speed up my scaffolding workflow.
However, some of the objects in my database must persist forever. So, since they can't be deleted, they have a boolean activation state.
As such, I'd like to add two new actions to the CRUD workflow, Deactivate and Reactivate. I added the relevant templates to the Project\Templates\RazorPageGenerator folder, but when I click to add a new Razor Page, it still only shows the standard CRUD options.
I'm not sure where I need to register the new templates for them to be usable in the scaffolding operations...?
This is what I normally do and works all the time:
Right click the folder => Select Add > New File => Select Razor Page and modify the "Name" section to match my controller method name.
If it doesn't work for you, how about creating files "Deactivate.cshtml" and "Reactivate.cshtml" using normal means (Finder in MacOS, Window Explorer in Windows, or command prompt), copy them to your Project\Templates\RazorPageGenerator folder, and add them to your project by right click the folder in VS2017 => Select Add > Add Files from Folder
In .csprog change Project Sdk From Microsoft.NET.Sdk To Microsoft.NET.Sdk.Web

Does ColdFusion Builder have split screen editing like Homesite+, and how do I turn it on?

Does ColdFusion Builder have split screen editing like Homesite+, and how do I turn it on? How do I activate word wrap?
Thanks much!
In order to see 2 files tiled at the same time within ColdFusion Builder 2, follow the steps below:
Open the file
Right click the tab with the file name
Choose Move Editor
You will see the file outlined in black in the interface, it is now attached to your cursor
Click to the right of the Source tab in the open area
This will allow you to view both files at the same time, one above the other
The file you select will be the active file
You can still use the Source and browser tabs, they will reflect whatever file is the active one
Word Wrap:
Go to Window > Preferences > HTML > Editors. Click the Advanced tab and check Enable word wrap. Restart CF Builder.
If you want to compare 2 files, there is an easier way.
Select both files
Right-click one of them
Select 'Compare With --> Each Other
Eclipse will then show you the 2 files side by side, and highlight any differences.
ColdFusion Builder 2016 (AKA 3.1) offers "split view" for both horizontal (CTRL+_) & vertical (CTRL+{), but the hotkeys don't appear to work at the moment. This can be accessed via the "Window | Editor" menu. You can also search the "Quick Access" search box and type "Split" and then choose the toggle options that appear.
In ColdFusion Builder 2016 the keyboard shortcut is: (CTRL+SHIFT+_) AND (CTRL+SHIFT+{)

eclipse c++ exclude multiple files from build at once?

Instead of right clicking each one individually, ticking 'exclude from build', etc
And how to include them back en masse ?
Thanks
Highlight one of your file's by left clicking it. Then, to select multiple files, hold down shift or control then left click on another file. Shift will select all files between what you selected. Control will add just the one. Then, let go of shift (or control), then right click one of the selected files, then chose "Resource Configurations > Exclude from build...". It will exclude them all. Similarly, repeat the step to add them back.
Create a new folder inside Eclipse (let's name it excluded). Right-click on excluded and use Resource Configuration->Exclude From Build..., check which builds you want it excluded from and dismiss the dialog. Now you can disable files by selecting a group of files and dragging them to this folder. Include them back in the build by dragging them from excluded back to their original location. Note that once marked as excluded the folder appears near the bottom with a new icon with a slash through it.

Pycharm: multiple tabs all with same name; how to highlight active file in project explorer?

With a number of different apps that all have their own version of "admin.py" and "views.py," etc., I have a hard time telling which one I have open when looking at the tabs (the tabs don't have the full path).
Is there a way to highlight which file I'm editing in the active tab? Normally with programs that use this format -- for instance Gmail -- the active section or file is highlighted on the left, but not so in PyCharm.
Use View | Select In | Project View or enable Autoscroll from Source option in the Project View.
In PyCharm 2.0 there will be Show directory in editor tabs for non-unique filenames option in Settings | Editor | Editor Tabs.
The project pane should have a row of buttons on the top. Mouse over them for tooltips, and look for the one that says "Autoscroll from source". Make sure to make the sidebar wide enough to see all the buttons.

TFS 2010 set bug work item severity after build failure

I'm experiencing a problem with the severity of the bug work items generated by me builds occasionally failing while using TFS 2010 (after checking in bad sources of course).
My boss has decided that a build failure for my project should rank 2nd most important in the severity ladder, not first. He want to reserve the critical status for project which rake in the money, not the projects for building the codebase of our CMS.
I'd still like to be notified when a build fails, but he won't allow me to keep the severity of the bug at 1 - critical, which is the default value of the generated bug work items.
I've been trying to change the work item severity, but I can't seem to be able to find the location in the buildtemplate I've been using for my project. (DefaultTemplate.xaml, just the default agile team project process template)
I've searched the whole template for the activity which adds a work item if the build fails, but to no avail.
I suspect it is some setting in one of the activities or that it is dependent on the associate changesets and work items activity, but that activity doesn't seem to have a setting for setting a severity.
I'm not very skilled when it comes to editing these build templates, but so is noone else over here, so I'm it.
I've found a blog which claims you can change this, but the template used seems to be different from the one I use.
http://geekswithblogs.net/jakob/archive/2010/04/28/modify-build-failure-work-item-in-tfs-2010-build.aspx
I've tried finding the IfCreateWorkItem activity mentioned in the blog post in the build template, but I can't find it.
Also I'm unsure if adding the work item activity will prevent the critical item from being posted. I suspect it will add a new work item in case of failure in addition to the other work item unless I turn off the associate changesets and work items setting, which I don't want. (if tests pass I want the associated work items to change state to passed too)
Related to this matter is the person to whom the bug is assigned.currently this is the NTAuthority account. I'd like to change that to the person who submitted the last changeset used for the build. I Can't find a setting for that either.
If you find the "Create Work Item" step of the Template:
Right click on this and do "Properties" in the Properties window you will see a "CustomFields" that can be edited. Click the "..." elipsis to open the Expression editor:
From there you can adjust the properties.
I needed to make the same change and couldn't find the "Creat Work Item" section either, at first. You have to expand (double-click) the Exception section of "Try to compile project".