Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build and Install instructions #26

Open
211217613 opened this issue Aug 18, 2020 · 4 comments
Open

Build and Install instructions #26

211217613 opened this issue Aug 18, 2020 · 4 comments
Labels
question Further information is requested

Comments

@211217613
Copy link

How is this built and installed?

Why is there no binary in the releases?

@mblaschke
Copy link
Member

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 mblaschke added the question Further information is requested label Aug 23, 2020
@ngeegoh
Copy link

ngeegoh commented Feb 2, 2021

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

@tsaibabu4u
Copy link

@ngeegoh pass -p 8080:8080 to your above command and try to access the with this port
ex : http:https://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

@giuliov
Copy link

giuliov commented Sep 3, 2021

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 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants