English 中文(简体)
WARN:找不到报告。 工作空间中的标记
原标题:WARN: Unable to locate report-task.txt in the workspace

我的这个阶段总是无法胜任工作,我相信服务器是正确的。

青春期产出

Started by user Jesaya Fernando Napitupulu
Obtained Jenkinsfile from git http://10.8.60.132/jesaya/simple-webapp.git
[Pipeline] Start of Pipeline
[Pipeline] podTemplate
[Pipeline] {
[Pipeline] node
Created Pod: kubernetes jenkins/xjoj-61-kw27q-npzb8-x2q9c
[Normal][jenkins/xjoj-61-kw27q-npzb8-x2q9c][Scheduled] Successfully assigned jenkins/xjoj-61-kw27q-npzb8-x2q9c to microk8s-worker
[Normal][jenkins/xjoj-61-kw27q-npzb8-x2q9c][Pulled] Container image "docker.io/library/openjdk:11.0.14.1-jre" already present on machine
[Normal][jenkins/xjoj-61-kw27q-npzb8-x2q9c][Created] Created container jdk
[Normal][jenkins/xjoj-61-kw27q-npzb8-x2q9c][Started] Started container jdk
[Normal][jenkins/xjoj-61-kw27q-npzb8-x2q9c][Pulled] Container image "jenkins/inbound-agent:4.11-1-jdk11" already present on machine
[Normal][jenkins/xjoj-61-kw27q-npzb8-x2q9c][Created] Created container jnlp
[Normal][jenkins/xjoj-61-kw27q-npzb8-x2q9c][Started] Started container jnlp
Agent xjoj-61-kw27q-npzb8-x2q9c is provisioned from template xjoj_61-kw27q-npzb8
---
apiVersion: "v1"
kind: "Pod"
metadata:
  annotations:
    buildUrl: "http://10.8.60.132:8880/job/ joj/61/"
    runUrl: "job/ joj/61/"
  labels:
    jenkins: "slave"
    jenkins/label-digest: "f4a24cf79b1ba88f85dc929f1365e192a6cbf6ee"
    jenkins/label: "xjoj_61-kw27q"
  name: "xjoj-61-kw27q-npzb8-x2q9c"
  namespace: "jenkins"
spec:
  containers:
  - image: "docker.io/library/openjdk:11.0.14.1-jre"
    name: "jdk"
    tty: true
    volumeMounts:
    - mountPath: "/home/jenkins/agent"
      name: "workspace-volume"
      readOnly: false
  - env:
    - name: "JENKINS_SECRET"
      value: "********"
    - name: "JENKINS_AGENT_NAME"
      value: "xjoj-61-kw27q-npzb8-x2q9c"
    - name: "JENKINS_WEB_SOCKET"
      value: "true"
    - name: "JENKINS_NAME"
      value: "xjoj-61-kw27q-npzb8-x2q9c"
    - name: "JENKINS_AGENT_WORKDIR"
      value: "/home/jenkins/agent"
    - name: "JENKINS_URL"
      value: "http://10.8.60.132:8880/"
    image: "jenkins/inbound-agent:4.11-1-jdk11"
    name: "jnlp"
    resources:
      limits: {}
      requests:
        memory: "256Mi"
        cpu: "100m"
    volumeMounts:
    - mountPath: "/home/jenkins/agent"
      name: "workspace-volume"
      readOnly: false
  nodeSelector:
    kubernetes.io/os: "linux"
  restartPolicy: "Never"
  volumes:
  - emptyDir:
      medium: ""
    name: "workspace-volume"

Running on xjoj-61-kw27q-npzb8-x2q9c in /home/jenkins/agent/workspace/ joj
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Declarative: Checkout SCM)
[Pipeline] checkout
The recommended git tool is: NONE
using credential fcf5851b-d66d-4536-9c17-c298d681ff4b
Cloning the remote Git repository
Cloning repository http://10.8.60.132/jesaya/simple-webapp.git
 > git init /home/jenkins/agent/workspace/ joj # timeout=10
