tech-debt-analytics

How to work with this project locally to make changes to the shipper functionality

Tools for local dev

Tools that will be helpful for local development are:

Installation

To install the recommended tools, follow these steps:

Local dev

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.

Running the Azure Function locally

To run the Azure Function locally, you will need to use local storage:

{
  "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.

Testing the function locally

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"