Command line tool to execute jobs in Cirrus CI
Project status
Stable software. Adopted by several third parties to build their CI pipelines.
The project uses semantic versioning, any breaking changes will result in major
version increment. Recommended to pin to 1.* when using in production.
Overview
cirrus-run is a CLI application that allows you to execute builds in CirrusCI.
It uses local YAML files for build configuration, but requires a reference to GitHub repo and branch to assign ownership of the build. The build itself may have no relation to the specified GitHub repo. This enables integration with other source code hosting platforms, e.g. with GitLab: you can trigger CirrusCI builds by executing cirrus-run in GitLab CI
Installation
cirrus-run can be installed with pip:
pip install cirrus-run
Latest development versions are also installable:
pip install "https://github.com/sio/cirrus-run/tarball/master#egg=cirrus-run"
You can also run it in Docker: potyarkin/cirrus-run. This image is especially useful for integrating with other CI platforms.
Usage
usage: cirrus-run [-h] [--token TOKEN] [--github REPO] [--branch BRANCH] [-v]
[--timeout MINUTES]
[--show-build-log {failure,always,never}]
[--flaky-markers FILE]
[CONFIG]
Execute CI jobs in CirrusCI
positional arguments:
CONFIG Path to YAML configuration file or Jinja2 template for
such file. Filenames ending with .j2 or .jinja2 are
assumed to provide the templates. All environment
variables are available inside these templates.
Default value: $CIRRUS_CONFIG or .cirrus.yml or
.cirrus.yml.j2
optional arguments:
-h, --help show this help message and exit
--token TOKEN Access token for CirrusCI API. Recommended and more
secure way of providing the token is via environment
variable. Default value: $CIRRUS_API_TOKEN
--github REPO GitHub repo id that will own the build
("owner/reponame"). This repo may have no relation to
the CI job being executed. It may even be empty.
Default value: $CIRRUS_GITHUB_REPO
--branch BRANCH GitHub repo branch that will own the build. This
branch may have no relation to the CI job being
executed. Default value: $CIRRUS_GITHUB_BRANCH or
master
-v, --verbose Increase output verbosity. Repeating this argument
multiple times increases verbosity level even further.
--timeout MINUTES Timeout (in minutes) before assuming that the build
has hanged and that API responses are unreliable.
Default value: $CIRRUS_TIMEOUT or 120
--show-build-log {failure,always,never}
Specify whether to print the build log to stdout after
completing CI run. Default value:
$CIRRUS_SHOW_BUILD_LOG or "failure"
--flaky-markers FILE Path to file that contains flaky build markers, one
marker per line. If any marker is found in Cirrus CI
output for a failed build, the build is retried once
more. Default: $CIRRUS_FLAKY_MARKERS_FILE
Support and contributing
If you need help with using cirrus-run, please create an issue. Issues are also the primary venue for reporting bugs and posting feature requests. General discussion related to this project is also acceptable and very welcome!
In case you wish to contribute code or documentation, feel free to open a pull request. That would certainly make my day!
I'm open to dialog and I promise to behave responsibly and treat all contributors with respect. Please try to do the same, and treat others the way you want to be treated.
If for some reason you'd rather not use the issue tracker, contacting me via email is OK too. Please use a descriptive subject line to enhance visibility of your message. Also please keep in mind that public discussion channels are preferable because that way many other people may benefit from reading past conversations. My email is visible under the GitHub profile and in the commit log.
License and copyright
Copyright 2020-2021 Vitaly Potyarkin
Licensed under the Apache License, Version 2.0 (the "License");
you may not use these files except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Metadata
Release files for cirrus-run 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| cirrus-run-1.0.1.tar.gz | 14.8 kB | Without provenance | Details |
Release files / cirrus-run-1.0.1.tar.gz
| Download URL | cirrus-run-1.0.1.tar.gz |
|---|---|
| Size | 14.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
073dff47d7a736e9ddb5689624774b22d7a74b6a85d298b740b79865ac87a1c6
|
|
BLAKE2b-256 checksum How to use checksums |
fdcc0f5c7f7eaf5770aff9fa3b0ab7671e5fd4a6cf844d244527fef0a9a07ee9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.7
|
Security for cirrus-run 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.