jenkinsfile: customize gitscm

Customize gitscm so the changelog is present when opening the PR.

Signed-off-by: markoburcul <marko@status.im>
This commit is contained in:
markoburcul 2024-10-11 15:22:58 +02:00
parent d24fedefb2
commit 8b35a6f2a8
No known key found for this signature in database
GPG Key ID: FC4CD2F9A040D54A
1 changed files with 18 additions and 0 deletions

View File

@ -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"