简体   繁体   中英

Packaging SSIS (.ispac) into NuGet Feed (Azure Artifacts)

I have to connect Octopus-Deploy to an external feed located on a Azure Devops Artifact Feed. I've successfully connected to the feed, but seeing how I packaged my SSIS project (.ispac) and SSDB project (.dacpac) as .dacpac and .ispac, it won't find them as it expects them to be in .NuGet format.

I haven't been able to try much as I'm pretty stuck.

N/A

I'm constrained to put whatever type of package I make on this feed to connect to from Octopus and deploy from. I have to have either have all my packages be NuGet Packages or find and alternate way that Octopus Deploy can find my packages on the Azure External Feed w/out them being NuGet. I'm only deploying SSDT things: ie dacpac, ispac, sql-agents, sql scripts etc.

You can make a NuSpec file which contains the things you need to package into NuGet to use a NuGet external feed in Octopus with. In the case of SSIS, you will want to reference the .ispac file in your nuspec file like so:

{

<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
  <metadata>
    <id>SSIS.ODSToDW</id>
    <version>2.0.0</version>
    <authors>blah</authors>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>ODSToDW ispac</description>
  </metadata>
  <files>
    <file src="bin/Development/ODS-To-DW.ispac" target="ODS-To-DW.ispac" />
  </files>
</package>

}

You'll then do a "build" pipeline in DevOps which builds your solution. In the case of ispac you will need to use SSIS Build (you can get it from the market place).

Upon building the solution so that the latest .ispac is formed, you then use NuGet pack pointed to your .nuspec file like so:

{

  - task: NuGetCommand@2
inputs:
  command: 'pack'
  packagesToPack: '**/*.nuspec'
  configuration: 'Release'
  versioningScheme: 'byPrereleaseNumber'
  majorVersion: '1'
  minorVersion: '0'
  patchVersion: '2'
  packTimezone: 'local'

}

Then you can do a "NuGet push" to your Artifact feed in azure. From which Octopus will be able to connect using "external NuGet feed" which will allow you to using "Deploy Package" from the Octopus Process options from which you can point to your specific artifact using it's name and a post-deployment powershell script will allow you to deploy to your sql server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM