微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

柯南无法从新的构建服务器中找到软件包ID

如何解决柯南无法从新的构建服务器中找到软件包ID

我和柯南一起从人工制品中消费了一个项目。

该工件是在我的Jenkins管道中构建的,并已上传到该工件。

我有2台构建服务器,我想从旧服务器迁移到新服务器。

当我使用新构建服务器中构建的工件时,出现以下错误

"conan install Scripts\NotCppConanFile.py -s os=Windows -s os_build=Windows -s arch=%ARCH% -s arch_build=%ARCH% -s build_type=%CONfig% -s compiler="Visual Studio" -s compiler.version=14 -s compiler.runtime=%COMPILER_RUNTIME%
@IF NOT %ERRORLEVEL% == 0 EXIT /b %ERRORLEVEL%"

这是我从BAT文件运行的命令:

The Conan upload command: "conan upload ext_TPC/%PACKAGE_VERSION% --all -r=extTPC-conan --confirm"
"[2020-10-05T23:37:35.088Z] c:\jenkins\workspace\aster_CPM-TPC-master-full_master>conan export-pkg ./Scripts prod/master -f  

[2020-10-05T23:37:36.064Z] Auto detecting your dev setup to initialize the default profile (c:\Jenkins\workspace\aster_CPM-TPC-master-full_master\.conan\profiles\default)

[2020-10-05T23:37:36.335Z] Found Visual Studio 15

[2020-10-05T23:37:36.335Z] Default settings

[2020-10-05T23:37:36.335Z]  os=Windows

[2020-10-05T23:37:36.335Z]  os_build=Windows

[2020-10-05T23:37:36.335Z]  arch=x86_64

[2020-10-05T23:37:36.335Z]  arch_build=x86_64

[2020-10-05T23:37:36.335Z]  compiler=Visual Studio

[2020-10-05T23:37:36.335Z]  compiler.version=15

[2020-10-05T23:37:36.335Z]  build_type=Release

[2020-10-05T23:37:36.335Z] *** You can change them in c:\Jenkins\workspace\aster_CPM-TPC-master-full_master\.conan\profiles\default ***

[2020-10-05T23:37:36.335Z] *** Or override with -s compiler='other' -s ...s***

[2020-10-05T23:37:36.335Z] 

[2020-10-05T23:37:36.335Z] 

[2020-10-05T23:37:36.335Z] Exporting package recipe

[2020-10-05T23:37:36.335Z] ext_TPC/11.8.128@prod/master: A new conanfile.py version was exported

[2020-10-05T23:37:36.335Z] ext_TPC/11.8.128@prod/master: Folder: c:\Jenkins\workspace\aster_CPM-TPC-master-full_master\.conan\data\ext_TPC\11.8.128\prod\master\export

[2020-10-05T23:37:36.336Z] ext_TPC/11.8.128@prod/master: Exported revision: b4153452b7268b78be94d8acdfd58e5a

[2020-10-05T23:37:36.697Z] ext_TPC/11.8.128@prod/master: Forced build from source

[2020-10-05T23:37:36.697Z] Packaging to 6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7

[2020-10-05T23:37:36.697Z] ext_TPC/11.8.128@prod/master: Generating the package

[2020-10-05T23:37:36.697Z] ext_TPC/11.8.128@prod/master: Package folder c:\Jenkins\workspace\aster_CPM-TPC-master-full_master\.conan\data\ext_TPC\11.8.128\prod\master\package\6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7

[2020-10-05T23:37:36.697Z] ext_TPC/11.8.128@prod/master: Calling package()

[2020-10-05T23:37:36.697Z] ext_TPC/11.8.128@prod/master package(): Packaged 1 '.txt' file: 3rdPartyLicense.txt

[2020-10-05T23:37:36.697Z] ext_TPC/11.8.128@prod/master package(): Packaged 9 '.dll' files

[2020-10-05T23:37:36.697Z] ext_TPC/11.8.128@prod/master package(): Packaged 1 '.exe' file: CyberArk.TPC.exe

[2020-10-05T23:37:36.697Z] ext_TPC/11.8.128@prod/master package(): Packaged 1 '.config' file: CyberArk.TPC.exe.config

[2020-10-05T23:37:36.697Z] ext_TPC/11.8.128@prod/master: Package '6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7' created

[2020-10-05T23:37:36.697Z] ext_TPC/11.8.128@prod/master: Created package revision d5a1027449330f6e032dadf415327f0c

[2020-10-05T23:37:36.697Z] [HOOK - attribute_checker.py] pre_export(): WARN: Conanfile doesn't have 'url'. It is recommended to add it as attribute

[2020-10-05T23:37:36.697Z] [HOOK - attribute_checker.py] pre_export(): WARN: Conanfile doesn't have 'license'. It is recommended to add it as attribute

[2020-10-05T23:37:36.697Z] 

[2020-10-05T23:37:36.697Z] c:\jenkins\workspace\aster_CPM-TPC-master-full_master>REM **** the package to artifactory... 

[2020-10-05T23:37:36.697Z] 

[2020-10-05T23:37:36.697Z] c:\jenkins\workspace\aster_CPM-TPC-master-full_master>conan upload ext_TPC/11.8.128 --all -r=extTPC-conan --confirm 

[2020-10-05T23:37:37.666Z] Uploading to remote 'extTPC-conan':

[2020-10-05T23:37:37.666Z] 
Uploading ext_TPC/11.8.128@prod/master to remote 'extTPC-conan'                          

[2020-10-05T23:37:37.928Z] 
Uploading conanfile.py                                                
Uploading conanmanifest.txt                                           

[2020-10-05T23:37:37.928Z] 

[2020-10-05T23:37:37.928Z] 
Uploaded conan recipe 'ext_TPC/11.8.128@prod/master' to 'extTPC-conan': https://ca-dev-artifactory/artifactory/api/conan/extTPC-conan-latest-local

[2020-10-05T23:37:37.928Z] 
Uploading package 1/1: 6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7 to 'extTPC-conan'        

[2020-10-05T23:37:37.928Z] Compressing package...

[2020-10-05T23:37:41.719Z] [==================================================]

[2020-10-05T23:37:41.719Z] 

[2020-10-05T23:37:41.719Z] 

[2020-10-05T23:37:42.292Z] 
Uploading conan_package.tgz                                           

[2020-10-05T23:37:42.292Z] 

[2020-10-05T23:37:42.555Z] 
Uploading conaninfo.txt                                               
Uploading conanmanifest.txt                                           

[2020-10-05T23:37:42.555Z]"

多数民众赞成在上传输出

DateTimeFormatter

当我使用旧的构建服务器时,消耗工作正常。

当我从旧的构建服务器和新的构建服务器上传工件时,我注意到软件包ID是不同的。

从网络上的信息中,我了解到包ID是我无法控制的哈希。

所以我的问题是,为什么柯南期望使用旧的哈希,我该如何更改呢?

解决方法

您尝试在新服务器中安装的二进制文件正在请求此二进制文件:

[2020-10-06T14:49:07.485Z] - Settings: arch=x86_64,build_type=Release,compiler=Visual Studio,compiler.runtime=MD,compiler.version=14,os=Windows

因此,您尝试使用 compiler.version = 14

进行安装

您可以在创建的程序包中签入用于构建它的配置:

[2020-10-05T23:37:36.335Z] Found Visual Studio 15
[2020-10-05T23:37:36.335Z] Default settings
[2020-10-05T23:37:36.335Z]  os=Windows
[2020-10-05T23:37:36.335Z]  os_build=Windows
[2020-10-05T23:37:36.335Z]  arch=x86_64
[2020-10-05T23:37:36.335Z]  arch_build=x86_64
[2020-10-05T23:37:36.335Z]  compiler=Visual Studio 
[2020-10-05T23:37:36.335Z]  compiler.version=15
[2020-10-05T23:37:36.335Z]  build_type=Release

compiler.version = 15

将自动检测默认配置文件,并使用系统中找到的最新Visual Studio编译器。对于生产用途,建议使用您自己的配置文件,而不是自动检测配置文件。

确保使用相同的配置来创建程序包并使用它。您可以根据需要创建和上传任意数量的配置,但是当您install时,默认值是该配置应该存在(可以使用--build从源中请求构建它,但是默认行为是是找到匹配的二进制文件或失败)

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。