【问题标题】:Check Conan Remote Repos with REST API使用 REST API 检查柯南远程仓库
【发布时间】:2018-01-10 15:24:13
【问题描述】:

我需要验证我们的 Conan 是否将 Artifactory 设置为远程存储库,并确保“ASDC-Jenkins”是用户并且它使用 HTTPS。我该如何开始呢?

# Check to make sure conan compiler defined in the default profile matches system compiler
CONAN_COMPILER=`conan profile show default | grep 'compiler.version'| awk '{print $2}'`
if [ $ID = "OSX" ] ; then 
    CLANG_VERSION=`clang -v 2>&1 | grep version | sed 's/.*version \([0-9]*.[0-9]*.[0-9]*\) .*/\1/g'`
    if [ ! $CONAN_COMPILER = $CLANG_VERSION ] ; then 
        echo "WARNING:  The compiler version in the conan default profile does not match the one the system reports"
    fi
fi
if [ $ID = "Linux" ] ; then 
    if [ ! $CONAN_COMPILER = $COMPILERVER ] ; then 
        echo "WARNING:  The compiler version in the conan default profile does not match the one the system reports"
    fi
fi

【问题讨论】:

  • 不确定您要在代码中完成什么。您询问有关将 Artifactory 检查为远程的问题。这可以在conan remote list 中显示。您很可能对conan config install 功能感兴趣,该功能允许在柯南客户端中配置远程,因此所有开发人员和 CI 机器共享相同的配置。关于用户,命令conan user 将显示每个已定义遥控器的当前用户。请告诉我这是否有帮助。
  • 谢谢,确实有帮助。我在哪里可以找到有关“柯南用户”命令和其他类似命令的信息?再次感谢

标签: rest artifactory conan


【解决方案1】:

对于第一项,您需要运行以下命令:

$ conan remote list

而不是profile show 检查conan remote reference

另外,作为提示,您也可以使用以下命令从共享配置中定义遥控器,而不是检查它:

$ conan config install <url or git repo>

这将安装在柯南客户端远程、配置文件和其他配置中,以确保所有开发人员和 CI 机器共享相同的配置

为了获取用户,你需要命令:

$ conan user

它将显示每个遥控器当前的活动用户。检查reference here

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-04-15
    • 2018-12-05
    • 2011-09-03
    • 2013-02-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多