I have a release definition in TFS and I've set it up for manual deploys to dev. When I create the release I add a comment of 805. You can see this in the following image under details.
Now when I go to deploy to dev I add a different comment 810...
Now the deployment runs and looking in the logs, I can see the comment I entered when I created the release (805) but nowhere to be found is the comment when I entered the comment during deployment (810)...
I can see the 810 when clicking history...
My question... Can I access the deployment comment from release variables or any other way from a step that runs during deployment? I don't see a way to do this.
The 805 here is the release description, while 810 here is a deployment comment. There is no such release variable for a deployment comment.
Related
I am using TFS 2018. I successfully created a "Hello World" MVC and SQL Server project. I was able to build and release the project to the target server.
To make sure I had the method down correctly, I created a second "Hello World" MVC project. I was able to build it successfully. The only problem was that when I went to the "Deployment Groups", I didn't see anything there, even though the target server already has a Deployment Machine running.
I figured the problem is that I need to share the Deployment Machine. So I read the instructions for Deployment Groups here:
Add a deployment pool and group to another project
To manage a deployment pool, or to add an existing deployment pool and
the groups it contains to another project, choose the Manage link in
the Agent Pool section of the Deployment Group page. In the Deployment
Pools page, select the projects for which you want the deployment
group to be available, then save the changes.
When you navigate to the Deployment Groups page in the target
project(s), you will see the deployment group you added and you can
assign project-specific machine tags as required.
The problem is that while I have a "Deployment Group" page, I do not see any "Agent Pool", "Manage", or Deployment Group". (See screenshots immediately below).
Am I missing something obvious? Is this a case of the instructions really being meant for VSTS and/or Azure, but not TFS?
I selected the deployment group and see the machine that I registered on my target server.
Even when expanding the machine, I don't see any options to share.
In summary, what I do have to do in order to share this Deployment Machine, so that I can release different projects to the same server?
At the collection level, we do have a "Deployment Pool (similar to Agent Pools)". However, it is only available in VSTS for now.
Can you tell me if this feature will be integrated in the TFS 2018's next update ? and when this update should be available ?
We are hoping to get it in the next update in TFS. Tentatively in
TFS 2018 Update 2.
This feature seems will come up on TFS 2018 update2, details please refer this link: Why are deployment groups project specific?
Sharing of deployment group targets feature will be available with TFS 2018 Update 2. On earlier version, you have an option of installing multiple agents. Please note, multiple agents can run the deployments in parallel and can overstep on each other for shared resources.
If upgrading to update 2 is not a possibility, you can modify your registration script to make the computer name dynamic:
modify this:
--deploymentgroup --agent $env:COMPUTERNAME --runasservice
with this:
--deploymentgroup --agent $env:COMPUTERNAME-$destFolder --runasservice
$destFolder basically makes the agent name unique, allowing you to register the same machine in multiple deployment groups.
If you get a message saying
The request was aborted: Could not create SSL/TLS secure channel
run the following command before provisioning.
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
I am using TFS on-premise, but this question pertains to the team services release management online too.
I am working on a new setup to use the new Release Management tools. I have a Main line in TFS source control, branched into a Dev branch. All work is done and checked in on the Dev branch. We manually merge code from the Dev branch back to the Main branch. When we do this, we have a auto build in TFS to download the Main branch repository and do a build of the source. I have a release management environment setup to take this build of the Main and deploy it to a staging environment, and then to take the same bits and deploy to a production environment.
My question pertains to the process of releases and bug fixes. Normally we would use a release branch per release, and then apply bug fixes to that code and release from that branch. I don't know the best practices for handling this situation in Release Management. I still want to use the RM configuration I have setup to perform the release of these bug fixes, because I need to put the bits through the same QA process and have auditing/records, and also use it to deploy the bug fix release to staging/production.
I can't find any guidance on MS documentation about how to best do this through Release Management.
You could create a new release definition to deploy application to production environment. For pervious release definition, it is used to deploy application to staging environment to do test and verify.
So, if bugs be fixed, check into Dev branch and merge into Main branch to trigger build and release (deploy to staging environment), after a major release is ok and approved, trigger another release manually to deploy to production environment.
I'm new to jenkins.
For that sake I installed the latest version of jenkins i.e. 1.632 on my ubuntu and deployed a war using post build actions in the configuration part. That worked fine for me.
Then I changed a few things in the build making sure that it fails when deployed and it effectively did and I'm not able to access the application die to deployment failure.
But I'm curious here, I have heard that in case of a build failure jenkins makes sure that the previous build remains deployed so that the application is always up and running. Please clarify if I'm wrong or doing anything wrong in my deployment steps.
I did searched a lot about this but couldn't find a valuable answer.
Haven't done much with the deploy plugin but it states this in the docs
Now when you trigger this job you can enter the build number (or use
any other available selector) to select which build to redeploy.
So you can set up a build on failure which will redeploy the last stable version. Here is also an example how to get the last stable build number:
http://<JENKINS>/job/<JOB_NAME>/lastStableBuild/buildNumber
I have a multi-module maven project that I'm building with Jenkins called MyApp. I also have another maven project that depends on MyApp, and this project runs integration tests on MyApp.
In Jenkins, when I view the status of the MyApp project it successfully displays a list of previously run builds and I can click on them to find out more information (and view the console output).
However, the integration test project, while it does build properly, it only displays previously run builds for about 5 minutes, at which point something happens and jenkins completely forgets the build ever ran.
On the filesystem, I am able to cd to:
/usr/share/tomcat6/.jenkins/jobs/My App Integration Test/builds
and ls reveals
me#myserver:/usr/share/tomcat6/.jenkins/jobs/My App Integration Test/builds$ ls
1 2 2013-01-24_16-46-59 2013-01-24_16-51-58 2013-01-24_18-05-09 2013-01-24_18-58-46 3 4
that all my previously run builds are right there, where they should be.
Jenkins has a "discard old builds" feature in its project configuration page, but I obviously have it unchecked.
I'm running jenkins in tomcat6 on Ubuntu.
Help please?
Jenkins has resolved this issue as of 1.505 I recommend everyone upgrade who does not wish to switch from Jenkins back to Hudson.
This can be done through the GUI via Manage Jenkins->Upgrade to Latest (Note for this to work you need to have the appropriate permissions for Jenkins)
More information can be found here For linux users aptitude update or yum update jenkins should also work for you.
I have jenkins running with 1.517, still facing the issue if the number of builds goes more than 65 without discard option. Found that reload configuration bring back the build history.
I've seen this issue and have always been able to resolve it by following these steps:
Going to \\[buildmachine]\C$\Jenkins\jobs\[jobname]
Removing the builds folder.
Removing shortcuts to lastStable and lastSuccessful.
Open file nextBuildNumber and change the number to 1.
Then build new jobs and they no longer disappear.
As mentioned by Dave Bacher, this appears to be a bug in Jenkins. I switched over to Hudson and problem fixed!
We're using TFS to follow a pretty standard agile build process:
Nightly builds from latest source code
Build to staging server every 2 weeks
Build to production server every 4 weeks
I've got 1 and 2 set up in TFS and working great. However, I'm struggling a little with #3. If I just set up a "normal" build, it will pull the most recent source code and use that to push to the production server. But what I really want is to move the code from step #2 to the production server since it's already been vetted by the QA team.
I thought about doing a custom build template that uses XCopy or something along those lines, but then the issue is how to update the configuration strings.
I was following this article, which seems to be exaclty what I want, http://www.asp.net/web-forms/tutorials/deployment/configuring-team-foundation-server-for-web-deployment/deploying-a-specific-build, but it is not working.
How do you all accomplish this?
So this is a slightly easier way to achieve 3. if you have achieved 2.
Let your production build definition stay as it is. However to compile the same changeset that was used to compile your staging build in step 2 (which has now been vetted by QA), when you queue a prod build then on the parameters tab expand the Advanced section and find the "Get Version" property as shown below.
In here you can specify the same TFS changeset that was used to build your build in step 2. Assuming this changeset is number 84, you would write (exactly)
C84
if you compile labels then for a label named - "For build xyz" you specify
LFor build xyz
Note that "C" and "L" above are intentional.
Hope this helps.
We have a different branch for production and code only gets merged into the production branch after passing Q&A.
That allows us to apply hot-fixes to production code with changes directly on the production branch (those will eventually get reverse integrated into main then dev) while development continues on the development branches.
Once code in the development branches are ready for Q&A, it is merged into the Main trunk.
CI and nightly builds are done on the development branches - the difference being nightly builds having more comprehensive automated tests