简体   繁体   English

神器中的神器名称

[英]Artifacts name in artifactory

I am new to devops world.我是 devops 世界的新手。 I recently build Jenkins pipeline for maven build and stored my artifacts on the oss Artifactory.我最近为 maven 构建了 Jenkins 管道,并将我的工件存储在 oss Artifactory 上。 I used artifactory plugins on the Jenkins pipeline code.我在 Jenkins 管道代码上使用了人工插件。 All works correctly except, artifacts name & minor version.一切正常,除了工件名称和次要版本。 Artifacts correctly generated on the local jenkins system.在本地 jenkins 系统上正确生成的工件。 However, while uploaded into artifactory, name came with major version number only.但是,在上传到工件时,名称仅带有主要版本号。

Example: Artifacts on the local jenkins示例:本地 jenkins 上的工件

abcd-v5.0.0-alpha.102.a39886b-distribution.zip abcd-v5.0.0-alpha.102.a39886b-distribution.zip

Artifacts on the artifactory:神器上的神器:

abcd-5.0-distribution.zip abcd-5.0-distribution.zip

Basically "v5.0.0-alpha" come from git tags.基本上“v5.0.0-alpha”来自 git 标签。 How should get the same on the artifactory?神器上应该怎么弄一样?

Jenkins code used:使用的 Jenkins 代码:

def server = Artifactory.server "artifactory"
          def buildInfo = Artifactory.newBuildInfo()
          def rtMaven = Artifactory.newMavenBuild()
          rtMaven.tool = '3.6.3'
          rtMaven.deployer server: server, releaseRepo: 'libs-release-local', snapshotRepo: 'libs-snapshot-local'
          buildInfo = rtMaven.run pom: 'abc/pom.xml', goals: "clean install -Passemble -Dlicense.skip=true"
          buildInfo.env.capture = true
          buildInfo.name = 'build'
          server.publishBuildInfo buildInfo ```




Do let us know whether is it feasible for you to pass the details in the pom.xml file?请让我们知道您是否可以通过 pom.xml 文件中的详细信息?

If yes, then for example I have configured the pom.xml file as below:如果是,那么例如我配置了 pom.xml 文件如下:

<groupId>org.jfrog.test</groupId>
<artifactId>multi</artifactId>
<version>3.7-SNAPSHOT</version>

and the artifacts getting deployed with repository-path " /org/jfrog/test/multi1/3.7-SNAPSHOT/multi1-3.7-20210805.113313-6-sources.jar " as shown in the screenshot here以及使用存储库路径“ /org/jfrog/test/multi1/3.7-SNAPSHOT/multi1-3.7-20210805.113313-6-sources.jar ”部署的工件,如此处的屏幕截图所示

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM