Skip to content

Commit de7d87f

Browse files
committed
adding github info
1 parent 91f86ff commit de7d87f

1 file changed

Lines changed: 23 additions & 3 deletions

File tree

docs/tools/sqlpackage/sqlpackage-pipelines.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.assetid: 198198e2-7cf4-4a21-bda4-51b36cb4284b
99
author: "dzsquared"
1010
ms.author: "drskwier"
1111
ms.reviewer: "maghan"
12-
ms.date: 06/25/2021
12+
ms.date: 08/18/2021
1313
---
1414

1515
# SqlPackage in development pipelines
@@ -47,12 +47,12 @@ By using the [run](https://docs.github.com/en/free-pro-team@latest/actions/refer
4747
:::image type="content" source="media/sqlpackage-pipelines-github-action.png" alt-text="GitHub action output displaying build number 15.0.4897.1":::
4848
4949
50-
## Obtaining SqlPackage diagnostics from a pipeline agent
50+
## Obtaining SqlPackage diagnostics in a pipeline agent
5151
5252
Diagnostic information from SqlPackage is available in the command line through the parameter `/DiagnosticsFile`, which can be used in virtual environments such as Azure Pipelines and GitHub Actions. The diagnostic information is written to a file in the working directory. The file name is dictated by the `/DiagnosticsFile` parameter.
5353

5454
### Azure Pipelines
55-
Adding the `/DiagnosticsFile` parameter to the "Additional SqlPackage.exe Arguments" field in the Azure Pipeline agent configuration will cause the diagnostic information to be written to the file specified. Following the SqlAzureDacpacDeployment task, the diagnostic file can be made available outside of the agent by publishing a pipeline artifact.
55+
Adding the `/DiagnosticsFile` parameter to the "Additional SqlPackage.exe Arguments" field in the Azure Pipeline SqlAzureDacpacDeployment configuration will cause the SqlPackage diagnostic information to be written to the file specified. Following the SqlAzureDacpacDeployment task, the diagnostic file can be made available outside of the virtual environment by publishing a pipeline artifact as seen in the example below.
5656

5757
```yaml
5858
- task: SqlAzureDacpacDeployment@1
@@ -79,6 +79,26 @@ Adding the `/DiagnosticsFile` parameter to the "Additional SqlPackage.exe Argume
7979
After the pipeline run, the diagnostic file can be downloaded from the run summary page under "Published Artifacts".
8080

8181
### GitHub Actions
82+
Adding the `/DiagnosticsFile` parameter to the "arguments" field in the GitHub Action sql-action configuration will cause the SqlPackage diagnostic information to be written to the file specified. Following the sql-action task, the diagnostic file can be made available outside of the virtual environment by publishing an artifact as seen in the example below.
83+
84+
```yaml
85+
- name: Azure SQL Deploy
86+
uses: Azure/sql-action@v1
87+
with:
88+
# Name of the Azure SQL Server name, like Fabrikam.database.windows.net.
89+
server-name: ${{ secrets.AZURE_SQL_SERVER }}
90+
# The connection string, including authentication information, for the Azure SQL Server database.
91+
connection-string: ${{ secrets.AZURE_SQL_CONNECTION_STRING }}
92+
# Path to DACPAC file to deploy
93+
dacpac-package: .\DatabaseProjectAdventureWorksLT\bin\Release\DatabaseProjectAdventureWorksLT.dacpac
94+
# additional SqlPackage.exe arguments, leave all existing indexes in place
95+
arguments: /DiagnosticsFile:DatabaseProjectAdventureWorksLT/DiagnosticLog.txt
96+
97+
- uses: actions/upload-artifact@v2
98+
with:
99+
name: 'DiagnosticLog.txt'
100+
path: 'DatabaseProjectAdventureWorksLT/DiagnosticLog.txt'
101+
```
82102

83103
## Update SqlPackage on the pipeline agent
84104

0 commit comments

Comments
 (0)