Closed pellet closed 3 years ago
I figured out how to get around this.. just had to use the jenkins snippet generator to generate some groovy code for checking out the repository, it ended up looking a bit like this:
checkout([ $class: 'GitSCM', branches: [[name: '*/develop']], doGenerateSubmoduleConfigurations: false, extensions: [[ $class: 'SubmoduleOption', depth: 1, disableSubmodules: false, parentCredentials: true, recursiveSubmodules: true, reference: '', shallow: true, trackingSubmodules: false], [$class: 'GitLFSPull']], submoduleCfg: [], userRemoteConfigs: [[ credentialsId: '$creds', url: '$repo']]]);
Pretty Print:
because after a long day of Jenkins, anything helps. @pellet - thank you btw, I had to remove
[$class: 'GitLFSPull']
to make this work but works perfect
checkout([
$class: 'GitSCM',
branches: [[name: '*/develop']],
doGenerateSubmoduleConfigurations: false,
extensions: [
[
$class: 'SubmoduleOption',
depth: 1,
disableSubmodules: false,
parentCredentials: true,
recursiveSubmodules: true,
reference: '',
shallow: true,
trackingSubmodules: false
],
[$class: 'GitLFSPull']
],
submoduleCfg: [],
userRemoteConfigs: [[ credentialsId: '$creds', url: '$repo']]
]);
Where did you place the checkout
method or how did you use it ?
Where did you place the
checkout
method or how did you use it ?
very important question. because I am attempting to use but not even getting any output
Try using the jenkins snippet generator as I had mentioned above, it may help with you debugging the checkout function.
@ni-dschiller @ogtlimited - if been wrecked with work but here is an update, paying it forward @pellet - note: the original solution didn't handle git tags well but I hacked on it a bit and this is running smooth for me, thanks again
Declarative Pipeline Example - https://gist.github.com/medguywalker/8816de7a98ddd437011677c239d65cf7 Scripted Pipeline Example - https://gist.github.com/medguywalker/e2beac3b352b0cd939f7c7b4c95a7b08
I'm trying to execute a script from inside jenkins jack, the script runs ok on jenkins itself, but when I try inside of vscode I get: