Synopsis
Packages the scripts folder for publishing it (either on a local or a NuGet Server).
Description
The Package task in an Azure DevOps database pipeline is responsible for creating a deployable package from your database code. This task is a critical step for continuous integration/continuous deployment (CI/CD) in database development, as it prepares your changes for deployment to various environments.
How to create the Package task
Create the dbForge DevOps Automation for SQL Server – Package task that will pack your scripts folder into a package:
As you can see, the file name is tied to the build number and is generated dynamically according to the template. The output file will be saved to the working folder of the agent.
The generated NuGet package is an intermediate package and should be published somewhere.
Customization options
Package
ID
Enter the output package file name. The format is as follows: {name}.{major}.{minor}.{build}. You can use the $(Build.BuildNumber) variable to customize it for a build pipeline or the $(Release.ReleaseId) variable to customize it for a release pipeline.
Select to add the documentation generated in dbForge DevOps Automation for SQL Server - Document task to the package.
Source
Select whether the database source project is located in the repository’s root directory or within a subfolder path.
Control Options
Select to enable the task in your pipeline. If a task is disabled, it will be skipped during the pipeline execution.
Select to continue the pipeline running even if this task fails.
Specify the number of retries for this task that will happen in case of task failure.
Note
This requires agent version 2.194.0 or later. Not supported for agentless tasks.
Specify the maximum time, in minutes, that a task is allowed to execute before being canceled by server. A zero value indicates an infinite timeout.
Specify when this task should run. Choose Custom conditions to specify more complex conditions.
Here you can select from the following options:
Output Variables
Any changes to the reference name will require updates to downstream tasks that uses this reference name, a valid reference name can only contain ‘a-z’, ‘A-Z’, ‘0-9’ and ‘_’.