Skip to content

Commit 8a3639d

Browse files
authored
Ci testing (#74)
* removed superfluous step and some filters * moved artifact steps to before VM creation
1 parent 56b432f commit 8a3639d

File tree

2 files changed

+36
-53
lines changed

2 files changed

+36
-53
lines changed

CI/AZ_MainPipeline.yml

Lines changed: 34 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ stages:
9292
inputs:
9393
azureSubscription: 'tSQLt CI Subscription(58c04a99-5b92-410c-9e41-10262f68ca80)'
9494
KeyVaultName: 'tSQLtSigningKey'
95-
SecretsFilter: '*'
9695

9796
- task: PowerShell@2
9897
name: Install_tSQLt_OfficialSigningKey
@@ -119,22 +118,6 @@ stages:
119118
TargetFolder: '$(Build.ArtifactStagingDirectory)/tSQLtCLR'
120119
flattenFolders: true
121120

122-
123-
- task: authenticode-sign@4
124-
condition: false
125-
inputs:
126-
filePath: 'tSQLt*.dll'
127-
signRootPath: '$(Build.ArtifactStagingDirectory)/tSQLtCLR'
128-
timestampServer: 'http://timestamp.digicert.com'
129-
timestampAlgo: 'sha256'
130-
timestampServerDelay: '15'
131-
fileAlgo: 'sha256'
132-
retryCount: '5'
133-
certificateLocation: 'pfxFile'
134-
pfxFile: '$(CertificatePath)'
135-
pfxPassword: '$(tSQLtSigningKeyPassword)'
136-
additionalArguments: '/debug'
137-
138121
- task: ArchiveFiles@2
139122
inputs:
140123
rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/tSQLtCLR'
@@ -298,7 +281,40 @@ stages:
298281
inputs:
299282
azureSubscription: 'tSQLt CI Subscription(58c04a99-5b92-410c-9e41-10262f68ca80)'
300283
KeyVaultName: 'tSQLtSigningKey'
301-
SecretsFilter: '*'
284+
285+
- checkout: tSQLtArtifacts
286+
clean: true
287+
fetchDepth: $(GitFetchDepth)
288+
lfs: false
289+
persistCredentials: true
290+
path: tSQLtArtifacts
291+
292+
- task: PowerShell@2
293+
name: GetArtifact
294+
inputs:
295+
targetType: 'inline'
296+
script: |
297+
$ArtifactTargetPath= '$(Pipeline.Workspace)/tSQLt/Build_Artifact'
298+
$CheckIfGitOk = {param($isOk);if(-not $isOk){Write-Host "##vso[task.logissue type=error]GIT Failed!";throw "GIT Failed!"}};
299+
300+
Set-Location "$(Pipeline.Workspace)\tSQLtArtifacts\";
301+
302+
Write-Host ("ArtifactBranchName: {0}" -f "$(ArtifactBranchName)");
303+
try{
304+
git status
305+
git remote show origin
306+
307+
git switch "$(ArtifactBranchName)"
308+
$CheckIfGitOk.invoke($?);
309+
310+
git status
311+
}catch{
312+
throw "Git Failed. See prior errors.";
313+
}
314+
315+
New-Item -Path $ArtifactTargetPath -ItemType directory -Force
316+
317+
Copy-Item -Path "*" -Verbose -Destination $ArtifactTargetPath
302318
303319
- task: AzurePowerShell@4
304320
name: CreateVMAndMore
@@ -357,40 +373,6 @@ stages:
357373
##--##--##--##--##--##--##--##--##--##---##--##--##--##--##--##--##--##--##--##
358374
##--##--##--##--##--##--##--##--##--##---##--##--##--##--##--##--##--##--##--##
359375

360-
- checkout: tSQLtArtifacts
361-
clean: true
362-
fetchDepth: $(GitFetchDepth)
363-
lfs: false
364-
persistCredentials: true
365-
path: tSQLtArtifacts
366-
367-
- task: PowerShell@2
368-
name: GetArtifact
369-
inputs:
370-
targetType: 'inline'
371-
script: |
372-
$ArtifactTargetPath= '$(Pipeline.Workspace)/tSQLt/Build_Artifact'
373-
$CheckIfGitOk = {param($isOk);if(-not $isOk){Write-Host "##vso[task.logissue type=error]GIT Failed!";throw "GIT Failed!"}};
374-
375-
Set-Location "$(Pipeline.Workspace)\tSQLtArtifacts\";
376-
377-
Write-Host ("ArtifactBranchName: {0}" -f "$(ArtifactBranchName)");
378-
try{
379-
git status
380-
git remote show origin
381-
382-
git switch "$(ArtifactBranchName)"
383-
$CheckIfGitOk.invoke($?);
384-
385-
git status
386-
}catch{
387-
throw "Git Failed. See prior errors.";
388-
}
389-
390-
New-Item -Path $ArtifactTargetPath -ItemType directory -Force
391-
392-
Copy-Item -Path "*" -Verbose -Destination $ArtifactTargetPath
393-
394376
- task: PowerShell@2
395377
name: GetVariablesInPlace
396378
inputs:

tSQLt.code-workspace

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
}
66
],
77
"settings": {
8-
"powershell.codeFormatting.addWhitespaceAroundPipe": true
8+
"powershell.codeFormatting.addWhitespaceAroundPipe": true,
9+
"yaml.schemaStore.enable": false
910
}
1011
}

0 commit comments

Comments
 (0)