You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have noticed that the Artifactory Maven plugin is not deploying VCS information with the BuildInfo. Whatever I set in vcsRevision and vcsVersion is ignored.
According to the documentation following fields should be included in the build info:
private void resolveProperties(ArtifactoryClientConfiguration clientConf) {
artifactoryPluginVersion(clientConf.info.getArtifactoryPluginVersion());
artifactoryPrincipal(clientConf.publisher.getName());
parentNumber(clientConf.info.getParentBuildNumber());
parentName(clientConf.info.getParentBuildName());
vcsRevision(clientConf.info.getVcsRevision()); // This is incorrect and not working
principal(clientConf.info.getPrincipal());
url(clientConf.info.getBuildUrl());
}
Describe the bug
I have noticed that the Artifactory Maven plugin is not deploying VCS information with the BuildInfo. Whatever I set in vcsRevision and vcsVersion is ignored.
According to the documentation following fields should be included in the build info:
I did some digging in the code and to me it looks like the problem is in BuildInfoBuilder class. The build() function in ignores
properties and only does this:
build.setVcs(vcs);
I think that there should be some extra logic to check if vcs is empty and and vcsRevision not.
The documentation says it should use this field and I'm sure that in previous versions of the plugin it did:
https://www.jfrog.com/confluence/display/JFROG/Maven+Artifactory+Plugin
To Reproduce
It can be on test level. Modify the:
https://github.com/jfrog/artifactory-maven-plugin/blob/master/src/test/resources/unit-tests-pom/pom.xml
and add:
In the unit test: https://github.com/jfrog/artifactory-maven-plugin/blob/master/src/test/java/org/jfrog/buildinfo/BuildInfoRecorderTest.java check if
vcs
field is populated.Expected behavior
BuildInfo published to the Artifactory contains VCS information.
Versions
The text was updated successfully, but these errors were encountered: