Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 34 additions & 52 deletions CI/AZ_MainPipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ stages:
inputs:
azureSubscription: 'tSQLt CI Subscription(58c04a99-5b92-410c-9e41-10262f68ca80)'
KeyVaultName: 'tSQLtSigningKey'
SecretsFilter: '*'

- task: PowerShell@2
name: Install_tSQLt_OfficialSigningKey
Expand All @@ -119,22 +118,6 @@ stages:
TargetFolder: '$(Build.ArtifactStagingDirectory)/tSQLtCLR'
flattenFolders: true


- task: authenticode-sign@4
condition: false
inputs:
filePath: 'tSQLt*.dll'
signRootPath: '$(Build.ArtifactStagingDirectory)/tSQLtCLR'
timestampServer: 'http://timestamp.digicert.com'
timestampAlgo: 'sha256'
timestampServerDelay: '15'
fileAlgo: 'sha256'
retryCount: '5'
certificateLocation: 'pfxFile'
pfxFile: '$(CertificatePath)'
pfxPassword: '$(tSQLtSigningKeyPassword)'
additionalArguments: '/debug'

- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/tSQLtCLR'
Expand Down Expand Up @@ -298,7 +281,40 @@ stages:
inputs:
azureSubscription: 'tSQLt CI Subscription(58c04a99-5b92-410c-9e41-10262f68ca80)'
KeyVaultName: 'tSQLtSigningKey'
SecretsFilter: '*'

- checkout: tSQLtArtifacts
clean: true
fetchDepth: $(GitFetchDepth)
lfs: false
persistCredentials: true
path: tSQLtArtifacts

- task: PowerShell@2
name: GetArtifact
inputs:
targetType: 'inline'
script: |
$ArtifactTargetPath= '$(Pipeline.Workspace)/tSQLt/Build_Artifact'
$CheckIfGitOk = {param($isOk);if(-not $isOk){Write-Host "##vso[task.logissue type=error]GIT Failed!";throw "GIT Failed!"}};

Set-Location "$(Pipeline.Workspace)\tSQLtArtifacts\";

Write-Host ("ArtifactBranchName: {0}" -f "$(ArtifactBranchName)");
try{
git status
git remote show origin

git switch "$(ArtifactBranchName)"
$CheckIfGitOk.invoke($?);

git status
}catch{
throw "Git Failed. See prior errors.";
}

New-Item -Path $ArtifactTargetPath -ItemType directory -Force

Copy-Item -Path "*" -Verbose -Destination $ArtifactTargetPath

- task: AzurePowerShell@4
name: CreateVMAndMore
Expand Down Expand Up @@ -357,40 +373,6 @@ stages:
##--##--##--##--##--##--##--##--##--##---##--##--##--##--##--##--##--##--##--##
##--##--##--##--##--##--##--##--##--##---##--##--##--##--##--##--##--##--##--##

- checkout: tSQLtArtifacts
clean: true
fetchDepth: $(GitFetchDepth)
lfs: false
persistCredentials: true
path: tSQLtArtifacts

- task: PowerShell@2
name: GetArtifact
inputs:
targetType: 'inline'
script: |
$ArtifactTargetPath= '$(Pipeline.Workspace)/tSQLt/Build_Artifact'
$CheckIfGitOk = {param($isOk);if(-not $isOk){Write-Host "##vso[task.logissue type=error]GIT Failed!";throw "GIT Failed!"}};

Set-Location "$(Pipeline.Workspace)\tSQLtArtifacts\";

Write-Host ("ArtifactBranchName: {0}" -f "$(ArtifactBranchName)");
try{
git status
git remote show origin

git switch "$(ArtifactBranchName)"
$CheckIfGitOk.invoke($?);

git status
}catch{
throw "Git Failed. See prior errors.";
}

New-Item -Path $ArtifactTargetPath -ItemType directory -Force

Copy-Item -Path "*" -Verbose -Destination $ArtifactTargetPath

- task: PowerShell@2
name: GetVariablesInPlace
inputs:
Expand Down
3 changes: 2 additions & 1 deletion tSQLt.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
}
],
"settings": {
"powershell.codeFormatting.addWhitespaceAroundPipe": true
"powershell.codeFormatting.addWhitespaceAroundPipe": true,
"yaml.schemaStore.enable": false
}
}