added field import

This commit is contained in:
tomstark99 2024-06-18 17:56:01 +01:00
parent 6f56196df0
commit e722919885

View File

@ -1,6 +1,10 @@
@Library('corda-shared-build-pipeline-steps') @Library('corda-shared-build-pipeline-steps')
import groovy.transform.Field
import static com.r3.build.BuildControl.killAllExistingBuildsForJob import static com.r3.build.BuildControl.killAllExistingBuildsForJob
import static com.r3.build.utils.PipelineUtils import com.r3.build.utils.PipelineUtils
@Field
PipelineUtils pipelineUtils = new PipelineUtils(this)
killAllExistingBuildsForJob(env.JOB_NAME, env.BUILD_NUMBER.toInteger()) killAllExistingBuildsForJob(env.JOB_NAME, env.BUILD_NUMBER.toInteger())
@ -61,9 +65,9 @@ pipeline {
|Scan Succeeded\n |Scan Succeeded\n
|\n |\n
|Please check if there are any new API additions as these will need to be updated before this PR is merged |Please check if there are any new API additions as these will need to be updated before this PR is merged
| ```\n |```\n
| ./gradlew cementApi\n |./gradlew cementApi\n
| ``` |```
""".stripMargin() """.stripMargin()
githubPRComment(commentText, "Scanning for breaking API changes introduced by this PR") githubPRComment(commentText, "Scanning for breaking API changes introduced by this PR")
} }
@ -103,6 +107,6 @@ pipeline {
} }
def githubPRComment(String commentText, String pattern) { def githubPRComment(String commentText, String pattern) {
Long userCommentId = PipelineUtils.getUserCommentIdMatchingPattern(pattern) Long userCommentId = pipelineUtils.getUserCommentIdMatchingPattern(pattern)
userCommentId == null ? PipelineUtils.addGitHubComment(commentText) : PipelineUtils.editGitHubComment(commentText, userCommentId) userCommentId == null ? pipelineUtils.addGitHubComment(commentText) : pipelineUtils.editGitHubComment(commentText, userCommentId)
} }