Skip to content
Snippets Groups Projects
Commit cabe23bc authored by Antoine Lambert's avatar Antoine Lambert
Browse files

templates/swh-pipeline: Fetch master branch only when cloning repo

The jobs associated to this pipeline are only triggered when commiting
on the master branch or when pushing a phabricator diff based on a
commit of the master branch.

So in order to save time, data transfer and avoid possible clone issues,
fetch only the master branch when cloning as all remote branches are
fetched by default.

Related to T4641
parent 29744ebc
No related branches found
No related tags found
No related merge requests found
......@@ -30,11 +30,12 @@ pipeline {
$class: 'GitSCM',
branches: [[name: "${params.REVISION}"]],
doGenerateSubmoduleConfigurations: false,
extensions: [],
extensions: [[$class: 'CloneOption', honorRefspec: true]],
gitTool: 'Default',
submoduleCfg: [],
userRemoteConfigs: [
[url: 'https://forge.softwareheritage.org/source/{{repo_name}}.git'],
[url: 'https://forge.softwareheritage.org/source/{{repo_name}}.git',
refspec: '+refs/heads/master:refs/remotes/origin/master'],
],
browser: [$class: 'Phabricator', repoUrl: 'https://forge.softwareheritage.org', repo: '{{name}}']
])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment