azure-devops-exporter icon indicating copy to clipboard operation
azure-devops-exporter copied to clipboard

Build and Install instructions

Open 211217613 opened this issue 5 years ago • 4 comments

How is this built and installed?

Why is there no binary in the releases?

211217613 avatar Aug 18 '20 15:08 211217613

There is a docker image available: https://hub.docker.com/r/webdevops/azure-devops-exporter/ The image is using googles distroless container and the application is static build.. you could also copy the binary and run it on linux amd64

mblaschke avatar Aug 23 '20 19:08 mblaschke

Hi @mblaschke im having the same question? i am so confused about the installation and configuration of this metric container. It would be great that the readme file could be updated to include some detailed install instruction and how to connect to Prometheus :)

I have built the container with this command in PowerShell docker run -e AZURE_DEVOPS_URL=https://dev.azure.com/company -e AZURE_DEVOPS_ACCESS_TOKEN=pat -e AZURE_DEVOPS_ORGANISATION=company -e AZURE_DEVOPS_APIVERSION=6.0 --rm webdevops/azure-devops-exporter

But it doesn't generate the URL that I can use to connect to Prometheus?? So how can i configure this to connect to Prometheus to scrape metrics?

Thanks

ngeegoh avatar Feb 02 '21 23:02 ngeegoh

@ngeegoh pass -p 8080:8080 to your above command and try to access the with this port ex : http://localhost:8080/metrics it took some time to figure it out

Below is prometheous config

  • job_name: azure-devops-exporter-local honor_timestamps: true scrape_interval: 1m scrape_timeout: 10s metrics_path: /metrics scheme: http static_configs:
    • targets:
      • :8080

tsaibabu4u avatar Feb 04 '21 15:02 tsaibabu4u

This is the Powershell script I use to build locally

$PROJECT_NAME = 'azure-devops-exporter'
$GIT_TAG      = $(git describe --dirty --tags --always)
$GIT_COMMIT   = $(git rev-parse --short HEAD)

if ($PSVersionTable.Platform -eq 'Win32NT') {
  $OUTPUT_EXE="${PROJECT_NAME}.exe"
} else {
  $OUTPUT_EXE="${PROJECT_NAME}"
}

$env:CGO_ENABLED = 0
go build -a -ldflags '-X "main.gitTag=${GIT_TAG}" -X "main.gitCommit=${GIT_COMMIT}" -extldflags "-static"' -o ${PROJECT_NAME}.exe .

giuliov avatar Sep 03 '21 14:09 giuliov