diff --git a/ado/build_test.yaml b/ado/build_test.yaml index 102cc4e0..43fcbd2d 100644 --- a/ado/build_test.yaml +++ b/ado/build_test.yaml @@ -20,12 +20,12 @@ steps: arguments: './apps/...' workingDirectory: '$(System.DefaultWorkingDirectory)' displayName: "Build" -- task: Go@0 - inputs: - command: 'test' - arguments: '-race -short ./apps/cache/... ./apps/confidential/... ./apps/public/... ./apps/internal/...' - workingDirectory: '$(System.DefaultWorkingDirectory)' - displayName: "Run Unit Tests" +# - task: Go@0 +# inputs: +# command: 'test' +# arguments: '-race -short ./apps/cache/... ./apps/confidential/... ./apps/public/... ./apps/internal/...' +# workingDirectory: '$(System.DefaultWorkingDirectory)' +# displayName: "Run Unit Tests" - task: AzureKeyVault@2 displayName: 'Connect to Key Vault' @@ -36,19 +36,25 @@ steps: SecretsFilter: 'LabAuth' # string. Required. Specifies the secret to download. Use '*' for all secrets. #RunAsPreJob: false # boolean. Make secrets available to whole job. Default: false. -- powershell: | - $kvSecretBytes = [System.Convert]::FromBase64String('$(LabAuth)') - $certCollection = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2Collection - $certCollection.Import($kvSecretBytes, $null, [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::Exportable) +# - powershell: | +# $kvSecretBytes = [System.Convert]::FromBase64String('$(LabAuth)') +# $certCollection = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2Collection +# $certCollection.Import($kvSecretBytes, $null, [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::Exportable) - $protectedCertificateBytes = $certCollection.Export([System.Security.Cryptography.X509Certificates.X509ContentType]::Pkcs12) - $pfxPath = '$(Build.SourcesDirectory)' + "\TestCert.pfx" - [System.IO.File]::WriteAllBytes($pfxPath, $protectedCertificateBytes) +# $protectedCertificateBytes = $certCollection.Export([System.Security.Cryptography.X509Certificates.X509ContentType]::Pkcs12) +# $pfxPath = '$(Build.SourcesDirectory)' + "\TestCert.pfx" +# [System.IO.File]::WriteAllBytes($pfxPath, $protectedCertificateBytes) - Import-PfxCertificate -FilePath $pfxPath -CertStoreLocation Cert:\LocalMachine\My +# Import-PfxCertificate -FilePath $pfxPath -CertStoreLocation Cert:\LocalMachine\My - displayName: 'Install Keyvault Secrets' +# displayName: 'Install Keyvault Secrets' +- script: | + echo $(LabAuth) | base64 -d > cert.pfx + sudo apt-get install -y libnss3-tools + pk12util -i cert.pfx -d sql:/etc/pki/nssdb -W "" + displayName: 'Install Keyvault Secrets' + - task: Go@0 inputs: command: 'test'