Hello,

I have question regarding SharedLibrary, I put some powershell script 
(/scripts/…) in same repository and I want to use them during builds.

 

Atm, I use it like this

 

@Library('JenkinsSharedLibrary') _

 

pipeline {

    agent { node { label 'azure' } }

 

    options {

        skipDefaultCheckout()

    }

    

    stages {

        stage('Clean Workspace') {

            steps {               

                deleteDir()

                checkout scm

            }

        }

 

        stage(....)

}

 

Thanks to that in workspace I get all scripts from repo, but jenkins job is 
cloning repo two times

   - First, to get Job from Repository (Pipeline from SCM) 
   - Second, in checkout scm 

 

In logs

 

Get job:

 

Obtained jobs/Cloud_Deployment/cloud_azure_polling.groovy from git 
http://git.***.jenkinssharedlibrary.git

Loading library JenkinsSharedLibrary@master

 

Clone Lib:

Cloning the remote Git repository

Cloning repository http://git.***./jenkinssharedlibrary.git

 

Is it possible to made it in one step?

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/9d0a6fd4-bd4b-44e5-b774-9a043fbc05fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to