We are using TFS2015 release management in our project. To perform a specific build i need to add multiple task (around 50). I can group these build task in 5 logical groups. As these logical groups will be reusable, I am thinking to create a new custom build task and add the already available build task in my new custom build task.
Is this possible? If yes, how?
The Task group is reusable task that can be added to a build or release definition, just like any other task. So you just need to group necessary tasks into a group and add this group to build or release.
Steps to group tasks and use in the build or release:
Open a build/release definition
Select some tasks and right click > Create task group
Open a build/release definition
Add step/task> select corresponding task group > Add
You can’t add already available build/release task in the custom build task, but you can refer to the source code of these tasks and copy necessary code to your custom build task script (many script files can be loaded/referenced to your script file directly).
Regarding source code of build tasks, you can get it in [agent folder]\tasks folder (all the tasks that used in the build will be downloaded to tasks folder) or refer to this site: vsts-tasks.
Related
I'd like to ask, how may I do a migration of mappings, worklets and workflows from Informatica PowerCenter Integ, to Prod.
Integ Enviroment and Prod are in different servers, so I can't just mouve folder from folder.
Is it possible? I can't find any refernece or tutorial.
Thank you in advance.
In Powercenter, its possible to copy form one env to another. Request everyone to check in their objects first adn log off from both source and target repo.
Open Repository Manager, connect to the source repository and select the folder you want to copy.
Click Edit > Copy.
Connect to the target repository. Connect to the target repository with the same user account used to connect to the source repository. If you do not have same user you need to use deployment group/deployment folder.
In the Navigator, select the target repository, and click Edit > Paste. You will get many options like - replacing objects, use latest version, check out etc. You can follow below link to get help.
https://docs.informatica.com/data-integration/powercenter/10-5/repository-guide/copying-folders-and-deployment-groups/copying-or-replacing-a-folder/steps-to-copy-or-replace-a-folder.html
Now, my preference would be to use deployment group or deployment folder. Its easy to use and easy to control - like if you want to replace 10 objects out of 100s, or you want to create a standard process for future migrations, or deploy using command task automatically, you can do as well.
We have a microservice project architecture where there is a single project repository with several folders. Each folder has files etc for a specific API. We would like to have that as a single repo but configure separate jobs in jenkins for each API folder. As such we would like to know how to use same repo for scm checkout in jenkins but trigger builds for commits made only to the folders where changes are made. i know it supports regex to include and exclude. But would like to know how best to use that.
So say for example i have a project sample-project with 3 folders abc, def and xyz.
we now have a job in jenkins that checkouts sample-project. Now we would like that jenkins job to be configured in a way that only when anything inside abc folder is changed or committed, it triggers that job otherwise not. How to best implement this.
I have a single Cloud Source Repository with multiple projects. I am able to create a cloudbuild.yaml file in the repo root that builds all projects. However, I don't want to have a build trigger that rebuilds all of the projects since most commits will be for a single project. Ideally I would like to have a cloudbuild.yaml file in each project subdirectory and a build trigger that detects changes in the project subdirectory of the repository. Is something like this possible?
As a possible workaround, I believe I may be able to keep my cloudbuild.yaml in the repository root and create a custom step that will get the commit sha (via the COMMIT_SHA substitution) and then get the list of files committed (via "git show --name-only --pretty=format: $COMMIT_SHA") to determine which project should be built and what image should be created. An alternative may be to have a tagging naming convention that will contain the project name and basing the trigger on that but I don't want to tag each commit.
Note, it seems like build triggers work very well when you have multiple repos but we made the decision to go with a mono repo and I don't want to rehash that debate in this question. I'd like to understand how to best use the Build Triggers in a mono repo.
Im trying to figure out how to chain multiple 'promotions' (by a user clicking) whilst ensuring that ever build in the chain is not queued. By current setup is as follows, NOTE as my application is a white label the configuration described below is repeated for every site.
Build & Test - Creates zipped artifact
Deploy to Testing - Has artifact and snapshot dependency
Deploy to Staging - Has artifact and snapshot dependency
Deploy to Production Has artifact dependency
When promoting to production i want to do this across all websites (without having to manually click promote on each build).
I am currently trying the following strategy, to set the 'deploy to production' build to have a Artifact dependency, without a snapshot dependency so it doesn't queue down the chain. I have set the artifact to depend on the 'Build & Test' configuration to gain access to the zipped project and i have set it to build with a specific build number referencing a parameter in the production build.
After doing some googleing i found out that i am able to get the stagings build number using the rest api as follows:
http://teamcity_url/httpAuth/app/rest/builds/buildType:build_configuration_id/resulting-properties/build.number
And this works great, however i don't understand how i can get this value into the parameter?
Also i dont know if my approach is correct? is there a better way?
Set up the artifact dependencies chronologically (Build -> Test -> Staging -> Production) and all your snapshot dependencies to Build & Test. Depending on exact needs you might have a snapshot dependency on both Build and the one your artifact dependency is on.
Also make sure you enable "Do not run new build if there is a suitable one. This should keep it from queuing down the chain without intention.
Using the build chain tab will be important because the main project page only shows the last build ran. So clicking run from there will que the chain because you are asking for a new build, even though to you it might feel like your asking for the next step to be ran. The build chain tab helps keep things clear.
Aim: Set up an ant/cmd script that will package the artifacts from several builds into a single zip. I plan to do this by setting up a final build configuration that will have a dependency on those several projects.
So all my build configurations build successfully and produce build artifacts on the Build Server #.BuildServer\system\artifacts{PROJECT}{several configurations}.. In my "Artifact Aggregating" configuration, I need to be able to reference what and where those artifacts are using variables that can be used in my ant/cmd script. i.e. I have Project A with configurations w, x, and y; how would I define/construct I variables of these configurations(w,x,y) that can be referenced by build configuration z. I looked at current Teamcity documentation i.e. http://www.jetbrains.net/confluence/display/TCD3/System+Properties+of+a+Build+Configuration#SystemPropertiesofaBuildConfiguration-ref; but I find this doesn't resolve my query.
Is there a way I can set up my artifact paths for configurations w, x and y to make the final task easier?
What would be the best way to accomplish this task? Any ideas are welcome.
This is how we do that.
Create n+1 Configuration(ZIP_ALL) and add dependency for all n projects see Dependency trigger
Create network share \\server\Build for aggregating project's building results
(you need cleanup strategy for that folder) - we simply drop all, our teammates create sub folders with SVN rev name (TC sets variable with revision value)
For each configuration create msbuild(or ant, or rake) script, that will build and zip (if you need) all output from build
Copy zip file or complete Output folder to common location (\\server\Build) see Copy Task
Create ant script for ZIP_ALL configuration that simply zips all files in common location
Publish that to TeamCity via Artifact Publishing