简体   繁体   English

使用env vars将sbt scala项目发布到Artifactory

[英]Publishing an sbt scala project to Artifactory with the env vars

What I have is this. 我拥有的就是这个。

I have defined in sbt my publish task which publishes to artifactory. 我已经在sbt中定义了我发布到artifactory的发布任务。 Im running it in a Jenkins job as a shell build step. 我在Jenkins工作中运行它作为shell构建步骤。

What I would like to do is to include all the environment information that the Jenkins Artifactory plugin includes when it deploys. 我想要做的是包括Jenkins Artifactory插件在部署时包含的所有环境信息。 I dont know if I should it add it to sbt or if there is some way of configuring the Plugin to use sbt but do the publishing himself. 我不知道我是否应该将它添加到sbt或者是否有某种方法配置插件以使用sbt但是自己发布。

Currently there is no integration for sbt and Artifactory Jenkins plugin, what you can do is to use the Generic deployment feature of the plugin . 目前没有sbtArtifactory Jenkins插件的集成,你可以做的是使用插件Generic部署功能 The plugin will upload as part of the deployment a build info json object with some of the system and environment variables. 该插件将作为部署的一部分上传构建信息json对象,其中包含一些系统和环境变量。

Because the plugin doesn't record the actual build process then all the run time goodies will be missed but you could inject them by using buildInfo.property.* - All properties starting with this prefix will be added to the root properties of the build-info . 因为插件没有记录实际的构建过程,所以所有运行时间的好东西都会被遗漏,但你可以使用buildInfo.property.*注入它们buildInfo.property.* - 所有以这个前缀开头的属性都会被添加到build-info的根属性中 - build-info

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

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