diff --git a/azure/components/set-facts.yml b/azure/components/set-facts.yml index af13de45f..b85aec827 100644 --- a/azure/components/set-facts.yml +++ b/azure/components/set-facts.yml @@ -19,9 +19,9 @@ parameters: steps: - bash: | set -euo pipefail - echo "!!! If you get an error here, it is because '${{ parameters.service_name }}' is not the source alias name of the artifact" + echo "!!! Using ls -t will set the latest file for the artifact. If you get an error here, it is because '${{ parameters.service_name }}' is not the source alias name of the artifact" ls -R $(Pipeline.Workspace) - export SERVICE_ARTIFACT_NAME=`ls $(Pipeline.Workspace)/s/${{ parameters.service_name }}` + export SERVICE_ARTIFACT_NAME=`ls -t $(Pipeline.Workspace)/s/${{ parameters.service_name }}` echo "##vso[task.setvariable variable=SERVICE_ARTIFACT_NAME]$SERVICE_ARTIFACT_NAME" echo "Set Artifact Name of: $SERVICE_ARTIFACT_NAME" displayName: 'Set SERVICE_ARTIFACT_NAME'