DP-3020 - Lab 2 - Configure and Deploy CI/CD Pipelines - Issue
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
Research direction
Start with LAB02 Step 3 and its main.yml workflow, comparing the instructed deployment with the edited workflow shown in the issue. Run the workflow against an Azure SQL Database project and confirm the DotNet failure is gone and the build produces and deploys the DACPAC.
Written by the indexing model from the issue text.
Description
LAB02 (CSS): Configure and deploy CI/CD pipelines for Azure SQL Database projects
Task: Create a GitHub Actions workflow
Step. 3: Copy the code below on your main.yml file. The code includes the steps for building and deploying your database project.
User have reported running the deployment with the Main.yml file as instructed fails with a DotNet failure [P1]. I have confirmed this behavior and have been able to bypass the issue using the following edited code in the Main.yml file [P2]:
name: Build and Deploy SQL Database Project
on:
push:
branches:
- main
jobs:
build:
permissions:
contents: read
id-token: write
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Install MSBuild (required for .sqlproj)
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
# Install sqlpackage (Windows version)
- name: Install sqlpackage
run: |
dotnet tool install -g microsoft.sqlpackage
- name: Login to Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
# Build SQL Project using MSBuild
- name: Build SQL Project
run: |
msbuild .\MyDBProj\MyDBProj.sqlproj /p:Configuration=Release
# Publish DACPAC to Azure SQL
- name: Deploy DACPAC
run: |
sqlpackage /Action:Publish `
/SourceFile:".\MyDBProj\bin\Release\MyDBProj.dacpac" `
/TargetConnectionString:"${{ secrets.AZURE_CONN_STRING }}" `
/p:DropObjectsNotInSource=true
[P1] - Deployment with the code as instructed
[P2] - Deployment with edited code above
- Dominant language
- No language data
- Stars
- 5
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MicrosoftLearning/mslearn-sql-dev
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
MicrosoftLearning/mslearn-sql-dev#25 · 3 comments ·
All issues in MicrosoftLearning/mslearn-sql-dev
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
repo:raw-data
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
hotosm/raw-data-api#316 · 1 comment ·
-
agentic-workflows cascade-suspected
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
willow
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
openedx/openedx-authz#460 ·