Git Product home page Git Product logo

haribabubavanari / tfsdownloadfiles Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 110 KB

When we do adopt Continuous Deployment with TFS, how do we define the only changed files within the release branch for non-compiled applications? The attached script will get you find and download only the files that has modified from the given release (or source control application branch) branch.

PowerShell 100.00%
tfs-api tfsutilities tfs-sdk download tfs2015 vnext marketplace build-tool build-task tfs

tfsdownloadfiles's Introduction

TFSDownloadFiles

Purpose:

Main idea is to find the Release artifacts for non-compiled applications.

When we do adopt Continuous Deployment with TFS, how do we define the only changed files within the release branch for non-compiled applications? The attached script will get you find and download only the files that has modified from the given release (or source control application branch) branch.

Prerequisites

  • This script is tested in on-prem TFS 2015 environment only

  • Build agent must have Visual Studio 2015 installed

  • Build service account should have enough permissions on the box to download files (May be admin group member on the build server)

How to use this?

  1. Download the “FindChangese.ps1” file from repository,

  2. Check-in “FindChangese.ps1” to TFS Source control

  3. The script requires 3 parameters in below given order.

    i. First one should be TFS Server url (Or use pre-defined variable as $(SYSTEM_TEAMFOUNDATIONCOLLECTIONURI)

    ii. Source control path of TFS Release branch

    iii. Local file path on build server where the files should be downloaded to. (Or we can use TFS Build artifacts staging directory to download files)

  4. Call the above powershell script as shown below within build script.

Example 1

FindChangese.ps1 "http://TFSSERVERNAME:8080/tfs" "$/TestProject/Application1/Releases/Release_Branch" "D:\TFS\Drop"

Screenshots

ScreenShot

Example 2

You can pass predefined variables as parameters in TFS Build. Make sure your repository mapping limited to your release branch only, otherwise $(Build.SourceBranch) will result in to root level path ($\Team Project).

FindChangese.ps1 $(SYSTEM.TEAMFOUNDATIONCOLLECTIONURI) $(Build.SourceBranch) $(BUILD.ARTIFACTSTAGINGDIRECTORY)

Screenshots

ScreenShot

tfsdownloadfiles's People

Contributors

haribabubavanari avatar

Stargazers

 avatar

Watchers

 avatar

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.