Current build number not being considered during tfsbuild

52 Views Asked by At

Something is not right. i am trying to build and deploy thru the below code snippet, but it so happens that the current build doesnt get deployed, whereas if i give a build number older than a current build, that gets deployed. I am puzzled what is wrong ... Can you please help me ... I am not sure why the current buildnumber is not being considered ...

<PropertyGroup>
            <deployappsvr>\\vdev\$(HostedFolder);\\vdev2\$(HostedFolder)</deployappsvr>
            <prjbin>Release\_PublishedWebsites\RE.Service</prjbin>
        </PropertyGroup>

    <Target Name ="AfterEndToEndIteration" Condition=" '$(IsDesktopBuild)'!='true' ">
        <!-- Starting deployment to servers -->
        <Message Text="Starting deployment to servers" />
        <CallTarget Targets="DeployBatching" />
        <Message Text="finished deploying to servers" />

        <!-- Unmap TFS mapping -->
        <Exec Command="tf workfold /unmap $(tfsmap) /workspace:$(WorkspaceName) /collection:http://tfsapp:8080/tfs"/>
      </Target>

      <ItemGroup>
        <SrcToCopy Include="$(DropLocation)\$(BuildNumber)\$(prjbin)\**\*"/>
        <DestToCopy Include="$(deployappsvr)"/>
      </ItemGroup>

      <Target Name="DeployBatching" Outputs="%(DestToCopy.FullPath)">

        <PropertyGroup>
          <DestToCopy>%(DestToCopy.FullPath)</DestToCopy>
        </PropertyGroup>

        <RemoveDir Directories="@(DestToCopy)"/>
        <MakeDir Directories="@(DestToCopy)"/>

        <Message Text="111 @(SrcToCopy) 222 $(prjbin) 333 "/>
        <Message Text="444  Copying source files @(SrcToCopy->'$(DestToCopy)\%(RecursiveDir)\%(Filename)%(Extension)') "/>
        <Copy
             SourceFiles="@(SrcToCopy)"
             DestinationFiles="@(SrcToCopy->'$(DestToCopy)\%(RecursiveDir)\%(Filename)%(Extension)')"/>
        <Message Text="Finished Copying source files"/>

        <Exec Command="powershell Invoke-Command -computername vdev -scriptblock {md c:\buildtestfolder} > c:\power\pwrcmd.log 2>&amp;1"/>
      </Target>
1

There are 1 best solutions below

0
On

I tired deploying from the build server i.e deploying build artifacts from the server copy instead of dropzone, that seem to be working but deploying from dropzone doesn't seem to be working still.