You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

启用checkout后Git LFS拉取,Jenkins Pipeline提示“该阶段无步骤”

Jenkins Pipeline Shows "No Steps in This Stage" After Enabling "Pull Git LFS After Checkout"

I've hit a puzzling issue with my Jenkins Pipeline recently. After turning on the "Pull Git LFS After Checkout" feature, my pipeline starts displaying the message "No Steps in This Stage" for the checkout stage—even though the checkout process should be running as expected.

I've tested two different ways to enable this feature, and both lead to the same problem:

  • Configuring it directly through the Jenkins multi-branch project settings
  • Using a dedicated Jenkinsfile_ios (we maintain separate files for iOS and Android builds)

I've spent hours searching through documentation and community threads but haven't found anyone reporting this exact issue. Right now, I suspect it might be a bug with the Git plugin, and I'm preparing to file an issue with Jenkins. But before I do that, I'm hoping to get some guidance or fixes from the community.

Environment Details

  • OS: OS X High Sierra
  • Jenkins Version: 2.89.2
  • Relevant Plugin Versions:
    • git: 3.7.0 (the issue also occurs with version 3.6.4)
    • git-client: 2.7.0
    • git-server: 1.7
    • All Pipeline-related plugins are up to date

Potential Troubleshooting Steps & Workarounds

  1. Explicitly Define the Checkout Step in Your Jenkinsfile
    Instead of relying on the automatic checkout from multi-branch configurations, try adding an explicit checkout step with LFS pull enabled directly in your pipeline code. For example:

    stage('Checkout') {
        steps {
            checkout([
                $class: 'GitSCM',
                branches: [[name: '*/main']],
                userRemoteConfigs: [[url: 'your-repo-url']],
                extensions: [[$class: 'GitLFSPull']]
            ])
        }
    }
    

    This bypasses the automatic checkout setup and lets you control the LFS pull directly in your pipeline logic.

  2. Verify Plugin Compatibility
    Even with recent plugin versions, double-check for known compatibility conflicts between the git plugin, git-client plugin, and your Jenkins version. Older Jenkins releases can sometimes have unexpected clashes with newer plugin updates.

  3. Enable Debug Logging
    Turn on debug logging for the Git and Pipeline plugins in Jenkins (via Manage Jenkins → System Log → Add new log recorder). This will generate detailed output about what's happening during the checkout stage, which might reveal why the steps are being skipped or unrecognized.

  4. Test with a Minimal Pipeline
    Create a simplified Jenkinsfile that only includes the checkout step with LFS enabled, and run it in a fresh freestyle or pipeline project. This helps isolate whether the issue is specific to your multi-branch setup or the structure of your existing Jenkinsfile.

内容的提问来源于stack exchange,提问作者Yen

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 07:24:44