Package: bkyml
A CLI tool to generate apipeline.yamlfile for Buildkite on the fly.Install viapip install bkyml(seehttps://pypi.org/project/bkyml/)Example:bkymlcomment'Frontend tests pipeline'bkymlenv\--varFORCE_COLOR1bkymlstepsbkymlcommand\--command'yarn install'\--command'yarn test'\--label':karma: tests'bkymlwaitbkymlplugin\--plugin'org/upload-coverage#1.0.0'dir=./coveragewill produce# Frontend tests pipelineenv:FORCE_COLOR:'1'steps:-label:':karma:tests'command:-yarn install-yarn test-wait-plugins:org/upload-coverage#1.0.0:dir:./coverageThis allows you to dynamically generate pipelines:#!/bin/env bashset-eu-opipefailbkymlcomment"Pipeline for running all tests in test/*"bkymlsteps# add a new command step to run the tests in each test directoryfortest_dirintest/*/;dobkymlcommand\--command"run_tests${test_dir}"\--label"Run tests for '${test_dir}'"doneSub-CommandsstepsExample:bkymlstepswill producesteps:commentExample:bkymlcomment\'Hello world!''What a nice day :)'will produce# Hello world!# What a nice day :)envExample:bkymlenv\--varAB\--varCDwill produceenv:A:BC:DcommandExample:bkymlcommand\--command'yarn install'\--command'yarn test'\--envFORCE_COLOR1\--branchesmaster\--label':yarn: tests'\--agentsyarntrue\--artifact-paths'logs/**/*''coverage/**/*'\--parallelism5\--concurrency2\--concurrency-groupmy/group\--timeout-in-minutes60\--skip'Some reason'\--retryautomatic\--retry-automatic-tuple'*'2\--retry-automatic-tuple13\--plugindocker-compose#v1.3.2build=appimage-repository=index.docker.io/org/repowill produce-label:':yarn:tests'command:-yarn install-yarn testbranches:masterenv:FORCE_COLOR:'1'agents:yarn:'true'artifact_paths:-logs/**/*-coverage/**/*parallelism:5concurrency:2concurrency_group:my/grouptimeout_in_minutes:60skip:Some reasonretry:automatic:-exit_status:'*'limit:2-exit_status:1limit:3plugins:docker-compose#v1.3.2:build:appimage-repository:index.docker.io/org/repoThere is also:--retry-automatic-limit--retry-automatic-exit-codewhich can’t be used in conjunction with –retry-automatic-tupleAnd:--retry-manual-allowed(allowing manual retries, default)--no-retry-manual-allowed(disallowing manual retries)--retry-manual-reason REASON(giving a reason why retries are forbidden)--retry-manual-permit-on-passed(allowing retries after the job has passed)--no-retry-manual-permit-on-passed(disallowing retries after the job has passed, default)Example:bkymlcommand\--command'x'\--retrymanual\--retry-manual-permit-on-passed\--no-retry-manual-allowed\--retry-manual-reason"Just because"will result in-command:xretry:manual:allowed:falsereason:Just becausepermit_on_passed:truepluginExample:bkyamlplugin\--plugin'org/repo#1.0.0'some=varother=var\--plugin'org/other_repo'more=var\--name'My name is working'will result in-name:My name is workingplugins:org/repo#1.0.0:some:varother:varorg/other_repo:more:varwaitExample:bkyamlwait\--continue-on-failurewill result in-wait:continue_on_failure:truetriggerExample:bkyamltrigger'my-pipeline'\--branchesmaster'*-release'\--build-message'My build message'\--build-commitc0ffee\--build-branchgreen\--build-envFORCE_COLOR1\--build-meta-datarelease-name1.0.0will result in-trigger:my-pipelinebranches:master *-releasebuild:branch:greencommit:c0ffeemessage:My build messageenv:FORCE_COLOR:'1'meta_data:release-name:1.0.0blockExample:bkyamlblock':rocket: Release'will result in-block:':rocket:Release'Example with a select field:bkyamlblock':rocket: Release!'\--field-select\'key'\'Field label'\'Some hint'\true\a\'a=A label'\'b=B label'will result in:-block:':rocket:Release!'fields:-text:Field labelkey:keyhint:Some hintrequired:truedefault:aoptions:-label:A labelvalue:a-label:B labelvalue:bExample with a text field:bkyamlblock':rocket: Release!'\--field-text\'release-name'\'Release name'\'What should the next release name be?'\true\'Some release name'will result in:-block:':rocket:Release!'fields:-text:Release namekey:release-namehint:What should the next release name be?required:truedefault:Some release name