Skip to content

Commit e8f7ff3

Browse files
authored
Update Jenkinsfile
Get the file changed.
1 parent 26f1ff1 commit e8f7ff3

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Jenkinsfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@ String platform='angular-api';
1717
{
1818
checkout scm
1919

20-
def branchCommit = '"' + 'https://gitlab.syncfusion.com/api/v4/projects/' + env.projectId + '/merge_requests/' + env.MergeRequestId + '/changes'
20+
def branchCommit = '"' + 'https://api.gitlab.com/repos/syncfusion-content/angular-api-docs/pulls/' + env.pullRequestId + '/files'
2121
String branchCommitDetails = bat returnStdout: true, script: 'curl -H "Accept: application/vnd.github.v3+json" -u SyncfusionBuild:' + env.GithubBuildAutomation_PrivateToken + " " + branchCommit
2222

23-
def ChangeFiles= branchCommitDetails.split('\n')[2];
24-
ChangeFiles = ChangeFiles.split('"new_path":')
23+
def ChangeFiles= branchCommitDetails.split('"filename": ');
2524

2625
for (int i= 1; i < ChangeFiles.size();i++)
2726
{
@@ -39,7 +38,7 @@ String platform='angular-api';
3938
}
4039

4140
//Checkout the ug_spellchecker from development Source
42-
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']]])
41+
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']]])
4342

4443
}
4544

@@ -84,4 +83,4 @@ if(currentBuild.result != 'FAILURE')
8483
}
8584
step([$class: 'WsCleanup']) }
8685
}
87-
}
86+
}

0 commit comments

Comments
 (0)