Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

how to Configure Task for deployment project?

My project Build Successfully by MSBUILD and loaded build file in Shared Artifacts. now how to Canfigure Task for Deployment Download Build files from Artifacts and Transfer my server location and which one best for Project like (MSDeploy) or others. please give me sample example.

1 answer

Assuming IIS, there are 3 components to take care of.

  1. Move the files
  2. Establish Application Pool
  3. Establish Web Application

For moving the files, I just use a network share and move stuff over using a filter to remove source code files*. The AppPool can be setup once and forgot in a lot of case but I prefer to keep all the setting in version control along with the application(s) using it; in our case almost every application has it's own AppPool so it is easy to manage. The WebApplication is telling IIS that have more than .html/images/css and typically want the Asp.netengine, you can also setup bindings there. So onto the how, I use powershell. Powershell scripts are added to the version control of the application and has some easy access to IIS control via the WebAdmistration module and since by AppPool only have one application I can easily deleted them and push new ones with the version controlled.

$appName = "YourApplicationName"
Import-Module WebAdministration
if (Test-Path "IIS:\AppPools\$appName")
{	Remove-WebAppPool $appName	}
if (Get-WebApplication -Name $appName)
{	Remove-WebApplication -Name $appName -Site "Default Web Site"	}
# Redacted copying files over

$appPool = New-WebAppPool $appName
# Redacted user information
$appPool.processModel.userName = $user
$appPool.processModel.password = $password
$appPool.processModel.identityType  = 3
$appPool.managedRuntimeVersion = "v4.0"
$appPool | Set-Item

New-WebApplication -Name $appName -Site "Default Web Site" -PhysicalPath "C:\inetpub\wwwroot\$appName" -ApplicationPool $appName

I removed our file copying to keep it pertinent and user information for obvious reasons but powershell can access some Marshall operations really easily and safely store passwords for you on the target machine(s).

*Wanted to show the script then explain, we move other everyone but source code so including the install script to the target machine in a temp folder then execute the install script locally on the target machine. We've been plagued with file copying issues and downtime latencies which were solved with that approach.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bamboo

Bamboo 7.2 is here!

I'm happy to announce that Bamboo 7.2 has been released and it’s overflowing with awesome new features. This will be the last major Server release before the launch of Bamboo DC. Bamboo logs We...

142 views 2 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you