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

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

相关推荐
工具罗某人12 小时前
docker快速部署jenkins
java·docker·jenkins
少云清18 小时前
【接口测试】7_接口测试 _Jenkins源码管理问题
运维·jenkins
ELI_He9992 天前
hyperf-ext scout使用
运维·jenkins
oMcLin2 天前
Linux服务器出现“Out of Memory”错误,如何通过调整swap、hugepages等配置来缓解内存压力
linux·服务器·jenkins
咸鱼2.02 天前
【java入门到放弃】Elasticsearch概念
java·elasticsearch·jenkins
虫小宝3 天前
导购APP容器化CI/CD流程:Jenkins在返利系统持续部署中的实践
运维·ci/cd·jenkins
黛玉晴雯子0013 天前
Devops基础之Jenkins持续集成工具(持续更新)
ci/cd·jenkins·devops
少云清4 天前
【接口测试】3_持续集成 _Jenkins
运维·ci/cd·jenkins
weixin_390308465 天前
Jenkins报Host key verification failed错误
python·jenkins
梁萌6 天前
Jenkins流水线配置的两种方式
运维·jenkins·jenkinsfile·流水线配置