2016-11-30 2 views
2

일부 Jenkins 파이프 라인 프로젝트에서 스테이지 뷰가 보이지 않는 문제가 있습니다.Jenkins Pipeline (Workflow) 스테이지 뷰가 사라집니다.

일반적으로 "최근 변경 사항"과 "영구 링크"사이의 무대보기를 볼 수 있습니다. 프로젝트가 실행 된 후 스테이지 뷰가 사라집니다. 프로젝트를 복제하면 뷰는 복제본에 표시되지만 원본 프로젝트에는 표시되지 않습니다.

매주 작업을 대체 할 수 없기 때문에 프로젝트를 복제 할 수있는 방법은 좋지만 좋은 방법은 아닙니다.

누군가가 이전에 그 문제를 보았고 생각을 가지고 있습니까? 어떻게 해결해야합니까?

스테이지보기 DIV는 작업 개요 페이지에 있지만 보이지 않는 :

<div class="cbwf-stage-view"> 
 
    <div class="cbwf-widget cbwf-controller-applied pipeline-staged" objecturl="/user/myname/my-views/view/MaintainedByMe/job/Category/job/ProjectName/" fragcaption="Stage View" cbwf-controller="pipeline-staged"></div> 
 
    <link rel="stylesheet" href="/adjuncts/ee6b655e/org/jenkinsci/pipeline/stageview_adjunct.css" type="text/css"> 
 
    <script src="/adjuncts/ee6b655e/org/jenkinsci/pipeline/stageview_adjunct.js" type="text/javascript"></script> 
 
</div>

내 Jenkinsfile :

def sonarHostUrl = 'http://sonar.host.url:1234' 

node('Build') { 
    echo "enforce a clear workspace:" // because there were some other problems 
    deleteDir() 

    stage('Checkout') { 
     checkoutFromSVN() 
    } 
    stage('Compile') { 
     mvn 'clean compile test-compile' 
    } 
    stage('Unit Tests') { 
     mvn '-B org.jacoco:jacoco-maven-plugin:prepare-agent test' 
     step([$class: 'JUnitResultArchiver', testResults: '**/target/surefire-reports/TEST-*.xml']) 
    } 
    stage('Deploy to Nexus') { 
     mvn 'install deploy -DskipTests' 
     archiveArtifacts artifacts: '**/project-name*.jar', onlyIfSuccessful: false 
    } 
    stage('Local Integration Tests') { 
     mvn '-B org.jacoco:jacoco-maven-plugin:prepare-agent-integration failsafe:integration-test failsafe:verify' 
     step([$class: 'JUnitResultArchiver', testResults: '**/target/failsafe-reports/TEST-*.xml']) 
    } 
    stage('Sonar'){ 
     mvn "org.sonarsource.scanner.maven:sonar-maven-plugin:3.1.1:sonar -Dsonar.host.url=$sonarHostUrl" 
    } 
} 
stage('Deploy to DEV') { 
    build 'JobThatDeploysTheApplicationToDevEnv' 
} 
stage('Functional Tests') { 
    build job: 'JobWithSoapUITests', parameters: [string(name: 'TESTENVIRONMENT', value: 'DEV')] 
} 

def checkoutFromSVN(){ 
    checkout([$class: 'SubversionSCM', 
      excludedCommitMessages: '.*\\[maven-release-plugin\\].*', 
      locations: [[credentialsId: 'a1a2b3c4-1234-ab1d-b56c-0ac4bff23a6c', 
         depthOption: 'infinity', 
         ignoreExternalsOption: true, 
         excludedRegions: 'Jenkinsfile', 
         local: 'project-dir', 
         remote: 'https://url.to/project-dir']], 
      workspaceUpdater: [$class: 'CheckoutUpdater']]) 
} 

def mvn(String args) { 
    def mvnCmd = "${tool name: 'Maven 3.3.9', type: 'hudson.tasks.Maven$MavenInstallation'}/bin/mvn" 

    wrap([$class: 'ConfigFileBuildWrapper', 
      managedFiles: [[ 
        fileId: 'org.jenkinsci.plugins.configfiles.maven.GlobalMavenSettingsConfig1234567', 
        targetLocation: '', // temporary file 
        variable: 'MAVEN_SETTINGS']]]) { 
     bat "${mvnCmd} -s ${env.MAVEN_SETTINGS} ${args} -f project-dir/pom.xml" 
    } 
} 

