All Projects → stakater → Gitwebhookproxy

stakater / Gitwebhookproxy

Licence: apache-2.0
A proxy to let webhooks reach running services behind a firewall – [✩Star] if you're using it!

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Gitwebhookproxy

Hwamei
企业微信webhook,企业微信群机器人webhook,支持Github、Gitlab、Sentry等Webhook
Stars: ✭ 142 (+15.45%)
Mutual labels:  webhook, jenkins, gitlab
pm2-githook
receive webhook from github/gitlab and ask pm2 to reload the application for you
Stars: ✭ 39 (-68.29%)
Mutual labels:  jenkins, gitlab, webhook
Skyhook
Parses webhooks and forwards them in the proper format to Discord.
Stars: ✭ 263 (+113.82%)
Mutual labels:  webhook, jenkins, gitlab
Mr2
Mr.2 can help you expose local server to external network. Support both TCP/UDP, of course support HTTP. Zero-Configuration.
Stars: ✭ 1,102 (+795.93%)
Mutual labels:  proxy, firewall
Arbitrium Rat
Arbitrium is a cross-platform, fully undetectable remote access trojan, to control Android, Windows and Linux and doesn't require any firewall exceptions or port forwarding rules
Stars: ✭ 938 (+662.6%)
Mutual labels:  proxy, firewall
Linux Tutorial
《Java 程序员眼中的 Linux》
Stars: ✭ 7,757 (+6206.5%)
Mutual labels:  jenkins, gitlab
Awesome Anti Censorship
curated list of open-source anti-censorship tools
Stars: ✭ 521 (+323.58%)
Mutual labels:  proxy, firewall
Deploy
Deploy Development Builds of Open Cluster Management (OCM) on RedHat Openshift Container Platform
Stars: ✭ 78 (-36.59%)
Mutual labels:  k8s, openshift
Kubernetes Learning
《从Docker到Kubernetes进阶课程》在线文档
Stars: ✭ 1,128 (+817.07%)
Mutual labels:  jenkins, gitlab
Tor Android
Tor binary and library for Android
Stars: ✭ 90 (-26.83%)
Mutual labels:  proxy, firewall
Core
OPNsense GUI, API and systems backend
Stars: ✭ 1,827 (+1385.37%)
Mutual labels:  proxy, firewall
Opscloud
运维管理平台(阿里云),自动同步阿里云配置信息,堡垒机(容器),批量运维,Kubernetes,Zabbix管理等功能
Stars: ✭ 788 (+540.65%)
Mutual labels:  jenkins, gitlab
Op Note
当我有服务器时我做了什么 · 个人服务器运维指南
Stars: ✭ 733 (+495.93%)
Mutual labels:  gitlab, k8s
Pega Helm Charts
Orchestrate a Pega Platform™ deployment by using Docker, Kubernetes, and Helm to take advantage of Pega Platform Cloud Choice flexibility.
Stars: ✭ 58 (-52.85%)
Mutual labels:  k8s, openshift
Kubesphere
The container platform tailored for Kubernetes multi-cloud, datacenter, and edge management ⎈ 🖥 ☁️
Stars: ✭ 8,315 (+6660.16%)
Mutual labels:  jenkins, k8s
Gitlab Branch Source Plugin
Jenkins-Plugin to create a multi-branch-project from gitlab
Stars: ✭ 76 (-38.21%)
Mutual labels:  jenkins, gitlab
Quiz
Example real time quiz application with .NET Core, React, DDD, Event Sourcing, Docker and built-in infrastructure for CI/CD with k8s, jenkins and helm
Stars: ✭ 100 (-18.7%)
Mutual labels:  jenkins, k8s
Kubernetes Pfsense Controller
Integrate Kubernetes and pfSense
Stars: ✭ 100 (-18.7%)
Mutual labels:  firewall, k8s
Fabric8 Platform
Generates the distribution of the fabric8 microservices platform
Stars: ✭ 105 (-14.63%)
Mutual labels:  jenkins, openshift
Lanproxy
lanproxy是一个将局域网个人电脑、服务器代理到公网的内网穿透工具,支持tcp流量转发,可支持任何tcp上层协议(访问内网网站、本地支付接口调试、ssh访问、远程桌面、http代理、https代理、socks5代理...)。技术交流QQ群 678776401
Stars: ✭ 4,784 (+3789.43%)
Mutual labels:  proxy, firewall

GitWebhookProxy

Go Report Card Go Doc Release GitHub tag Docker Pulls Docker Stars MicroBadger Size MicroBadger Layers license

A proxy to let webhooks to reach a Jenkins instance running behind a firewall

PROBLEM

