juanpabloaj / phoenix_gitlab_monitor

Gitlab pipelines monitor created with Elixir/Phoenix

Home Page:https://hub.docker.com/r/juanpabloaj/phoenix_gitlab_monitor/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Phoenix Gitlab monitor

gitlab_monitor

Run

With docker

docker run --rm --name  gitlab-monitor -p 0.0.0.0:4000:4000 -d juanpabloaj/phoenix_gitlab_monitor:latest

Build image

docker build -t juanpabloaj/phoenix_gitlab_monitor:latest .

Or to start your Phoenix server:

  • Install dependencies with mix deps.get
  • Install Node.js dependencies with cd assets && npm install
  • Start Phoenix endpoint with mix phx.server

Now you can visit localhost:4000 from your browser.

Send a pipeline hook with curl

curl -H "X-Gitlab-Event: Pipeline Hook" \
    -H "content-type:application/json" -d @test/fixtures/pipeline_success.json \
    "http://localhost:4000/api"

Configure your repository

In your gitlab repository create a webhook: Settings -> Integrations -> Add webhook.

The url field is your host, complete it with

http://yourhost:4000/api

And in the checkbox select the pipeline events.

Learn more about gitlab webhook gitlab documentation

https://gitlab.com/help/user/project/integrations/webhooks

To only accept some branches

http://localhost:4000/api?branches[]=master&branches[]=develop

Learn more about Phoenix Framework

About

Gitlab pipelines monitor created with Elixir/Phoenix

https://hub.docker.com/r/juanpabloaj/phoenix_gitlab_monitor/

License:MIT License


Languages

Language:Elixir 75.3%Language:JavaScript 19.4%Language:HTML 3.3%Language:Dockerfile 1.5%Language:CSS 0.3%