Comments (20)
Yes, this is in our plans. Not supported yet.
from azure-pipelines-tasks.
@chrisrpatterson I have found that when I use the ##vso[build.updatebuildnumber] it does update the version number but the build rev number does not update at the end of the build. this causes me problems as I use this rev number in the prerelease info of my version number eg 1.0.0-meta2016010105
ie meta date + rev
How can I update the build number and ensure that the build rev number is updated at the end of the build?
from azure-pipelines-tasks.
I tried to pass the determined version as a variable to TFS:
##vso[task.setvariable variable=SemVer;]1.1.0-unstable.2
And use $(SemVer)
as Build number format. But this results in a build called $(SemVer)
from azure-pipelines-tasks.
Even when we have a command to update the build number using variables you create on the agent in the build number format likely will not be possible. The server expands the build number when the build is queued and that variable will not exist yet.
From: Bryan MacFarlane [mailto:[email protected]]
Sent: Friday, August 7, 2015 8:20 AM
To: Microsoft/vso-agent-tasks [email protected]
Subject: Re: [vso-agent-tasks] Logging command for setting the version of the build (#380)
Yes, this is in our plans. Not supported yet.
—
Reply to this email directly or view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgithub.com%2fMicrosoft%2fvso-agent-tasks%2fissues%2f380%23issuecomment-128686273&data=01%7c01%7cChris.Patterson%40microsoft.com%7cbeb00551ec7d4be075f708d29f227a95%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=1Gcne04JsW6NnY8fqIH%2fpH4VPtZhdMd1UmkhWJAcXyE%3d.
from azure-pipelines-tasks.
I think it is quite a common use case to determine the version based on the code or repository and not from the build system, and therefore would expect a build system to be able to adopt the build version accordingly.
Why not use a temporary build number while running the build and define the final build number after the build finishes?
from azure-pipelines-tasks.
Maybe it's worthwhile to distinguish between TFS's internal build number, which understandably cannot be changed by a build agent/task and a "user/display" build number/name.
I don't expect to change TFS's calculated build id, but we do need something that can be used as a variable in the display name for the build. In terms of behavior, if that variable is not yet defined, then I'd expect it to be blank, just like any other MSBuild variable. When a task updates/sets that variable, the display name of the build should change though -- re-evaluate based on the current variable content.
from azure-pipelines-tasks.
It seems like there is already an internal build number (which you see for example in the file name if you download the logs as ZIP, which contains an incrementing number). This number already cannot be defined.
The problem is that the user displayed build number at the moment also is expanded at the beginning of the build, which in my opinion should be done at the end. I won't have a problem also if until then the UI shows only the internal build number.
from azure-pipelines-tasks.
When we add the feature to be able to set the build name through a cmd, it will be the user/display build number - not the internal id. That would allow you to overwrite it. The server will still set a default one.
from azure-pipelines-tasks.
That's great! Is there any rough idea when this will be ready?
Also, would setting the build name be instead of the variables currently available for that go into BuildNumber or would there be a way to combine evaluation of the two?
I'd prefer to have both, so that I could use a set of variables to include a branch name, build defn name, etc, as I do today, but then also include a variable that gets set later with the specific version. I don't want the task that sets the version to also dictate the rest of the displayed build name -- just part of it that I'll use via a variable.
from azure-pipelines-tasks.
But this hasn't anything to do with this specific issue? This issue is about the capability to set the build version of a TFS vNext build which needs to be fixed inside the TFS build agent. I think your findings belong to GitTools/GitVersion#562?
from azure-pipelines-tasks.
Oops, yeah. Wrong tab. Will delete that.
from azure-pipelines-tasks.
It seems like this is implemented now: 815986b.
With which agent version will it be released? Since it is not in one of the release branches yet will it be m90?
from azure-pipelines-tasks.
According to a mailing list im on, it all works fine already!
from azure-pipelines-tasks.
It doesn't work on my tenants yet (which are on ring2). On my tentant I receive the following message:
##[warning]Unable to process logging event:##vso[build.updatebuildnumber]1.4.0-unstable.135
It would be helpful if on the documentation is the agent version mentioned (if it depends on the agent) from which on a certain command is supported, so that custom tasks which use a message can set the minimumAgentVersion accordingly. Or is there any other way to make sure that a message is supported in the VSO tenant running the task?
@bryanmacfarlane, @chrisrpatterson Can you help here?
from azure-pipelines-tasks.
Definitely want variables in this. In my "build number" for VSO, I want to include the branch name as I use a single build definition for multiple branches. Even better is if there's a way to just a way to put a placeholder in the VSO build format string and have this build task read/insert the SemVer into that.
from azure-pipelines-tasks.
Any info how to get the updatebuildnumber command working?
from azure-pipelines-tasks.
You need the 1.88 agent.
From: Pascal Berger [mailto:[email protected]]
Sent: Friday, October 9, 2015 5:42 AM
To: Microsoft/vso-agent-tasks [email protected]
Cc: Chris Patterson [email protected]
Subject: Re: [vso-agent-tasks] Logging command for setting the version of the build (#380)
Any info how to get the updatebuildnumber command working?
@TingluoHuanghttps://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgithub.com%2fTingluoHuang&data=01%7c01%7cChris.Patterson%40microsoft.com%7c564bdeb718944a5f96b908d2d08de902%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=GqbcRqrfxzjcVxYSYHgKXameSM4ixAxBb4lYVEV%2fMrU%3d?
—
Reply to this email directly or view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgithub.com%2fMicrosoft%2fvso-agent-tasks%2fissues%2f380%23issuecomment-146815289&data=01%7c01%7cChris.Patterson%40microsoft.com%7c564bdeb718944a5f96b908d2d08de902%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=kpBN5CGWaMxvig0p5GHutjWVftG7INr%2f4jekmjWbzS0%3d.
from azure-pipelines-tasks.
Thanks @chrisrpatterson. I added #635 for documenting this properly.
from azure-pipelines-tasks.
This was implemented with 815986b and deployed with m88
from azure-pipelines-tasks.
@onovotny You can use variables when calling updatebuildnumber from a script. It should be also easy to write a custom wrapper task, which accepts build number format / or variables and calls updatebuildnumber accordingly
from azure-pipelines-tasks.
Related Issues (20)
- [REGRESSION]: AzureKeyVault@2 fails reading secrets from a variable group linked to a Key Vault on classic release pipeline HOT 4
- Docker@2 Inspection fail when Runing on Selfhosted agent
- [BUG]: bash task incorrectly parses string parameter containing regular expression pattern HOT 3
- [BUG]: DockerCompose@1 failed with Version mismatch error HOT 6
- [BUG]: GitHubComment@0 fails with "Resource not accessible by integration"
- [REGRESSION]: Failed to obtain the Json Web Token(JWT) using service principal client ID HOT 1
- [enhancement]: Make CopyFiles usable to copy single files out of source folders with a lot of subfolders/subpaths HOT 1
- [Question]: What code coverage formats does VSTest@3 support for automatic publishing?
- [BUG]: AzureFunctionApp is not accepting package variable correctly HOT 1
- [BUG]: FileTransform@V2 prints error, but replaces strings HOT 1
- [BUG]: AzureKeyVault task ignores no_proxy env variable
- [enhancement]: UseDotNet should support `major.minor.patchXX' syntax to support floating within an SDK feature band HOT 2
- [BUG]: AzureCLI@2 failOnStandardError does not fail with stderr on Windows
- [BUG]: AzureFunctionAppV2 has invalid json for Russian Resource files HOT 3
- [enhancement]: Allow Options to be passed to Compose
- [BUG]: UseDotNet task installs x86 build on Windows arm64 HOT 2
- [BUG]: Data issue with Azure PowerShell telemetry - ADO telemetry data not recorded. HOT 2
- [BUG]: Getting warnining Task 'Azure Key Vault' version 1 (AzureKeyVault@1) is deprecated while using library linked with keyvault HOT 23
- [BUG]: Latest ArtifactTool binary from UniversalPackage task is not compatible with CentOS HOT 8
- [Question]: What is the FileTransform@1 migration path? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-pipelines-tasks.