From 8b35a6f2a81b17cd6e374ded7c61f98e54ec587b Mon Sep 17 00:00:00 2001 From: markoburcul Date: Fri, 11 Oct 2024 15:22:58 +0200 Subject: [PATCH] jenkinsfile: customize gitscm Customize gitscm so the changelog is present when opening the PR. Signed-off-by: markoburcul --- apps/connector/Jenkinsfile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/apps/connector/Jenkinsfile b/apps/connector/Jenkinsfile index 168fb590..a912ab03 100644 --- a/apps/connector/Jenkinsfile +++ b/apps/connector/Jenkinsfile @@ -29,6 +29,24 @@ pipeline { } stages { + stage('Checkout') { + steps { + script { + checkout scmGit( + branches: scm.branches, + extensions: [ + cloneOption(depth: 100, noTags: true, reference: '', shallow: true), + changelogToBranch(changelogBase( + compareRemote: 'origin', + compareTarget: CHANGE_TARGET + )) + ], + userRemoteConfigs: scm.userRemoteConfigs + ) + } + } + } + stage('Check changes') { when { changeset pattern: "apps/connector/**", comparator: "GLOB"