git 构建报错

钉钉插件]当前任务未配置机器人,已跳过

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:

WorkflowScript: 4: Tool type "maven" does not have an install of "maven-3.8.8" configured - did you mean "Maven-3.8.8"? @ line 4, column 15.

maven 'maven-3.8.8'

^

1 error

at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:309)
at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1107)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:624)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:602)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:579)
at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:323)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:293)
at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox$Scope.parse(GroovySandbox.java:163)
at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:190)
at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:175)
at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:635)
at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:581)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:335)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:442)

[钉钉插件]当前任务未配置机器人,已跳过

[withMaven] downstreamPipelineTriggerRunListener - Failure to introspect build steps: java.io.IOException: popeline-job-002 #20 did not yet start

[withMaven] downstreamPipelineTriggerRunListener - Failure to introspect build steps: java.io.IOException: popeline-job-002 #20 did not yet start

Finished: FAILURE

解决

流程线里面的要和jenkins系统管理里面的名字要保存一致

如果提示glone 认证失败

生成ssh没有,添加公钥到gitlab中

这个是Git仓库URL不正确:请确保在Jenkins任务配置的Git源码管理器部分准确设置了Git仓库的URL。检查URL是否存在任何拼写错误或语法错误(例如,是否存在附加的.git扩展名)

[Pipeline] withEnv

[Pipeline] {

[Pipeline] git

The recommended git tool is: NONE

using credential gitlab-root-credential

Fetching changes from the remote Git repository

ERROR: Error fetching remote repo 'origin'

hudson.plugins.git.GitException: Failed to fetch from http://192.168.1.50/root/spring-boot-helloWorld.gitt

at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:999)

at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1241)

at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1305)

at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)

at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.jav

构建和上传镜像找不到docker.sock,添加 -H tcp://127.0.0.1:2376

    stage('Build Docker Image') {
        steps {
            sh 'docker  -H tcp://127.0.0.1:2376  build . -t "${imageUrl}:${imageTag}"'
        
        }           
    }
bash 复制代码
+ docker build . -t harbor.luohw.net/ikubernetes/spring-boot-helloworld:latest
ERROR: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/_ping": dial unix /var/run/docker.sock: connect: permission denied

后来排查是在代理节点运行了,断开即可

相关推荐
Good_Starry12 小时前
Git介绍--github/gitee/gitlab使用
git·gitee·gitlab·github
云端奇趣17 小时前
探索 3 个有趣的 GitHub 学习资源库
经验分享·git·学习·github
F_D_Z21 小时前
【解决办法】git clone报错unable to access ‘xxx‘: SSL certificate problem:
网络·git·网络协议·ssl
等风来不如迎风去1 天前
【git】main|REBASE 2/6
git
艾伦~耶格尔1 天前
IDEA 配置 Git 详解
java·ide·git·后端·intellij-idea
云兮杜康1 天前
IDEA中用过git之后文件名颜色全变红
java·git·intellij-idea
睡不醒的小泽1 天前
git merge 和 git rebase
git
艾伦~耶格尔1 天前
Git 下载及安装超详教程(2024)
git·gitee·码仓
weixin_438197381 天前
linux部署redis,整合ansible和redis
linux·redis·git
安全在心中1 天前
gitee公钥设置、创建库及使用
git·gitee