Hello all, I am building a NSO (network services orchestrator) automation and would like to ask the best approach regarding reload packages using github as SCM.
Currently every time that I run the pipeline it will clone all packages for a tmp directory, destroy the entire NSO package folder, create a new folder and copy all packages back from the tmp folder inside NSO package folder. What's the best way to clone only the packages that was changed or don't clone any package at all in case there is no changes to minimise the clone time because in the future I will have more packages and it will take a long time. Structure of packages folder inside NSO Server: ~/Box Sync/GitBroadsoft/inf-nso-services/packages master ll total 0 drwxr-xr-x 13 rengonca staff 416B 12 Jun 10:47 alu-sr drwxr-xr-x 10 rengonca staff 320B 5 Jun 18:09 cisco-acl drwxr-xr-x 8 rengonca staff 256B 5 Jun 18:09 cisco-initialize-acl drwxr-xr-x 7 rengonca staff 224B 5 Jun 18:09 cisco-initialize-authentication drwxr-xr-x 13 rengonca staff 416B 5 Jun 18:09 cisco-ios drwxr-xr-x 12 rengonca staff 384B 5 Jun 18:09 cisco-iosxr drwxr-xr-x 9 rengonca staff 288B 5 Jun 18:09 cisco-vrf-bgp drwxr-xr-x 13 rengonca staff 416B 12 Jun 10:47 f5-bigip drwxr-xr-x 10 rengonca staff 320B 5 Jun 18:09 juniper-acl drwxr-xr-x 7 rengonca staff 224B 5 Jun 18:09 juniper-initialize-acl drwxr-xr-x 10 rengonca staff 320B 5 Jun 18:09 juniper-junos drwxr-xr-x 7 rengonca staff 224B 12 Jun 10:47 snmpT1 ~/Box Sync/GitBroadsoft/inf-nso-services/packages master pipeline { agent { node { label 'nso01' } } stages { stage('Start maintenance') { steps { sh 'echo "Starting..."' } } stage('NSO - Git Clone') { steps { checkout scm } } stage('NSO - delete current packages') { steps { sh 'rm -rf ~/ncs-run/packages/* ; mkdir -p ~/ncs-run/packages/' } } stage('NSO - Move packages') { steps { sh 'cp -a ./packages/* ~/ncs-run/packages/' } } stage('NSO - Stop') { steps { catchError { sh 'source ~/nso-4.7/ncsrc; cd ~/ncs-run; ncs --stop' } } } stage('NSO - Start and Reload packages') { steps { withEnv (['JENKINS_NODE_COOKIE=do_not_kill']) { sh 'source ~/nso-4.7/ncsrc; cd ~/ncs-run; ncs --with-package-reload-force' } } } -- This email is intended solely for the person or entity to which it is addressed and may contain confidential and/or privileged information. If you are not the intended recipient and have received this email in error, please notify BroadSoft, Inc. immediately by replying to this message, and destroy all copies of this message, along with any attachment, prior to reading, distributing or copying it. Ce message confidentiel et les éventuelles pièces jointes sont à l’usage exclusif de son ou de sa destinataire. Il est interdit, pour toute autre personne, de le distribuer, d’en dévoiler le contenu ou de le reproduire. Si vous avez reçu cette communication par erreur, veuillez en informer immédiatement l’expéditeur par courrier électronique et détruire l’original de ce message ainsi que toute copie. -- 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/9979aa2b-6b2e-4bb0-8d05-0979799897e3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.