每当推送到GitLab时,我都会尝试触发jenkins构建 我指的是https://github.com/jenkinsci/gitlab-plugin。
当我测试webhook的连接时,它会显示execution expired
。
我正在使用:
答案 0 :(得分:0)
确切error message,点击" Test setting
"来自GitLab:
We tried to send a request to the provided URL but an error occurred: execution expired
如issue 128中所述:
这看起来和听起来像配置或网络错误 也许你的机器在webhook地址(防火墙等)上不公开。
例如,在Digital Ocean服务器上,您需要打开防火墙中的端口(在git-auto-deploy.conf.json
中提到):
sudo ufw allow 8866/tcp
如jenkinsci/gitlab-plugin issue 391中所述,仔细检查您在Gitlab信息(连接名称,主机网址,凭据)方面放入Manage Jenkins > Configure
的内容。
见GitLab Integration Jenkins: Configure the Jenkins server
答案 1 :(得分:0)
这意味着jenkins服务器与gitlab或github服务器之间存在问题。
就像我所做的一样:
我已经设置了本地IP:端口/项目/ jenkins_project_name
http://192.168.1.21:8080/project/jenkins_project_name
并在gitlab Webhook中设置上述URL,它不起作用-对吗?
因为它是私有IP,不可路由。
因此,后来我意识到并设置了公共IP,然后开始工作了。
http://public_IP:8080/project/jenkins_project_name
注意:要路由公用IP,您应在路由器中公开端口[例如, 8080适合我或任何想要的东西]
希望这行得通。