cicd#
Sonarcloud Github Action
Sonarcloud Github Action doesn't work by default with Python pytest coverage.xml
file, hereunder a working example.
Azure pipeline Windows agent UnicodeEncodeError
For people who encounter UnicodeEncodeError
when using Windows Azure Pipeline agent, the issue might be here.
As per above link, or this email, the solutions could be:
- You can override just sys.std* to UTF-8 by setting the environment variable
PYTHONIOENCODING=UTF-8
. - You can override all I/O to use UTF-8 by setting
PYTHONUTF8=1
, or by passing the command-line option-X utf8
.
Azure pipeline delete blobs from blob storage
The example given by this post is for Azure Pipeline with the latest Ubuntu agent, for AzCli from local machine, removing the --auth-mode login
part should work.
As it's a Linux pipeline agent, the pipeline task AzureFileCopy can not be used, it's written in Powershell, we should use the AzureCLI task instead.
Azure pipeline conditions
Azure pipeline has two kinds of conditions:
- With keyword
condition
- With jinja like format
${{if elseif else}}
In both syntax, we have use parameters and variables, but there's a big difference between them which makes DevOps frustrated.
Azure Pipeline Checkout Multiple Repositories
This post will talk about some Azure pipeline predefined variables' values in a multiple repositories checkout situation. The official doc is here.