Skip to content
Closed
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
16 changes: 6 additions & 10 deletions eng/pipelines/templates/jobs/live.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,18 +244,14 @@ jobs:
# Will run samples described on a file name [service]-samples.txt within the build directory.
# For example keyvault-samples.txt.
# The file is written by CMake during configuration when building samples.
- task: AzurePowerShell@5
displayName: "Run Samples for : ${{ parameters.ServiceDirectory }}"
- task: AzureCLI@2
displayName: "Run Samples with AzureCli for : ${{ parameters.ServiceDirectory }}"
condition: and(succeeded(), eq(variables['RunSamples'], '1'))
inputs:
azureSubscription: ${{ parameters.CloudConfig.ServiceConnection }}
azurePowerShellVersion: LatestVersion
ScriptType: InlineScript
Inline: |
$account = (Get-AzContext).Account
$env:AZURESUBSCRIPTION_CLIENT_ID = $account.Id
$env:AZURESUBSCRIPTION_TENANT_ID = $account.Tenants

scriptType: 'pscore'
scriptLocation: 'inlineScript'
inlineScript: |
if (Test-Path -Path "${{ parameters.ServiceDirectory }}-samples.txt") {
$samples = Get-Content "${{ parameters.ServiceDirectory }}-samples.txt"
foreach ($sample in $samples) {
Expand All @@ -269,8 +265,8 @@ jobs:
}
}
workingDirectory: build
useGlobalConfig: true
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
${{ insert }}: ${{ parameters.EnvVars }}

- ${{ else }}:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ add_executable (
attestation_collateral.cpp
attestation_collateral.hpp)

CREATE_PER_SERVICE_TARGET_BUILD_FOR_SAMPLE(attestation attestation-${samplename} DISABLE_RUN)
CREATE_PER_SERVICE_TARGET_BUILD_FOR_SAMPLE(attestation attestation-${samplename})

target_link_libraries(attestation-${samplename} PRIVATE azure-security-attestation get-env-helper)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ add_executable (
attestation-${samplename}
${samplename}.cpp)

CREATE_PER_SERVICE_TARGET_BUILD_FOR_SAMPLE(attestation attestation-${samplename} DISABLE_RUN)
CREATE_PER_SERVICE_TARGET_BUILD_FOR_SAMPLE(attestation attestation-${samplename})

target_link_libraries(attestation-${samplename} PRIVATE azure-security-attestation azure-identity get-env-helper)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ add_executable (
cryptohelpers.hpp
)

CREATE_PER_SERVICE_TARGET_BUILD_FOR_SAMPLE(attestation-${samplename} attestation DISABLE_RUN)
CREATE_PER_SERVICE_TARGET_BUILD_FOR_SAMPLE(attestation-${samplename} attestation)

target_link_libraries(attestation-${samplename} PRIVATE azure-security-attestation azure-identity OpenSSL::Crypto get-env-helper)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ add_executable (
cryptohelpers.hpp
)

CREATE_PER_SERVICE_TARGET_BUILD_FOR_SAMPLE(attestation attestation-${samplename} DISABLE_RUN)
CREATE_PER_SERVICE_TARGET_BUILD_FOR_SAMPLE(attestation attestation-${samplename})

target_link_libraries(attestation-${samplename} PRIVATE azure-security-attestation azure-identity get-env-helper)

Expand Down