ngrok实现内网穿透

在使用jenkins进行自动化部署时,需要设置github的webhook钩子来触发构建,由于jenkins运行在自己的电脑上,因此需要通过内网穿透来接受http请求。

Install ngrok via Homebrew with the following command:

Plain 复制代码
brew install ngrok/ngrok/ngrok

Put your app online at ephemeral domain Forwarding to your upstream service. For example, if it is listening on port http://localhost:8080, run:

Plain 复制代码
ngrok http http://localhost:8080

ngrok tunnel --label edge=edghts_token http://localhost:8080

将端口映射到本地8080,此时访问ngrok提供的domain,可以访问到本地的jenkins服务。

ngrok tunnel --label edge=edghts_http://localhost:8080

开启管道后使用github测试。注意在提供给我们的地址后面加上:/github-webhook/

发送成功。

在这里插入图片描述

勾选jenkins项目触发器中的GitHub hook trigger for GITScm polling

提交一次推送,此时自动开始构建。

相关推荐
杨某不才21 分钟前
内网环境下,使用Docker安装Elasticsearch分词器插件
elasticsearch·docker·jenkins
杨某不才2 小时前
内网离线方式Docker安装Elasticsearch
elasticsearch·docker·jenkins
HoneyMoose4 小时前
Jenkins Firefox 登录提示错误
运维·jenkins
Zhu7581 天前
在k8s环境部署elasticsearch+kibana
elasticsearch·kubernetes·jenkins
测试开发Kevin2 天前
使用jenkins中的归档构建产物archiveArtifacts,可以详细查看每次build生成的报告信息
ci/cd·jenkins·devops·持续集成
大傻^3 天前
07_Elasticsearch知识体系之集群架构高可用与快照恢复实战
elasticsearch·架构·jenkins
fangdengfu1233 天前
jenkins使用pipeline实现滚动发布
运维·jenkins
行者-全栈开发3 天前
SpringBoot CI/CD 流水线实战|Jenkins+GitLab CI,从手动到自动化交付
ci/cd·jenkins·springboot·devops·自动化部署·gitlab ci
只看不学3 天前
jenkins+Kubernetes实现流水线CI/CD 接口自动化测试
运维·ci/cd·jenkins