use of argelbargel.jenkins.plugins.gitlab_branch_source.actions.GitLabSCMHeadMetadataAction in project gitlab-branch-source-plugin by Argelbargel.
the class GitLabSCMRunListener method onCompleted.
@Override
public void onCompleted(Run<?, ?> build, @Nonnull TaskListener listener) {
GitLabSCMHeadMetadataAction metadata = getMetadataAction(build);
GitLabSCMPublishAction publishAction = build.getParent().getAction(GitLabSCMPublishAction.class);
if (metadata != null && publishAction != null) {
publishAction.publishResult(build, metadata);
}
if (build.getResult() == SUCCESS) {
GitLabSCMAcceptMergeRequestAction acceptAction = build.getParent().getAction(GitLabSCMAcceptMergeRequestAction.class);
if (acceptAction != null) {
acceptAction.acceptMergeRequest(build, listener);
}
}
}
use of argelbargel.jenkins.plugins.gitlab_branch_source.actions.GitLabSCMHeadMetadataAction in project gitlab-branch-source-plugin by Argelbargel.
the class GitLabSCMRunListener method onStarted.
@Override
public void onStarted(Run<?, ?> build, TaskListener listener) {
GitLabSCMHeadMetadataAction metadata = getMetadataAction(build);
GitLabSCMPublishAction publishAction = build.getParent().getAction(GitLabSCMPublishAction.class);
if (metadata != null && publishAction != null) {
GitLabSCMCauseAction cause = build.getAction(GitLabSCMCauseAction.class);
String description = (cause != null) ? cause.getDescription() : "";
publishAction.updateBuildDescription(build, description, listener);
publishAction.publishStarted(build, metadata, description);
}
}
Aggregations