use of com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty in project gitlab-branch-source-plugin by Argelbargel.
the class GitLabSCMItemListener method updateProperties.
private void updateProperties(Job<?, ?> job, String connectionName) {
try {
job.removeProperty(GitLabConnectionProperty.class);
job.addProperty(new GitLabConnectionProperty(connectionName));
} catch (IOException e) {
LOGGER.warning("could not update gitlab-connection-property to job " + job.getName() + ": " + e.getMessage());
}
}
use of com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty in project gitlab-branch-source-plugin by Argelbargel.
the class GitLabSCMItemListener method updateProperties.
private boolean updateProperties(Job<?, ?> job, SCMSourceOwner sourceOwner, String sourceId) {
SCMSource source = sourceOwner.getSCMSource(sourceId);
if (source instanceof GitLabSCMSource) {
String connectionName = ((GitLabSCMSource) source).getSourceSettings().getConnectionName();
GitLabConnectionProperty property = job.getProperty(GitLabConnectionProperty.class);
if (property == null || !connectionName.equals(property.getGitLabConnection())) {
updateProperties(job, connectionName);
return true;
}
}
return false;
}
Aggregations