Fetching upstream changes from http://10.8.60.132/jesaya/simple-webapp.git
 > git --version # timeout=10
 > git --version #  git version 2.30.2 
using GIT_ASKPASS to set credentials GitLab - @jesaya
 > git fetch --tags --force --progress -- http://10.8.60.132/jesaya/simple-webapp.git +refs/heads/*:refs/remotes/origin/* # timeout=10
Avoid second fetch
Checking out Revision 7754fca1b5b3bfba7bbb856c933fda5f4704d9ae (refs/remotes/origin/master)
 > git config remote.origin.url http://10.8.60.132/jesaya/simple-webapp.git # timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 7754fca1b5b3bfba7bbb856c933fda5f4704d9ae # timeout=10
Commit message: "Update Jenkinsfile"
 > git rev-list --no-walk 24d08d802f19788bd1273eb9a384d1fad98d8048 # timeout=10
[Pipeline] }
[Pipeline] // stage
[Pipeline] withEnv
[Pipeline] {
[Pipeline] stage
[Pipeline] { (SAST)
[Pipeline] tool
Unpacking https://repo1.maven.org/maven2/org/sonarsource/scanner/cli/sonar-scanner-cli/4.7.0.2747/sonar-scanner-cli-4.7.0.2747.zip to /home/jenkins/agent/tools/hudson.plugins.sonar.SonarRunnerInstallation/sonar-scanner on xjoj-61-kw27q-npzb8-x2q9c
[Pipeline] withEnv
[Pipeline] {
[Pipeline] withSonarQubeEnv
Injecting SonarQube environment variables using the configuration: sonarqube-server
[Pipeline] {
[Pipeline] sh
process apparently never started in /home/jenkins/agent/workspace/ joj@tmp/durable-b5831242
(running Jenkins temporarily with -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.LAUNCH_DIAGNOSTICS=true might make the problem clearer)
[Pipeline] }
WARN: Unable to locate  report-task.txt  in the workspace. Did the SonarScanner succeed?
[Pipeline] // withSonarQubeEnv
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] }
[Pipeline] // podTemplate
[Pipeline] End of Pipeline
ERROR: script returned exit code -2
Finished: FAILURE

• 配置我的月球服务器:

“在座的影像描述”/</a

• 配置我的月球扫描仪工具:

“entertext

pipeline {
    agent {
        kubernetes {
            cloud  kubernetes 
            namespace  jenkins 
            yaml   
            apiVersion: v1
            kind: Pod
            spec: 
              containers:
              - name: jdk
                image: docker.io/library/openjdk:11.0.14.1-jre
                tty: true
               
        }
    }
    stages {
        stage( SAST ) {
            environment {
                SCANNER_HOME = tool  sonar-scanner 
            }
            steps {
                withSonarQubeEnv( sonarqube-server ) {
                    sh" ${SCANNER_HOME}}/bin/sonar-scanner 
                    -Dsonar.projectKey=simple_webapp 
                    -Dsonar.sources=. "
                }
            }
        }
    }
}

相关软件版本:

Sonarqube scanner: 4.7.0 2747
Sonarqube server: 8.9.8.54436
Jenkins: 2.332.2
Kubernetes (MicroK8s): 1.23.5-2+c812603a312d2b
Sonarqube Scanner plugin for Jenkins: 2.14
Kubernetes plugin for Jenkins: 3580.v78271e5631dc

这条管道只安装了一台月球扫描仪,扫描我的节点。 对Jenkins本人来说,他们经营着奴隶结构。

Does anyone understand where this pipeline is going wrong? 青春期产出 does not provide a clear output of the error.

问题回答
steps {
  withSonarQubeEnv( sonarqube-server ) {
      sh" ${SCANNER_HOME**}**}/bin/sonar-scanner 
      -Dsonar.projectKey=simple_webapp 
      -Dsonar.sources=. "
  }
}

SCANNER_HOME





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签