locked
Build.Preview - Can't launch deployment RRS feed

  • Question

  • Hi,

    I think i'm missing something really basic with the new Build.Preview system... Here my "overall" comprehension of the new build system and correct me if i am wrong.

    1- The agent gets the sources

    2- The agent runs all the build steps (Mine are PreBuild powershell script - MSBuild - PostBuild powershell script - Run UnitTests)

    3- Copy files to staging folder (if checked in build definition)

    4- Copy staging files to drop folder (if checked in build definition)

    OK, because the execution of a powershell is within the build steps, there seem to be no way i can execute a script using the staging folder nor the drop folder? Just like we could do with the Tfvc.Template.12.2.xaml build process with the PostDrop powershell scripts where i could launch the deployment using the Release Management REST API to deploy my product using the vNext Release Template.

    My vNext Release Template contains components wich are based on a build... so i can't call the REST API within the build steps because the drop folder hasn't been created yet...

    Second thing, i dont really understand the purpose of the staging folder vs the drop folder. If i check the staging folder option in the build definition but doesnt check the drop folder option, the specified content will be copied to the staging folder but the next build will overwrite it. Still because i can't execute scripts after the staging step, there is no way i can use those staging files.

    If i check the drop option but not the staging option, i get an empty drop folder... Oh nice! :)

    If i check both, i get a drop folder ready for deployment but not opportunity to launch some sort of scripts to use the drop...

    What am i missing?

    Friday, June 26, 2015 3:11 PM

Answers

  • OK i've just installed TFS 2015 RC2 and this version changed the way we can manage the drop folder.

    Now there is a build step named "Publish Build Artefact" which allows to create the drop folder.

    I am now able to continue with a powershell step which consumes the DropFolder.

    I'll mark this as answered

    Wednesday, July 15, 2015 3:00 PM

All replies

  • Hi Dominic,

    I am trying to involve someone to further look at this issue. There might be some time delay. Appreciate your patience and understanding.

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, June 29, 2015 9:29 AM
    Moderator
  • Hi Dominic,

    You can use the TF_BUILD_DROPLOCATION variable in your script file to get the TFS build drop location. Please check this MSDN article for the details about TFS environment variables.

    In addition, it seems that you are using TFS2015 RC. Could you please show me one screenshot from which I can understand which option you referring to of the staging folder.

    Thanks.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, June 30, 2015 9:32 AM
    Moderator
  • Hi Vicky,

    Those environment variables are not valid for Build.Preview feature, they are available for XAML builds. I used to use it before trying the new build system.

    I suggest you read this article and this one which explains the new environment variables and the TF_ prefixe removal of those variables.

    Here are the screenshots you requested, the first one are the build steps where i can "interact" with the build using powershell and the second one are the build options when i can manage the staging and dropping options, those actions are run AFTER the build steps (my powershells)

    Build Steps

    Options

    So because my scripts all run before the build drop is created, i can't find a way to trigger Release Management to deploy my build drop.

    Tuesday, June 30, 2015 11:01 AM
  • Hi Dominic,

    I am trying to involve someone to further look at this issue. There might be some time delay. Appreciate your patience and understanding.

    Any luck finding someone?
    Wednesday, July 8, 2015 3:30 PM
  • OK i've just installed TFS 2015 RC2 and this version changed the way we can manage the drop folder.

    Now there is a build step named "Publish Build Artefact" which allows to create the drop folder.

    I am now able to continue with a powershell step which consumes the DropFolder.

    I'll mark this as answered

    Wednesday, July 15, 2015 3:00 PM