Project Configuration
Information needed:
- URL – https://app.insightfinder.com/api/v1/deploymentEventReceive
- UserName – Your InsightFinder user
- License Key – Your InsightFinder user license key. You can find that in “Account Profile”.
- Project Name – As created above.
- Instance Name – Choose any instance name.
Project Creation
- Create a custom project in InsightFinder. Go to “Settings”->“System Settings”. Click on “Add New Project”. Select “Custom” and then click on “Create Project”.
- Select “Instance Type” as “Private Cloud”, “Data Type” as “Change Events” and “Agent Type” as “Live Streaming”
(See Figure 1) - On the next page, input “Project Name” and “System Name”. These could be the same or different. Leave everything else as default.
(See Figure 2) - You will see a message like below.
(See Figure 3)
Git Event Creation
- Go to your git repository and to “/.github/workflows/” path
- Create a new file and name it with extension as .yml
- Add the below script there and commit the file. Everything highlighted needs to be filled with configurations from the above section.
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push for the main branch
push:
branches: [ main ]
jobs:
# This workflow contains a single job to send the commit message to InsightFinder by Post request call
curl:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
– name: send deployment data
uses: dkershner6/post-api-call-action@v1
with:
# URL to send post request to
url: https://app.insightfinder.com/api/v1/deploymentEventReceive
# JSON string of data to pass into request, including the InsightFinder projectName, userName and the licenseKey
# In the deploymentData, you need to set the InstanceName, the timestamp and the data is auto generated
data: ‘{“projectName”:””,”userName”:””, “licenseKey”:””,”deploymentData”:[{“instanceName”:””, “timestamp”: “${{github.event.repository.pushed_at}}000”, “data”:${{toJSON(github.event.commits[0])}}}]}’
headers: ‘{“agent-type”:”Stream”}’