shipper
functionalityTools that will be helpful for local development are:
To install the recommended tools, follow these steps:
To make changes to the Azure Function, you can edit the code in the shipper/
directory. Once you’ve made your changes, you can test them locally by running the Azure Function and sending test payloads to it.
To run the Azure Function locally, you will need to use local storage:
azurite-blob --silent
.local.settings.json
file with the following:{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated"
}
}
Once you’ve got storage running, you can use func start
from the shipper/
directory to start the Azure Function.
You will want to generate a test payload to send to the function. You can do this by running the appcat
tool.
appcat analyze shipper --source folder --report appcat-results/reports --serializer json --non-interactive --code --binaries --target AppService.Linux
You can now test the Function by sending cURL commands to it locally. For example:
curl -X PUT -v \
-H "Content-Type: application/json" \
--data appcat-results/reports.json \
"http://localhost:7071/shipper?org=stephlocke&repo=tech-debt-analytics&branch=main&pr=&commit=68af5f6b04dd484a48d9f4814cc5f556743bb34d&committer=stephlocke"