<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Templates Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/templates/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/templates/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Sat, 21 Feb 2026 07:13:29 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>Templates Explained: Concepts, Architecture, Use Cases, and Getting Started Guide</title>
		<link>https://www.scmgalaxy.com/tutorials/templates-explained-concepts-architecture-use-cases-and-getting-started-guide/</link>
					<comments>https://www.scmgalaxy.com/tutorials/templates-explained-concepts-architecture-use-cases-and-getting-started-guide/#respond</comments>
		
		<dc:creator><![CDATA[Vijay K]]></dc:creator>
		<pubDate>Tue, 20 May 2025 07:32:58 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ContentManagement]]></category>
		<category><![CDATA[jinja2]]></category>
		<category><![CDATA[SoftwareEngineering]]></category>
		<category><![CDATA[TemplateEngines]]></category>
		<category><![CDATA[Templates]]></category>
		<category><![CDATA[WebDevelopment]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=12371</guid>

					<description><![CDATA[<p>What is a Template? A template is a pre-designed framework or blueprint used to create consistent and reusable content or [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/templates-explained-concepts-architecture-use-cases-and-getting-started-guide/">Templates Explained: Concepts, Architecture, Use Cases, and Getting Started Guide</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="683" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2025/05/image-76-1024x683.png" alt="" class="wp-image-12374" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2025/05/image-76-1024x683.png 1024w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2025/05/image-76-300x200.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2025/05/image-76-768x512.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2025/05/image-76.png 1536w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<hr class="wp-block-separator has-alpha-channel-opacity">



<h2 class="wp-block-heading">What is a Template?</h2>



<p class="wp-block-paragraph">A <strong>template</strong> is a pre-designed framework or blueprint used to create consistent and reusable content or code structures. In computing and software development, templates allow developers to generate documents, web pages, user interfaces, or programmatic code dynamically by filling in placeholders with specific data or logic.</p>



<p class="wp-block-paragraph">Templates separate content from presentation, enabling efficient generation of customized outputs while maintaining uniform design and structure. They can range from simple text templates in email systems to complex programming constructs like C++ template metaprogramming or HTML templates in web frameworks.</p>



<p class="wp-block-paragraph">For example, in web development, HTML templates define the layout and styling of web pages with dynamic placeholders replaced at runtime by actual content, enabling scalable and maintainable web applications.</p>



<hr class="wp-block-separator has-alpha-channel-opacity">



<h2 class="wp-block-heading">Major Use Cases of Templates</h2>



<p class="wp-block-paragraph">Templates serve a wide array of applications across industries and technologies:</p>



<h3 class="wp-block-heading">1. <strong>Web Development</strong></h3>



<p class="wp-block-paragraph">HTML templating engines (e.g., Jinja2 for Flask, Handlebars for JavaScript) enable dynamic content rendering by injecting data into predefined page structures, supporting the creation of interactive, data-driven websites.</p>



<h3 class="wp-block-heading">2. <strong>Email Marketing</strong></h3>



<p class="wp-block-paragraph">Templates standardize email layouts, allowing marketers to customize content like recipient names or offers while maintaining brand consistency.</p>



<h3 class="wp-block-heading">3. <strong>Document Generation</strong></h3>



<p class="wp-block-paragraph">Automated report generation systems use templates to populate data into structured formats such as PDFs or Word documents.</p>



<h3 class="wp-block-heading">4. <strong>Software Development</strong></h3>



<ul class="wp-block-list">
<li><strong>Code Templates:</strong> Boilerplate code snippets speed up programming by providing ready-to-use code structures.</li>



<li><strong>C++ Templates:</strong> Allow generic programming by enabling functions and classes to operate with any data type.</li>



<li><strong>Template Engines:</strong> Facilitate separation of concerns between business logic and UI in MVC architectures.</li>
</ul>



<h3 class="wp-block-heading">5. <strong>Presentation and Design</strong></h3>



<p class="wp-block-paragraph">Templates in graphic design or presentation software help users create professional visuals consistently.</p>



<h3 class="wp-block-heading">6. <strong>Configuration Management</strong></h3>



<p class="wp-block-paragraph">Infrastructure-as-code tools use templates to generate configuration files dynamically based on environment parameters.</p>



<hr class="wp-block-separator has-alpha-channel-opacity">



<h2 class="wp-block-heading">How Templates Work Along with Architecture</h2>



<p class="wp-block-paragraph">Template systems generally follow an architecture that separates <strong>template definition</strong> from <strong>data input</strong> and <strong>rendering engine</strong> that produces the final output.</p>



<h3 class="wp-block-heading">Key Components:</h3>



<ol class="wp-block-list">
<li><strong>Template Definition</strong> A template is written using a markup language or template syntax, containing static content mixed with placeholders or directives. These placeholders indicate where dynamic content will be injected.</li>



<li><strong>Data Model</strong> The data model contains the actual content or values to replace placeholders during rendering. It could be a dictionary, object, or any structured data.</li>



<li><strong>Template Engine</strong> The core component that processes the template and data model, replacing placeholders with real data, executing conditional logic, loops, and filters, and producing the final rendered output.</li>



<li><strong>Renderer</strong> The renderer outputs the final result, such as HTML for web pages, plain text for emails, or source code for programming.</li>
</ol>



<h3 class="wp-block-heading">Architectural Flow:</h3>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
Template + Data Model → Template Engine → Rendered Output

</pre></div>


<p class="wp-block-paragraph">This separation improves maintainability, allowing designers to modify templates without changing business logic, and developers to update data sources without touching UI code.</p>



<hr class="wp-block-separator has-alpha-channel-opacity">



<h2 class="wp-block-heading">Basic Workflow of Templates</h2>



<p class="wp-block-paragraph">Creating and using templates typically involves the following steps:</p>



<ol class="wp-block-list">
<li><strong>Design the Template</strong> Define the structure and static elements, and insert placeholders for dynamic content using the templating language syntax.</li>



<li><strong>Prepare Data</strong> Gather and organize data to be inserted into the template, often in the form of key-value pairs.</li>



<li><strong>Invoke the Template Engine</strong> Pass the template and data to the template engine to perform substitution and logic processing.</li>



<li><strong>Render Output</strong> Generate the final output, such as a fully populated web page, email body, or code file.</li>



<li><strong>Deliver or Store</strong> Serve the output to the client (e.g., browser), send it via email, or save it for further use.</li>
</ol>



<hr class="wp-block-separator has-alpha-channel-opacity">



<h2 class="wp-block-heading">Step-by-Step Getting Started Guide for Templates</h2>



<p class="wp-block-paragraph">If you want to start working with templates, follow these practical steps:</p>



<h3 class="wp-block-heading">Step 1: Choose a Template Engine or System</h3>



<ul class="wp-block-list">
<li>For web: Jinja2 (Python), EJS or Handlebars (JavaScript), Thymeleaf (Java).</li>



<li>For email: MJML or basic HTML with templating.</li>



<li>For documents: LaTeX templates, Docx templating tools.</li>
</ul>



<h3 class="wp-block-heading">Step 2: Define Your Template</h3>



<p class="wp-block-paragraph">Create a template file including placeholders. For example, in Jinja2:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;{{ title }}&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;h1&amp;gt;Hello, {{ user_name }}!&amp;lt;/h1&amp;gt;
    &amp;lt;p&amp;gt;Welcome to our site.&amp;lt;/p&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;

</pre></div>


<h3 class="wp-block-heading">Step 3: Prepare the Data</h3>



<p class="wp-block-paragraph">In your application code, create a data dictionary:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
data = {
    &quot;title&quot;: &quot;Welcome Page&quot;,
    &quot;user_name&quot;: &quot;Alice&quot;
}

</pre></div>


<h3 class="wp-block-heading">Step 4: Render the Template</h3>



<p class="wp-block-paragraph">Use the template engine to combine template and data:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
from jinja2 import Template

with open(&#039;template.html&#039;) as file_:
    template = Template(file_.read())

rendered_html = template.render(data)
print(rendered_html)

</pre></div>


<h3 class="wp-block-heading">Step 5: Integrate in Your Application</h3>



<p class="wp-block-paragraph">Embed the rendered output into your web response, email body, or document generation flow.</p>



<h3 class="wp-block-heading">Step 6: Add Logic and Control</h3>



<p class="wp-block-paragraph">Use conditional statements and loops inside templates to dynamically alter content, for example:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
{% if user_is_logged_in %}
    &amp;lt;p&amp;gt;Welcome back, {{ user_name }}!&amp;lt;/p&amp;gt;
{% else %}
    &amp;lt;p&amp;gt;Please log in.&amp;lt;/p&amp;gt;
{% endif %}

</pre></div>


<h3 class="wp-block-heading">Step 7: Test and Iterate</h3>



<p class="wp-block-paragraph">Verify output correctness with various data inputs, refine templates for usability and maintainability.</p>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/templates-explained-concepts-architecture-use-cases-and-getting-started-guide/">Templates Explained: Concepts, Architecture, Use Cases, and Getting Started Guide</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/templates-explained-concepts-architecture-use-cases-and-getting-started-guide/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>What are the next gen. projects in the Jira cloud?</title>
		<link>https://www.scmgalaxy.com/tutorials/what-are-the-next-gen-projects-in-the-jira-cloud/</link>
		
		<dc:creator><![CDATA[Ashwani Kumar]]></dc:creator>
		<pubDate>Mon, 17 Jan 2022 15:18:44 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Administrator]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Course]]></category>
		<category><![CDATA[Feature]]></category>
		<category><![CDATA[Jira]]></category>
		<category><![CDATA[Platforms]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[Templates]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=9635</guid>

					<description><![CDATA[<p>Hi, my loving friends. Welcome to this course. In this article, I will explain to you about the next-gen project. [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/what-are-the-next-gen-projects-in-the-jira-cloud/">What are the next gen. projects in the Jira cloud?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<div class="wp-block-image"><figure class="aligncenter size-full is-resized"><img decoding="async" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2022/01/Next-Gen-projects-1.jpg" alt="" class="wp-image-9637" width="715" height="401" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2022/01/Next-Gen-projects-1.jpg 960w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2022/01/Next-Gen-projects-1-300x169.jpg 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2022/01/Next-Gen-projects-1-768x432.jpg 768w" sizes="(max-width: 715px) 100vw, 715px" /></figure></div>



<p class="wp-block-paragraph">Hi, my loving friends. Welcome to this course. In this article, I will explain to you about the next-gen project. This is the new feature of Jira and atlas Sian introduced it in the year 2018 so, let’s have a look at the agenda of this content. In this, we will learn what are the next-gen projects, how to create next-gen projects? How can we create issues and add issue types in next-gen projects and how to configure the board? So. Let’ start.</p>



<h2 class="wp-block-heading">What are the next-gen projects?</h2>



<p class="wp-block-paragraph">Next-gen projects are the newest projects in Jira software and it is only available on the cloud platform to the server one. If you are using a server the server platform and you wouldn’t be able to sit. The third one is configured by project team members. Any team member with the project’s admin role can modify the setting of their next-gen projects. There is no need to take the help of the Jira <a href="https://www.devopsschool.com/">administrator</a> to add the issue types and to add some fields to your screen. The Fourth one is it is easier and faster to configure than classic projects. You can easily configure setting like issue types and fields with drag-and-drop editing and reordering all in a single place because the best part of next-gen projects is the ability to enable and disable the features and it allows you to scale your projects as your team grows and tailor your projects to your team changing needs so, this is the best thing in the next-gen projects. And before going forward, I would like to tell you one more thing like atlas Sian is building the next-gen Jira software from the ground up.</p>



<h2 class="wp-block-heading">How to create next-gen projects?</h2>



<p class="wp-block-paragraph"> So, it doesn’t yet have all the features that classic projects have. And they are a lot of differences between the next-gen and the classic projects like if I’m talking about the configurations then in the classic projects. We are able to share the configurations from one project to another. But in the next gen, you can’t share it. If you did some configurations for the particular projects in the next-gen, you wouldn’t be able to share that configuration with another project. And there are many more like estimations in the classic projects, you have the options, you can give the estimations in story point in your basis but in the next-gen, there is only one option is available and that is a story point. If you will go to the next-gen cloud instance and see how can you create the next-gen projects and configure them? There will be your cloud instance and you will create the next-gen projects from there. You will see that there will be two options are available one is classic and the other is next-gen. if that particular option is created out for you then this is the permission issue so, before creating the next-gen project. I would like to tell you about the permission so, once you will click on the Jira setting and go to the global permissions, there will be your global permission schema, and create next-gen project option will be there. At the time, you will have permission to create the next-gen project. You will click on the next-gen project and you will see the interface is similar to the classic.</p>



<p class="wp-block-paragraph">You can simply change the template from there but you will see only two templates are available one is scrum and another one is Kanban. If you will go with Kanban and name the project, you will see the access option (open, limited, private) and project key as a classic one. If you want to change the project key then you can do it there. You will go forward to clicking the create button then the next-gen project board will appear which would be similar to the classic one but what is the difference and how can you identify that this is the next-gen project but what will happen? If you will haven’t created it yet you didn’t create it. Maybe, you are using the project which is created by another one. You will see in the bottom line that you are in the next-gen project. You can find out and identify that you are using the next-gen project. You will see there are the options which are roadmap, board, pages, add an item, and project setting. A Roadmap is a good option which is given by the next-gen project. I will discuss this later in the course. I hope this will give you exact direction in the way of your Jira learning and about its next-gen project. So, you will stay tuned with this course for further next information regarding Jira next-gen project.</p>



<h4 class="wp-block-heading">Related Video:</h4>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe  id="_ytid_88959"  width="640" height="360"  data-origwidth="640" data-origheight="360" src="https://www.youtube.com/embed/iYMdvUqqfLI?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe>
</div></figure>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/what-are-the-next-gen-projects-in-the-jira-cloud/">What are the next gen. projects in the Jira cloud?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Customize changelist description field with templates</title>
		<link>https://www.scmgalaxy.com/tutorials/customize-changelist-description-field-with-templates/</link>
					<comments>https://www.scmgalaxy.com/tutorials/customize-changelist-description-field-with-templates/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Mon, 04 Dec 2017 12:13:58 +0000</pubDate>
				<category><![CDATA[Perforce]]></category>
		<category><![CDATA[Templates]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=1562</guid>

					<description><![CDATA[<p>rajeshkumar created the topic: Customize changelist description field with templates The way most of our customers add additional fields to [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/customize-changelist-description-field-with-templates/">Customize changelist description field with templates</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>rajeshkumar created the topic: Customize changelist description field with templates</strong><br />
The way most of our customers add additional fields to the change description is with the use of triggers and scripts that add extra fields within the &#8220;description&#8221; field.<br />
www.perforce.com/perforce/doc.current/ma&#8230;cmdref/triggers.html<br />
As an example:<br />
add-fields.py:</p>
<p>*********************</p>
<p>#!/usr/bin/python</p>
<p>import os<br />
import sys<br />
import re<br />
import random</p>
<p>users = [ &#8220;cpflaum&#8221;,&#8221;cpflaum2&#8243; ]<br />
user = sys.argv[2]<br />
user = user.lower()</p>
<p>if user in users:<br />
tempfile = str(random.random())<br />
input = open(sys.argv[1], &#8220;r&#8221;)<br />
output = open(tempfile, &#8220;w&#8221;)</p>
<p>for line in input.readlines():<br />
if re.search(&#8220;<enter description here>&#8220;, line):<br />
output.write(line)<br />
output.write(&#8220;\n\tMy Additonal field 1=<please provide description>\n&#8221;)<br />
output.write(&#8220;\n\tMy Additonal field 2=<please provide description>\n&#8221;)<br />
else:<br />
output.write(line)</p>
<p>input.close()<br />
output.close()</p>
<p>os.remove(sys.argv[1])<br />
os.rename(tempfile, sys.argv[1])</p>
<p>********************<br />
By &#8211; Chuck Pflaum <<a href="mailto:support@perforce.com">support@perforce.com</a>><br />
Regards,<br />
Rajesh Kumar<br />
Twitt me @<a href="http://twitter.com/RajeshKumarIn"> twitter.com/RajeshKumarIn</a></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/customize-changelist-description-field-with-templates/">Customize changelist description field with templates</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/customize-changelist-description-field-with-templates/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Templates in InstallAnywhere</title>
		<link>https://www.scmgalaxy.com/tutorials/templates-in-installanywhere/</link>
					<comments>https://www.scmgalaxy.com/tutorials/templates-in-installanywhere/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Mon, 04 Dec 2017 06:41:47 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Templates]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=1295</guid>

					<description><![CDATA[<p>installanywhereExpert created the topic: Templates in InstallAnywhere A template is the starting point for every new installer project. A template [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/templates-in-installanywhere/">Templates in InstallAnywhere</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>installanywhereExpert created the topic: Templates in InstallAnywhere</strong><br />
A template is the starting point for every new installer project. A template can be a<br />
simple empty project, or it can contain everything a regular project would contain,<br />
such as license agreements, custom graphics and billboards, and even files.</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/templates-in-installanywhere/">Templates in InstallAnywhere</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/templates-in-installanywhere/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Build Configuration Templates in Teamcity &#124; Teamcity Guide</title>
		<link>https://www.scmgalaxy.com/tutorials/build-configuration-templates-in-teamcity/</link>
					<comments>https://www.scmgalaxy.com/tutorials/build-configuration-templates-in-teamcity/#comments</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Tue, 24 Feb 2015 00:00:00 +0000</pubDate>
				<category><![CDATA[Build Management & Tools]]></category>
		<category><![CDATA[Build]]></category>
		<category><![CDATA[Build configuration]]></category>
		<category><![CDATA[Build Configuration Templates]]></category>
		<category><![CDATA[Build Configuration Templates in TeamCity]]></category>
		<category><![CDATA[Build management]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Teamcity]]></category>
		<category><![CDATA[Teamcity Guide]]></category>
		<category><![CDATA[Teamcity Tutorial]]></category>
		<category><![CDATA[Templates]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2015/02/24/build-configuration-templates-in-teamcity/</guid>

					<description><![CDATA[<p>Going meta with Meta-Runners in TeamCity We have seen that build runners can be very handy. Even though most build [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/build-configuration-templates-in-teamcity/">Build Configuration Templates in Teamcity | Teamcity Guide</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div>
<div>
<div>
<h1><img loading="lazy" decoding="async" class="alignnone size-full wp-image-3513 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/02/build-configuration-templat.png" alt="build-configuration-templates-in-teamcity" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/02/build-configuration-templat.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/02/build-configuration-templat-300x200.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></h1>
<h1>Going meta with Meta-Runners in TeamCity</h1>
</div>
</div>
</div>
<p><a name="We have"></a>We have seen that build runners can be very handy. Even though most build runners can be replaced with an equivalent command using the command-line runner, build runners come with the convenience of easily setting up build steps, along with the necessary agent requirements and parameters.</p>
<p>Meta-Runners<a id="id772"></a><a name="to create"></a> provide a straightforward way to create custom build runners. Meta-Runners can be thought of as a way to avoid duplications in build steps across build configurations.</p>
<div title="Note">
<div>
<h3><a id="note93"></a>Note</h3>
<p><a name="create and"></a>While templates can be used to create and maintain build configurations that are very similar, Meta-Runners can be used across build configurations that perform the same build steps. Moreover, a build configuration can only be based on one template, but it can make use of multiple Meta-Runners.</p>
</div>
</div>
<p>In <a title="Chapter 3. Getting Your CI Up and Running" href="http://techbus.safaribooksonline.com/9781849699518/ch03_html" data-ajax="1">Chapter 3</a>, <em>Getting Your CI Up and Running</em>, we created the deploy-to-test<a name="application to"></a> build configuration that deploys the Django application to Heroku. Using this build configuration as an example, we can see how we can extract a Meta-Runner Deploy To Heroku<a name="that wants"></a> that can be used by any build configuration that wants to deploy to Heroku.</p>
<p>Recall that the deploy-to-test build configuration<a id="id773"></a> had a simple command-line runner that executed the following commands:</p>
<div>
<pre><strong>git remote add heroku git@heroku.com:django-ci-example.git</strong>  <strong>git push heroku master</strong></pre>
</div>
<p>To create a generic Meta-Runner<a id="id774"></a><a name="to push"></a> out of this, we need to provide a way to push to any remote, rather than just git@heroku.com:django-ci-example.git.</p>
<div title="Note">
<div>
<h3><a id="note94"></a>Note</h3>
<p>Deploying to Heroku using remotes needs the ssh<a name="example used"></a> keys to be set up on the agent. The example used here just illustrates Meta-Runners and may not be ideal for production use.</p>
<p><a name="in"></a>As mentioned in <a title="Chapter 6. TeamCity for Ruby Projects" href="http://techbus.safaribooksonline.com/9781849699518/ch06_html" data-ajax="1">Chapter 6</a>, <em><a name="for Ruby"></a>TeamCity for Ruby Projects</em>, we can use<a id="id775"></a> a gem such <a id="id776"></a>as heroku-headless (<a href="https://github.com/moredip/heroku-headless" target="_new" rel="noopener">https://github.com/moredip/heroku-headless</a>).</p>
</div>
</div>
<p><a name="extracting the"></a>As expected, we will do this by extracting the remote out into a build parameter. The command-line runner will have the following as the <strong><a name="Custom Script"></a>Custom Script</strong> to be run:</p>
<div>
<pre><strong>git remote add heroku %heroku.remote%</strong>  <strong>git push heroku master</strong></pre>
</div>
<p><a name="value for"></a>We will provide the value for the %heroku.remote% parameter in the <strong>Build Parameters</strong> section of the build configuration.</p>
<p><a name="a Meta"></a>Now we are ready to create a Meta-Runner from this build configuration. This can be done by clicking on the <strong>Extract Meta-Runner</strong><a name="the build"></a> button in the right-hand side bar of the build configuration settings page. This brings up the <strong>Extract Meta-Runner</strong> dialog, which is shown in the following screenshot:</p>
<div><img loading="lazy" decoding="async" class=" size-full wp-image-401" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/02/Going-meta-with-Meta-Runners-in-teamcity1.jpg" alt="Going meta with Meta-Runners" width="683" height="405" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/02/Going-meta-with-Meta-Runners-in-teamcity1.jpg 683w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/02/Going-meta-with-Meta-Runners-in-teamcity1-300x178.jpg 300w" sizes="auto, (max-width: 683px) 100vw, 683px" /></div>
<p>In the dialog, we<a id="id777"></a><a name="name that"></a> give a name to the Meta-Runner. This is the name that will appear in the <strong>Runner Type</strong><a name="build configuration"></a> field when configuring a build step for a build configuration.</p>
<p>Click on <strong>Extract</strong><a name="see it"></a> to create the Meta-Runner. Once the Meta-Runner is created, we can see it listed in the <strong>Meta-Runners</strong><a name="the project"></a> tab on the project administration page. We can also edit the Meta-Runner to fine-tune it as desired.</p>
<div title="Note">
<div>
<h3><a id="tip77"></a>Tip</h3>
<p><a name="is essentially"></a>A Meta-Runner is essentially an XML configuration (much like most TeamCity configurations) that can be edited directly from the web interface.</p>
</div>
</div>
<p><a name="page of"></a>The following screenshot shows the edit page of the Deploy To Heroku<a name="that we"></a> Meta-Runner that we just created:</p>
<div><img loading="lazy" decoding="async" class=" size-full wp-image-402" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/02/Going-meta-with-Meta-Runners-in-teamcity2.jpg" alt="Going meta with Meta-Runners" width="806" height="564" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/02/Going-meta-with-Meta-Runners-in-teamcity2.jpg 806w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/02/Going-meta-with-Meta-Runners-in-teamcity2-300x210.jpg 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/02/Going-meta-with-Meta-Runners-in-teamcity2-768x537.jpg 768w" sizes="auto, (max-width: 806px) 100vw, 806px" /></div>
<p>The <a id="id778"></a><a name="and steps"></a>Meta-Runner extracts all the parameters and steps defined in the build configuration. We can edit the Meta-Runner to have only the necessary parameters and steps.</p>
<div title="Using Meta-Runners">
<div>
<div>
<div>
<h2><a id="ch10lvl2sec93"></a>Using Meta-Runners</h2>
</div>
</div>
</div>
<p>We can <a id="id779"></a><a name="pretty much"></a>now use the Meta-Runner that we created pretty much like a normal build runner. We will remove the existing build step in the deploy-to-test<a name="and add"></a> build configuration (from which we extracted the Meta-Runner) and add a Deploy To Heroku Meta-Runner-based build step.</p>
<div title="Note">
<div>
<h3><a id="tip78"></a>Tip</h3>
<p><a name="want to"></a>We can also disable build steps if we don&#8217;t want to remove them while experimenting.</p>
</div>
</div>
<p>In the <strong>New Build Step</strong> page, for the <strong>Runner type</strong> field, the newly created <strong>Deploy To Heroku</strong> Meta-Runner is available, as shown in the following screenshot:</p>
<div><img loading="lazy" decoding="async" class=" size-full wp-image-403" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/02/Going-meta-with-Meta-Runners-in-teamcity3.jpg" alt="Using Meta-Runners" width="480" height="381" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/02/Going-meta-with-Meta-Runners-in-teamcity3.jpg 480w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/02/Going-meta-with-Meta-Runners-in-teamcity3-300x238.jpg 300w" sizes="auto, (max-width: 480px) 100vw, 480px" /></div>
<p>Once we <a id="id780"></a>choose the Deploy To Heroku Meta-Runner, we can see that the heroku.remote<a name="Since we"></a> parameter is one of the fields to be configured. Since we created the Meta-Runner with the heroku.remote parameter with the value git@heroku.com:django-ci-example.git, that remote is available by default. The Deploy To Heroku runner configuration page is shown in the following screenshot:</p>
<div><img loading="lazy" decoding="async" class=" size-full wp-image-404" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/02/Going-meta-with-Meta-Runners-in-teamcity4.jpg" alt="Using Meta-Runners" width="692" height="342" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/02/Going-meta-with-Meta-Runners-in-teamcity4.jpg 692w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/02/Going-meta-with-Meta-Runners-in-teamcity4-300x148.jpg 300w" sizes="auto, (max-width: 692px) 100vw, 692px" /></div>
<div title="Note">
<div>
<h3><a id="tip79"></a>Tip</h3>
<p><a name="parameters in"></a>It is possible to remove the value for parameters in the Meta-Runner XML so that no default values are present for the fields.</p>
</div>
</div>
<p>We can<a id="id781"></a> click on <strong>Save</strong><a name="the build"></a> to add the build step. The new build step, based on the Deploy To Heroku<a name="function in"></a> Meta-Runner, will function in the same way as the previous build step based on the command-line runner.</p>
<div title="Note">
<div>
<h3><a id="note95"></a>Note</h3>
<p><a name="apparent when"></a>Of course, the value of Meta-Runners becomes more apparent when we create them out of multiple build steps. The same set of steps that may be repeated across multiple configurations can be extracted into Meta-Runners.</p>
<p><span style="font-weight: 600; color: #555555; font-family: 'Open Sans', Arial, sans-serif; font-size: 14px; line-height: 28px;">Reference Book</span><span style="color: #555555; font-family: 'Open Sans', Arial, sans-serif; font-size: 14px; line-height: 28px;"> &#8211; Learning Continuous Integration with TeamCity by Learning Continuous Integration with TeamCity</span></p>
</div>
</div>
</div>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/build-configuration-templates-in-teamcity/">Build Configuration Templates in Teamcity | Teamcity Guide</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/build-configuration-templates-in-teamcity/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
