https://jenkins.io/blog/2017/10/02/pipeline-templates-with-shared-libraries/
describes
how a Pipeline shared library can extract common statements from a
declarative Pipeline to simplify the declarative Pipeline.

There isn't a way to perform a git LFS fetch or checkout with the "git"
step.  The "git" step is a simplified form of the "checkout" step.  It
intentionally does not include all the options and capabilities of the
"checkout" step.

Mark Waite

On Fri, Aug 17, 2018 at 7:42 AM Leandro Cofre <leoco...@gmail.com> wrote:

> Hi,
>
> I have a pipeline where I checkout two repositories, one with source code
> and the other with binaries that are part of the release. The latter uses
> the LFS git plugin.
>
> My question is if there's a simpler way to declare I want to clone a git
> LFS repo other than the one I write below. The other repo description looks
> much simpler.
>
> I also noticed the configuration for the LFS repo left the HEAD detached.
>
> Thanks very much for your help.
>
>
> pipeline {
>     agent any
>
>     stages {
>         stage('Checkout') {
>             steps {
>                 dir('content') {
>                     checkout scm: [
>                         $class: 'GitSCM',
>                         branches: [[name: 'refs/heads/master']],
>                         extensions: [[$class: 'GitLFSPull']],
>                         userRemoteConfigs: [[
>                             credentialsId: 'TheID',
>                             url: '
> https://bitbucket.org/COMPANY/content.git'
>                         ]]
>                     ]
>                 }
>
>
>                 dir('source') {
>                     git branch: 'master',
>                         url: 'https://bitbucket.org/COMPANY/source.git',
>                         credentialsId: 'TheID'
>                 }
>             }
>         }
>         stage('Build') {
>             steps {
>                 echo 'Building....'
>             }
>         }
>         stage('Deploy') {
>             steps {
>                 echo 'Deploying....'
>             }
>         }
>     }
> }
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/ec91fa16-de19-4b1b-aa11-0b3559418afb%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/ec91fa16-de19-4b1b-aa11-0b3559418afb%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtFz0wZN4tjSfcBPRJoxTRa-AwCGeTnzNM2AaLTQWi723Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to