Giter Club home page Giter Club logo

Comments (20)

bryanmacfarlane avatar bryanmacfarlane commented on September 13, 2024 1

Yes, this is in our plans. Not supported yet.

from azure-pipelines-tasks.

MylesArkell avatar MylesArkell commented on September 13, 2024 1

@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.

pascalberger avatar pascalberger commented on September 13, 2024

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.

chrispat avatar chrispat commented on September 13, 2024

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.

pascalberger avatar pascalberger commented on September 13, 2024

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.

clairernovotny avatar clairernovotny commented on September 13, 2024

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.

pascalberger avatar pascalberger commented on September 13, 2024

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.

bryanmacfarlane avatar bryanmacfarlane commented on September 13, 2024

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.

clairernovotny avatar clairernovotny commented on September 13, 2024

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.

pascalberger avatar pascalberger commented on September 13, 2024

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.

JakeGinnivan avatar JakeGinnivan commented on September 13, 2024

Oops, yeah. Wrong tab. Will delete that.

from azure-pipelines-tasks.

pascalberger avatar pascalberger commented on September 13, 2024

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.

JakeGinnivan avatar JakeGinnivan commented on September 13, 2024

According to a mailing list im on, it all works fine already!

img

from azure-pipelines-tasks.

pascalberger avatar pascalberger commented on September 13, 2024

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.

clairernovotny avatar clairernovotny commented on September 13, 2024

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.

pascalberger avatar pascalberger commented on September 13, 2024

Any info how to get the updatebuildnumber command working?

@TingluoHuang?

from azure-pipelines-tasks.

chrispat avatar chrispat commented on September 13, 2024

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.

pascalberger avatar pascalberger commented on September 13, 2024

Thanks @chrisrpatterson. I added #635 for documenting this properly.

from azure-pipelines-tasks.

pascalberger avatar pascalberger commented on September 13, 2024

This was implemented with 815986b and deployed with m88

from azure-pipelines-tasks.

pascalberger avatar pascalberger commented on September 13, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.