Skip to content

Commit 1a765b1

Browse files
Merge branch 'main' into sysmgmt
2 parents d2c9f08 + bc77e03 commit 1a765b1

File tree

3 files changed

+112
-4
lines changed

3 files changed

+112
-4
lines changed

.devcontainer/devcontainer.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
],
77
"service": "default",
88
"portsAttributes": {
9-
"1433": {
10-
"label": "MSSQL"
9+
"6333": {
10+
"label": "Qdrant"
11+
},
12+
"6334": {
13+
"label": "Qdrant Admin"
1114
}
1215
},
1316
"secrets": {

.devcontainer/docker-compose.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,20 @@ services:
1313
context: .
1414
dockerfile: Dockerfile
1515
volumes:
16-
- ../..:/workspaces
16+
- ../..:/workspaces
17+
depends_on:
18+
- qdrant
19+
20+
qdrant:
21+
image: qdrant/qdrant:latest
22+
container_name: qdrant
23+
ports:
24+
- "6333:6333"
25+
- "6334:6334"
26+
volumes:
27+
- qdrant_data:/qdrant/storage
28+
environment:
29+
QDRANT__SERVICE__HOST: 0.0.0.0
30+
31+
volumes:
32+
qdrant_data:

.github/workflows/build-release.yml

Lines changed: 90 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,97 @@ jobs:
357357
}
358358
}
359359
360+
advanced-test:
361+
name: Advanced Integration Tests
362+
runs-on: ubuntu-latest
363+
needs: test-sqlpackage
364+
env:
365+
SMODefaultModuleName: dbatools
366+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
367+
368+
steps:
369+
- name: Download dbatools.library artifact
370+
uses: actions/download-artifact@v4
371+
with:
372+
name: dbatools-library-zip
373+
374+
- name: Extract dbatools.library
375+
shell: pwsh
376+
run: |
377+
# Create artifacts directory if it doesn't exist
378+
New-Item -ItemType Directory -Path ./artifacts -Force | Out-Null
379+
380+
# Extract the zip file
381+
Expand-Archive -Path ./dbatools.library.zip -DestinationPath ./artifacts -Force
382+
383+
# Verify extraction
384+
if (Test-Path ./artifacts/dbatools.library/dbatools.library.psd1) {
385+
Write-Host "✅ dbatools.library extracted successfully" -ForegroundColor Green
386+
} else {
387+
Write-Error "❌ Failed to extract dbatools.library properly"
388+
Get-ChildItem ./artifacts -Recurse | Select-Object FullName
389+
exit 1
390+
}
391+
392+
- name: Checkout dbatools repo (development branch)
393+
uses: actions/checkout@v4
394+
with:
395+
repository: dataplat/dbatools
396+
ref: development
397+
path: dbatools
398+
399+
- name: Ensure sqlpackage is executable
400+
run: chmod +x ./artifacts/dbatools.library/core/lib/dac/linux/sqlpackage || true
401+
402+
- name: Check file health and set encryption values
403+
shell: pwsh
404+
run: |
405+
# Import the built dbatools.library from artifact
406+
Import-Module ./artifacts/dbatools.library/dbatools.library.psd1 -Force
407+
Import-Module ./dbatools/dbatools.psd1 -Force
408+
409+
Set-DbatoolsConfig -FullName sql.connection.trustcert -Value $true -Register
410+
Set-DbatoolsConfig -FullName sql.connection.encrypt -Value $false -Register
411+
Get-DbatoolsConfigValue -FullName sql.connection.encrypt | Write-Warning
412+
mkdir /tmp/DbatoolsExport
413+
414+
- name: Setup docker images
415+
run: |
416+
# create a shared network
417+
docker network create localnet
418+
# Expose engine and endpoint then setup a shared path for migrations
419+
docker run -p 1433:1433 --volume shared:/shared:z --name mssql1 --hostname mssql1 --network localnet -d dbatools/sqlinstance
420+
# Expose second engine and endpoint on different port
421+
docker run -p 14333:1433 --volume shared:/shared:z --name mssql2 --hostname mssql2 --network localnet -d dbatools/sqlinstance2
422+
423+
- name: Clone appveyor repo
424+
working-directory: /tmp
425+
run: |
426+
gh repo clone dataplat/appveyor-lab
427+
428+
- name: Run advanced integration tests
429+
shell: pwsh
430+
env:
431+
TENANTID: ${{secrets.TENANTID}}
432+
CLIENTID: ${{secrets.CLIENTID}}
433+
CLIENTSECRET: ${{secrets.CLIENTSECRET}}
434+
CLIENT_GUID: ${{secrets.CLIENT_GUID}}
435+
CLIENT_GUID_SECRET: ${{secrets.CLIENT_GUID_SECRET}}
436+
run: |
437+
# Import the built dbatools.library from artifact (ensure it's loaded first)
438+
Import-Module ./artifacts/dbatools.library/dbatools.library.psd1 -Force
439+
440+
# Import dbatools from the development branch checkout
441+
Import-Module ./dbatools/dbatools.psd1 -Force
442+
443+
Get-DbatoolsConfigValue -FullName sql.connection.trustcert | Write-Warning
444+
Get-DbatoolsConfigValue -FullName sql.connection.encrypt | Write-Warning
445+
446+
# Run the integration tests using the script from the dbatools repo
447+
$null = Invoke-Pester ./dbatools/.github/scripts/gh-actions.ps1 -Output Detailed -PassThru
448+
360449
create-preview-release:
361-
needs: [linux-build, build-windows, test-sqlpackage]
450+
needs: [linux-build, build-windows, test-sqlpackage, advanced-test]
362451
runs-on: windows-latest
363452
# Create release if manually triggered OR if version contains "preview"
364453
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push'

0 commit comments

Comments
 (0)