Jenkins is awesome and matchless tool for both CI & CD; but unfortunately its a gold mine if left in wild with wide open access; so, we always want to put it behind a firewall. But when we put it behind firewall then webhooks don't work anymore and no one wants the pull based polling but rather prefer the build to start as soon as there is a commit!

SOLUTION

This little proxy makes webhooks start working again!

Supported Providers

Currently we support the following git providers out of the box:

  • Github
  • Gitlab

Configuration

GitWebhookProxy can be configured by providing the following arguments either via command line or via environment variables:

Parameter Description Default Example
listenAddress Address on which the proxy listens. :8080 127.0.0.1:80
upstreamURL URL to which the proxy requests will be forwarded (required) https://someci-instance-url.com/webhook/
secret Secret of the Webhook API. If not set validation is not made. iamasecret
provider Git Provider which generates the Webhook github github or gitlab
allowedPaths Comma-Separated String List of allowed paths on the proxy /project or github-webhook/,project/
ignoredUsers Comma-Separated String List of users to ignore while proxying Webhook request someuser
allowedUsers Comma-Separated String List of users to allow while proxying Webhook request someuser

DEPLOYING TO KUBERNETES

The GitWebhookProxy can be deployed with vanilla manifests or Helm Charts.

Vanilla Manifests

For Vanilla manifests, you can either first clone the respository or download the deployments/kubernetes/gitwebhookproxy.yaml file only.

Configuring

Below mentioned attributes in gitwebhookproxy.yaml have been hard coded to run in our cluster. Please make sure to update values of these according to your own configuration.

  1. Change below mentioned attribute's values in Ingress in gitwebhookproxy.yaml
 rules:
  - host: gitwebhookproxy.example.com
  tls:
  - hosts:
    - gitwebhookproxy.example.com
  1. Change below mentioned attribute's values in Secret in gitwebhookproxy.yaml
data:
  secret: example
  1. Change below mentioned attribute's values in ConfigMap in gitwebhookproxy.yaml
data:
  provider: github
  upstreamURL: https://jenkins.example.com
  allowedPaths: /github-webhook,/project
  ignoredUsers: stakater-user

Deploying

Then you can deploy GitwebhookProxy by running the following kubectl commands:

kubectl apply -f gitwebhookproxy.yaml -n <namespace>

Note: Make sure to update the port in deployment.yaml as well as service.yaml if you change the default listenAddress port.

Helm Charts

Alternatively if you have configured helm on your cluster, you can add gitwebhookproxy to helm from our public chart repository and deploy it via helm using below mentioned commands

  1. Add the chart repo:

    i. helm repo add stakater https://stakater.github.io/stakater-charts/

    ii. helm repo update

  2. Set configuration as discussed in the Configuring section

    i. helm fetch --untar stakater/gitwebhookproxy

    ii. Open and edit gitwebhookproxy/values.yaml in a text editor and update the values mentioned in Configuring section.

  3. Install the chart

    • helm install stakater/gitwebhookproxy -f gitwebhookproxy/values.yaml -n gitwebhookproxy

Running outside Kubernetes

Run with Docker

To run the docker container outside of Kubernetes, you can pass the configuration as the Container Entrypoint arguments. The docker image is available on docker hub. Example below:

docker run stakater/gitwebhookproxy:v0.2.63 -listen :8080 -upstreamURL google.com -provider github -secret "test"

Run with Docker compose

For docker compose, the syntax is a bit different

jenkinswebhookproxy: 
    image: 'stakater/gitwebhookproxy:latest'
    command: ["-listen", ":8080", "-secret", "test", "-upstreamURL", "jenkins.example.com, "-allowedPaths", "/github-webhook,/ghprbhook"]
    restart: on-failure

Troubleshooting

405 Method Not Allowed with Jenkins & github plugin

If you get the following error when setting up webhooks for your jobs in Jenkins, make sure you have the trailing / in the webhook configured in Jenkins.

Error Redirecting '/github-webhook' to upstream', Upstream Redirect Status: 405 Method Not Allowed

Help

Got a question? File a GitHub issue, or send us an email.

Talk to us on Slack

Join and talk to us on the #tools-gwp channel for discussing about GitWebhookProxy

Join Slack Chat

Contributing

Bug Reports & Feature Requests

Please use the issue tracker to report any bugs or file feature requests.

Developing

PRs are welcome. In general, we follow the "fork-and-pull" Git workflow.

  1. Fork the repo on GitHub
  2. Clone the project to your own machine
  3. Commit changes to your own branch
  4. Push your work back up to your fork
  5. Submit a Pull request so that we can review your changes

NOTE: Be sure to merge the latest from "upstream" before making a pull request!

Changelog

View our closed Pull Requests.

License

Apache2 © Stakater

About

GitWebhookProxy is maintained by Stakater. Like it? Please let us know at [email protected]

See our other projects or contact us in case of professional services and queries on [email protected]

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].