Azure DevOps deploy Angular app to IIS with Octopus

540 Views Asked by At

I'm trying to deploy a Angular application to my IIS server using Octopus and Azure DevOps

My application has multiple environments, each environment with it's own settings (config.prod.json)

What I want to do

Basically Octopus should take the release from Azure DevOps, and copy the release to multiple folders, with different config.prod.json files. Each folder corresponds to a specific IIS website.

Azure DevOps pipeline setup

  1. Use Node 14.x
  2. npm install
  3. ng build --prod
  4. Archive dis/angular-app ; Archive type: zip
  5. Publish Artifact; Path $(Build.ArtifactStagingDirectory)

Triggers : Enable continuous integration

Azure DevOps Releases setup

1. Package Application for Octopus

enter image description here

2. Push Package(s) to Octopus

enter image description here

3. Create Octopus Release

enter image description here

Octopus setup

One step DEPLOY TO IIS

1. Package details

enter image description here

2. Custom Installation Directory

[![enter image description here][5]][5]

3. IIS Web Site and Application Pool enter image description here enter image description here

Errors In IIS while I click Binding, Basic settings, I get this error: There was an error while performing this operation. The parameter is incorrect

Also, the folder mapped in iis for the website that I'm targeting. Contains a folder drop with the zip file 27.zip (27 is the release id)

  1. How do I unzip the zip file?

  2. How do I replicate the zip file to the other environments?

  3. Is my configuration ok so far? What am I doing wrong?

Just a few of the links that I've checked:

https://octopus.com/docs/guides/deploy-aspnetcore-app/to-iis/using-octopus-onprem-azure-devops-builtin https://www.youtube.com/watch?v=NFqrWsUPCAM&t=345s https://www.youtube.com/watch?v=oeNYtYuhZQ4&t=2s

0

There are 0 best solutions below