Skip to content

Commit

Permalink
debug AzCLI login
Browse files Browse the repository at this point in the history
  • Loading branch information
wonwuakpa-msft committed Nov 7, 2024
1 parent b70ee6b commit 59e9fd3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions release-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2174,23 +2174,22 @@ stages:
scriptLocation: inlineScript
inlineScript: |
pip install azure-storage-blob
AZCOPY_AUTO_LOGIN_TYPE=AzCLI
executable_name=azcopy
export AZCOPY_AUTO_LOGIN_TYPE=AzCLI
#Extract the version number
azcopy_version=$(azcopy --version | awk '{print $3}' | head -n 1)
echo "azcopy version: $azcopy_version"
#Upload to release version blob file
azcopy --version | awk '{print $3}' | head -n 1 | azcopy copy https://azcopyvnextrelease.blob.core.windows.net/releasemetadata/latest_version.txt \
--from-to=PipeBlob --log-level=INFO --output-type=json > azcopy_output.json
upload_url="https://azcopyvnextrelease.blob.core.windows.net/releasemetadata/latest_version.txt"
echo "$azcopy_version" | azcopy copy "$upload_url" --from-to=PipeBlob --log-level=DEBUG --output-type=text > azcopy_output.txt
# Handle errors
if [ $? -eq 0 ]; then
echo "Release version file successfully uploaded."
else
echo "File failed to upload: "
cat azcopy_output.json
cat azcopy_output.txt
exit 1
fi
workingDirectory: $(root_dir)
Expand Down

0 comments on commit 59e9fd3

Please sign in to comment.