0

我们有一个 jenkins 在代理服务器后面的本地运行.. 我们希望使用 halyard 将它与大三角帆(在 GKE 中运行)集成,但我们面临连接问题(GCP VPC 和本地部署之间已经存在 VPN) ..我们在igor服务中遇到错误

2020-07-17 14:18:44.441  INFO 1 --- [   scheduling-1] c.n.s.igor.jenkins.client.JenkinsClient  : ---- ERROR https://jenkins_url/api/xml?tree=jobs[name,lastBuild[actions[failCount,skipCount,totalCount,urlName],duration,number,timestamp,result,building,url],jobs[name,lastBuild[actions[failCount,skipCount,totalCount,urlName],duration,number,timestamp,result,building,url],jobs[name,lastBuild[actions[failCount,skipCount,totalCount,urlName],duration,number,timestamp,result,building,url],jobs[name,lastBuild[actions[failCount,skipCount,totalCount,urlName],duration,number,timestamp,result,building,url],jobs[name,lastBuild[actions[failCount,skipCount,totalCount,urlName],duration,number,timestamp,result,building,url],jobs[name,lastBuild[actions[failCount,skipCount,totalCount,urlName],duration,number,timestamp,result,building,url],jobs[name,lastBuild[actions[failCount,skipCount,totalCount,urlName],duration,number,timestamp,result,building,url],jobs[name,lastBuild[actions[failCount,skipCount,totalCount,urlName],duration,number,timestamp,result,building,url],jobs[name,lastBuild[actions[failCount,skipCount,totalCount,urlName],duration,number,timestamp,result,building,url],jobs[name,lastBuild[actions[failCount,skipCount,totalCount,urlName],duration,number,timestamp,result,building,url]]]]]]]]]]]&exclude=/*/*/*/action[not(totalCount)]
2020-07-17 14:18:44.443  INFO 1 --- [   scheduling-1] c.n.s.igor.jenkins.client.JenkinsClient  : javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake
    at java.base/sun.security.ssl.SSLSocketImpl.handleEOF(SSLSocketImpl.java:1321)
    at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1160)
    at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1063)

这是我们的 .hal/config .. 我们只能在 spinnaker 中看到此帐户,但无法列出作业

ci:
    jenkins:
      enabled: true
      masters:
      - name: jenkins-master
        permissions: {}
        address: https://jenkins_url
        username: jenkins_user
        password: api_token
        csrf: true

任何人都可以在此处提供有关如何在 igor 服务 yaml 中传递代理用户名/密码/主机的帮助吗?因为如果我们做一个卷曲,我们会得到正确的响应

curl  -x http://proxy_url:proxy_port --proxy-user user:password https://jenkins_url/api/json --user jenkins_user:api_token

4

1 回答 1

0

Spinnaker 中的自定义配置是使用服务设置或 Spinnaker 配置文件完成的。

您可以使用服务设置将 JVM 环境添加JDK_JAVA_OPTIONS到 Igor,以在 JVM 级别配置代理,以便对 Jenkins 安装的 Igor 请求通过代理。这通常是:

# ~/.hal/default/service-settings/igor.yml

env:
    JDK_JAVA_OPTIONS: -Dhttp.proxyHost=host -Dhttp.proxyPort=port -Dhttp.proxyUser=user -Dhttp.proxyPassword=password

有关更多 JVM Net 属性,请参阅Oracle 文档。您可能还需要

hal deploy apply --service-names=igor

于 2020-07-20T16:23:01.533 回答