【问题标题】:pipeline type (exec) is not supported with 'drone exec'“drone exec”不支持管道类型(exec)
【发布时间】:2021-03-21 19:53:51
【问题描述】:

我在本地机器 Ubuntu 上运行 drone exec 时遇到问题,这是我如何运行它和 .drone.jsonnet 内容

.drone.jsonnet:

local default_deps_base='libsystemd-dev libboost-thread-dev libgtest-dev ' +
    'libboost-serialization-dev libboost-program-options-dev libunbound-dev nettle-dev libevent-dev libminiupnpc-dev ' +
    'libunwind8-dev libsodium-dev libssl-dev libreadline-dev libhidapi-dev libusb-1.0-0-dev libprotobuf-dev protobuf-compiler python3 ' +
    'pkg-config libsqlite3-dev qttools5-dev libcurl4-openssl-dev';
local default_deps='g++ ' + default_deps_base; // g++ sometimes needs replacement
 
local gtest_filter='-AddressFromURL.Failure:DNSResolver.DNSSEC*';
 
local submodules_commands = ['git fetch --tags', 'git submodule update --init --recursive --depth=1'];
local submodules = {
    name: 'submodules',
    image: 'drone/git',
    commands: submodules_commands
};
 
local apt_get_quiet = 'apt-get -o=Dpkg::Use-Pty=0 -q';
 
// Macos build
local mac_builder(name,
        build_type='Release',
        lto=false,
        werror=false, // FIXME
        build_tests=false,
        run_tests=false,
        cmake_extra='',
        extra_cmds=[],
        extra_steps=[],
        jobs=3,
        allow_fail=false) = {
    kind: 'pipeline',
    type: 'exec',
    name: name,
    platform: { os: 'darwin', arch: 'amd64' },
    steps: [
        { name: 'submodules', commands: submodules_commands },
        {
            name: 'build',
            environment: { SSH_KEY: { from_secret: "SSH_KEY" }, GTEST_FILTER: gtest_filter },
            commands: [
                // If you don't do this then the C compiler doesn't have an include path containing
                // basic system headers.  WTF apple:
                'export SDKROOT="$(xcrun --sdk macosx --show-sdk-path)"',
                'mkdir build-macosx',
                'cd build-macosx',
                'cmake .. -G Ninja -DCMAKE_CXX_FLAGS=-fcolor-diagnostics -DCMAKE_BUILD_TYPE='+build_type+' ' +
                    '-DLOCAL_MIRROR=https://xxx.xxx.dev/deps -DUSE_LTO=' + (if lto then 'ON ' else 'OFF ') +
                    (if werror then '-DWARNINGS_AS_ERRORS=ON ' else '') +
                    (if build_tests || run_tests then '-DBUILD_TESTS=ON ' else '') +
                    cmake_extra,
                'ninja -j' + jobs + ' -v'
            ] + (
                if run_tests then [
                   
                ] else []
            ) + extra_cmds,
        }
    ] + extra_steps
};
 
 
local static_check_and_upload = [
    '../utils/build_scripts/drone-check-static-libs.sh',
    'ninja strip_binaries',
    'ninja create_tarxz'
];
 
local static_build_deps='autoconf automake make qttools5-dev file libtool gperf pkg-config patch openssh-client';
 
local gui_wallet_step_darwin = {
    name: 'GUI Wallet (dev)',
    platform: { os: 'darwin', arch: 'amd64' },
    environment: { SSH_KEY: { from_secret: "SSH_KEY" }, CSC_IDENTITY_AUTO_DISCOVERY: 'false' },
    commands: [
        'git clone https://github.com/xxxx/xxx-electron-gui-wallet.git xxx-electron-gui-wallet-darwin',
        'cp -v build-macosx/bin/{xxxd,xxxx} xxx-electron-gui-wallet-darwin/bin',
        'cd xxx-electron-gui-wallet-darwin',
        'npm install',
        'npm run build'
    ]
};
 
 
[
   
    // Macos builds:
    mac_builder('macOS (Static)', cmake_extra='-DBUILD_STATIC_DEPS=ON -DARCH=core2 -DARCH_ID=amd64',
                build_tests=false, lto=true, extra_cmds=static_check_and_upload, extra_steps=[gui_wallet_step_darwin]),
 
]

这是我的运行方式:

drone jsonnet --source .drone-macos.jsonnet --stream

然后

drone exec

我得到了这个错误

pipeline type (exec) is not supported with 'drone exec'

对于我刚开始使用无人机时的无知,我很抱歉。

它不会让我发这个因为主要是code所以我必须写更多

【问题讨论】:

    标签: docker types exec pipeline drone


    【解决方案1】:

    看起来 CLI 工具本身不支持运行 exec 管道。也遇到了同样的问题。目前似乎只有 docker 管道是重点。

    【讨论】:

      猜你喜欢
      • 2012-10-14
      • 1970-01-01
      • 2016-02-26
      • 2017-02-13
      • 2013-05-06
      • 2015-07-03
      • 1970-01-01
      • 2012-01-23
      相关资源
      最近更新 更多