All Projects → juanpabloaj → phoenix_gitlab_monitor

juanpabloaj / phoenix_gitlab_monitor

Licence: MIT license
Gitlab pipelines monitor created with Elixir/Phoenix

Programming Languages

elixir
2628 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects
Dockerfile
14818 projects
CSS
56736 projects

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].