RickK零S
FatuityCookie
把如下图所示的ConfigMap修改
把 jenkins/jnlp-slave:3.27-1
替换为 jenkins/inbound-agent:4.10-2
FatuityCookie
把如下图所示的ConfigMap修改
把 jenkins/jnlp-slave:3.27-1
替换为 jenkins/inbound-agent:4.10-2
确认一下你替换的是 jenkins.yaml 还是 jenkins_user.yaml?
johnniang jenkins_user.yaml
FatuityCookie 修改该配置之后需要等待 70s 左右,请参考:https://kubesphere.com.cn/docs/devops-user-guide/how-to-use/jenkins-setting/#%E4%BF%AE%E6%94%B9-configmap
现在运行一个新的流水线试试。
johnniang 不行 我用的是maven 官方容器 server certificate verification failed. CAfile: none CRLfile: none
FatuityCookie 建议提供一下你的 Jenkinsfile。
> pipeline {
>
> agent {
>
> node {
>
> label 'maven'
>
> }
>
> }
>
> stages {
>
> stage('docker login') {
>
> steps {
>
> container('maven') {
>
> sh 'echo $HARBOR_CREDENTIAL_PSW | docker login $REGISTRY -u \\'robot$robot-test\\' --password-stdin'
>
> }
>
> }
>
> }
>
> stage('build & push') {
>
> agent none
>
> steps {
>
> container('maven') {
>
> git(credentialsId: 'test-devops', url: 'https://gitlab.dev/fenghui/kubesphere-demo.git', branch: 'master', changelog: true, poll: false)
>
> sh 'cd kubesphere-demo/src && docker build -t $REGISTRY/$HARBOR_NAMESPACE/$APP_NAME:devops-test .'
>
> sh 'docker push $REGISTRY/$HARBOR_NAMESPACE/$APP_NAME:devops-test'
>
>
>
> }
>
> }
>
> }
>
> }
>
> environment {
>
> REGISTRY = '192.168.111.75:30002'
>
> HARBOR_NAMESPACE = 'ks-devops-harbor'
>
> APP_NAME = 'docker-example-dotnet'
>
> HARBOR_CREDENTIAL = credentials('robot-test')
>
> }
>
> }
把 git step 放到 container 外面试试。
+ git(credentialsId: 'test-devops', url: 'https://gitlab.dev/fenghui/kubesphere-demo.git', branch: 'master', changelog: true, poll: false)
container('maven') {
- git(credentialsId: 'test-devops', url: 'https://gitlab.dev/fenghui/kubesphere-demo.git', branch: 'master', changelog: true, poll: false)
johnniang 依旧是 server certificate verification failed. CAfile: none CRLfile: none
FatuityCookie大佬问题解决了吗?
这样可以了,git clone 用 https://用户:密码@gitlab.com 的形式