내 작업 구성 XML로 내 보낸 :

<?xml version='1.0' encoding='UTF-8'?> 
<flow-definition plugin="[email protected]"> 
    <actions/> 
    <description></description> 
    <keepDependencies>false</keepDependencies> 
    <properties> 
    <jenkins.model.BuildDiscarderProperty> 
     <strategy class="hudson.tasks.LogRotator"> 
     <daysToKeep>-1</daysToKeep> 
     <numToKeep>10</numToKeep> 
     <artifactDaysToKeep>-1</artifactDaysToKeep> 
     <artifactNumToKeep>-1</artifactNumToKeep> 
     </strategy> 
    </jenkins.model.BuildDiscarderProperty> 
    <org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty> 
     <triggers> 
     <hudson.triggers.TimerTrigger> 
      <spec>H H * * *</spec> 
     </hudson.triggers.TimerTrigger> 
     <hudson.triggers.SCMTrigger> 
      <spec>H/10 7-18 * * *</spec> 
      <ignorePostCommitHooks>false</ignorePostCommitHooks> 
     </hudson.triggers.SCMTrigger> 
     </triggers> 
    </org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty> 
    </properties> 
    <definition class="org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition" plugin="[email protected]"> 
    <scm class="hudson.scm.SubversionSCM" plugin="[email protected]"> 
     <locations> 
     <hudson.scm.SubversionSCM_-ModuleLocation> 
      <remote>https://url.to/project-dir</remote> 
      <credentialsId>a1a2b3c4-1234-ab1d-b56c-0ac4bff23a6c</credentialsId> 
      <local>.</local> 
      <depthOption>infinity</depthOption> 
      <ignoreExternalsOption>true</ignoreExternalsOption> 
     </hudson.scm.SubversionSCM_-ModuleLocation> 
     </locations> 
     <excludedRegions></excludedRegions> 
     <includedRegions>Jenkinsfile</includedRegions> 
     <excludedUsers></excludedUsers> 
     <excludedRevprop></excludedRevprop> 
     <excludedCommitMessages></excludedCommitMessages> 
     <workspaceUpdater class="hudson.scm.subversion.UpdateWithRevertUpdater"/> 
     <ignoreDirPropChanges>false</ignoreDirPropChanges> 
     <filterChangelog>false</filterChangelog> 
    </scm> 
    <scriptPath>Jenkinsfile</scriptPath> 
    </definition> 
    <triggers/> 
</flow-definition> 
+1

당신은 혼자가 아닙니다. 나는 또한이 문제를 보았다. "도움이 된"것은 모든 오래된 빌드를 제거하는 것이 었습니다 (물론이 플러그인이 있습니다). – jherb

+0

이전 빌드를 삭제하라는 알림 메시지를 보내 주셔서 감사합니다. 그런데 오래된 빌드 (최대 빌드 수 = 1)를 버리고 한 빌드 후에 변경 사항을 취소하도록 프로젝트를 변경하면 플러그인 없이도 잘 작동합니다. 그러나 문제는 남아 있기 때문에 내 역사는 프로젝트에 남아 있습니다. –

답변

0

젠킨스를 다시 시작한 후에 보았습니다. 브라우저에서 디버거를 보면, 존재하지 않는 파일을로드하려고 시도하는 것을 볼 수 있습니다. 이 문제에 대한 버그를 제기했지만 응답이 없습니다. 여전히보고있는 것이면 투표하십시오 : https://issues.jenkins-ci.org/browse/JENKINS-39143

1

누락 된 파일을 Jenkins 서버 작업에 수동으로 복사하여 문제를 해결했습니다.

내 세부 단계 :

  1. 열기 파이프 라인 페이지를 참조하십시오.
  2. Chrome에서 F12 키를 누릅니다.
  3. 콘솔에서 오류를 확인하십시오.

내 오류가 실종됐다 "데브 - 리눅스 UI \ 빌드 \ \ 작업 \ 21 \ 워크 플로우 \ 3.xml"나는 에서 파일 \ 20 \ 워크 플로우 \ 3.xml 빌드를 복사됩니다.

Jenkins 파이프 라인이 충분히 안정되지 않아 파일을 복사하는 동안 파일이 누락 된 것으로 보입니다.

관련 문제