3

I am having issues running drone exec on my local Machine Ubuntu, here is how i run it and .drone.jsonnet content

.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]),
 
]

And here is how i run it:

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

then

drone exec

and i get this error

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

I'm sorry for my ignorance in advance as i just started using drone.

it won't let me post this because is mostly code so i have to write more

Jacob
  • 31
  • 4

1 Answers1

1

Looks like running exec pipelines is just not supported natively in the CLI tools. Ran into the same issue too. Only docker pipelines seems to be the focus of that for now.

Atif Ali
  • 2,186
  • 2
  • 12
  • 23