From 0fa4a0346a0b83c549871ed2d551b2513e87189b Mon Sep 17 00:00:00 2001 From: Kannan <74587271+kannans24@users.noreply.github.com> Date: Thu, 18 Nov 2021 15:32:14 +0530 Subject: [PATCH] Update Jenkinsfile Get the file changed. --- Jenkinsfile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b15e26d..8b4cb1b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,11 +17,10 @@ String platform='angular-api'; { checkout scm - def branchCommit = '"' + 'https://gitlab.syncfusion.com/api/v4/projects/' + env.projectId + '/merge_requests/' + env.MergeRequestId + '/changes' + def branchCommit = '"' + 'https://api.gitlab.com/repos/syncfusion-content/angular-api-docs/pulls/' + env.pullRequestId + '/files' String branchCommitDetails = bat returnStdout: true, script: 'curl -H "Accept: application/vnd.github.v3+json" -u SyncfusionBuild:' + env.GithubBuildAutomation_PrivateToken + " " + branchCommit - def ChangeFiles= branchCommitDetails.split('\n')[2]; - ChangeFiles = ChangeFiles.split('"new_path":') + def ChangeFiles= branchCommitDetails.split('"filename": '); for (int i= 1; i < ChangeFiles.size();i++) { @@ -39,7 +38,7 @@ String platform='angular-api'; } //Checkout the ug_spellchecker from development Source - checkout([$class: 'GitSCM', branches: [[name: '*/development']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'ug_spellchecker']], submoduleCfg: [], userRemoteConfigs: [[credentialsId: env.githubCredentialId, url: 'https://gitlab.syncfusion.com/content/ug_spellchecker.git']]]) + checkout([$class: 'GitSCM', branches: [[name: '*/development']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'ug_spellchecker']], submoduleCfg: [], userRemoteConfigs: [[credentialsId: env.githubCredentialId, url: 'https://github.com/syncfusion-content/ug_spellchecker.git']]]) } @@ -84,4 +83,4 @@ if(currentBuild.result != 'FAILURE') } step([$class: 'WsCleanup']) } } -} \ No newline at end of file +}