jenkins - 从 Github Action 触发 Jenkins webhook
问题描述
我正在尝试通过运行curl
命令从 Github Action 触发 Jenkins webhook,但出现 SSL 错误。我怎样才能解决这个问题?我尝试--insecure
在命令中添加标志,但仍然不行。这是它的样子
name: jenkins-trigger
on:
repository_dispatch:
types:
- external-ci-success
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- name: Trigger Jenkins
run: |
curl -X POST https://jenkins.jx.<myhost>/ghprbhook/ \
-H "content-type: application/json" \
-H "User-Agent: GitHub-Hookshot/5465ee1" \
-H "X-GitHub-Hook-ID: 232" \
-H "X-GitHub-Hook-Installation-Target-ID: 123213" \
-H "X-GitHub-Hook-Installation-Target-Type: repository" \
--data '{"pull_request":{"sha": "xxx"}}'
错误curl: (60) SSL certificate problem: unable to get local issuer certificate
当我添加--insecure
我得到这个错误:curl: (56) OpenSSL SSL_read: error:14094412:SSL routines:ssl3_read_bytes:sslv3 alert bad certificate, errno 0
解决方案
推荐阅读
- android - Mokito 比较失败
- python - 类不在python中打印更新的参数
- javascript - 更改select2中的字体颜色多个
- java - 有哪些方法可以减少 Spring Boot 应用程序的启动时间?
- react-props - 如何使用功能组件将选定的道具传递给孩子的孩子
- php - 如何获取所有有和没有发表评论的用户
- python - 如何将预测值输出到 Excel 文件中?
- sql - 无法在 PostgreSQL 中添加文本值
- amazon-web-services - 如果总文件大小超过 50GB,则无法正确上传 AWS S3 文件
- swift - GeometryReader 的子视图溢出宽度