CA Release Automation Plugin for TFS Cannot Create New Artifacts in CA Release Automation

Document ID : KB000111900
Last Modified Date : 22/08/2018
Show Technical Document Details
Issue:
The CA Release Automation Plugin for TFS does not offer the ability to create new artifacts in CA Release Automation with the newly generated artifacts generated through a TFS build. 

The Plugin is available and available features are documented here: 
https://marketplace.visualstudio.com/items?itemName=CATechnologiesRA.RA
 
Environment:
CA Release Automation v6.x
TFS 2015 build 2.1 and above
Cause:
The CA Release Automation Plugin for TeamCity does offer the ability to create new artifacts generated through TeamCity.

The CA Release Automation Plugin for TFS does not. It only provides the ability to attach new (or existing) artifact packages to the specified deployment plans. For the ability to define a new artifact in CA Release Automation, with new artifacts built in the TFS build, you will need to submit an enhancement request. There are some ways to achieve the desired results (outlined in the Resolution section below). 


 
Resolution:
  1. Submit an enhancement/idea requesting this functionality. Links for how to create IDEAs for CA Release Automation can be found in the Additional Information section below.
  2. Before the "Run RA Deployment Plan" step you can add a step to:
    1. Create the artifact in an enterprise artifact repository (ex: Sonatype Nexus Pro repository or Artifactory Pro). Using this kind of artifact repository is recommended instead of relying on the sonatype nexus repository included with the installation of the CA Release Automation management component. This is recommended since the nexus sonatype repository installed is:
      • Not an enterprise release. It is a free version that is used by the backend of the management server. 
      • Used for the proper functioning of the management server. 
    2. After the artifact has been moved to an enterprise artifact repository you can add a step to your TFS build to create the artifact version in CA Release Automation using the . Artifact versions in CA Release Automation are reference objects. When you create an artifact in CA Release Automation you specify the location of the artifact. There are a variety of supported sources (ex: git, svn, repository, local file, http, etc..). The artifact version can be created using the create-artifact-version REST API. An example of the JSON data to pass for an artifact source type of "REPOSITORY" is as follows: 
{"allowModification":true, "artifactDefinition":"ArtDev1", "artifactType":"ArtType1", "applicationId":"4452000", 
     "version":"x5.5.1.b1312", "description":"MyDescription", "getterType":"REPOSITORY",  "serverGroup":false, 
     "server":"<the server name of the artifact retrieval agent>", "storeInRepository":false, 
     "properties":{"Type": "sh", "Repository Url": "http://myArtifactServername:8081/nexus/content/repositories/BuildArtifacts", 
                "Artifact Id":"releaseauto", "Artifact Version":"5.5.1.b1312", "Classifier": "nag-linux-x64", 
                   "Group Id": "ca", "Password":"myAdminPassword",
                   "Repository Url":"http://myArtifactServername:8081/nexus/content/repositories/BuildArtifacts",
                   "Type": "pom", "Username": "admin"}}
  1. ​Either:
    1. Use another CA Release Automation REST API to create a new artifact package with the artifact created above added to it and then use the Run RA Deployment Plan via TFS Plugin for CA Release Automation and point to the newly created artifact package; OR
    2. Use the Run RA Deployment Plan via the TFS Plugin for CA Release Automation and create a new artifact package and specify the artifact created above to be included.

 
Additional Information:
How to submit an enhancement: https://comm.support.ca.com/kb/how-to-submit-a-request-for-enhancement-for-release-automation/kb000106929