Skip to main content

Build status Code health Python versions Software license Gitter chat room

YAML configuration file support for Codeship.

Syntax Compatibility

Travis CI

Build status

Shippable

Build status

Background

Many continuous integration services support YAML configuration files in order to support the infrastructure as code paradigm. Codeship, though one of the most appealing platforms, is missing this feature. You have to add commands regarding setup, testing and deployment in your Codeship project settings. This has various disadvantages, but even though users are complaining Codeship is not planning to address the issue on its traditional build server infrastructure. (Only Codeship’s new Docker-based infrastructure will finally make you more happy.)

Usage

Create a codeship.yml file in your repository at root level. The syntax is inspired by Travis CI and Shippable, though only limited features are supported. Example:

install:
  - pip install flake8
before_script:
  - touch codeship-yaml-was-here
script:
  - flake8
after_success:
  - echo "Now we can deploy"

To make Codeship read and interpret your codeship.yml file, and execute the commands in it add the following lines in the Setup Commands text box at Codeship > Select Project… > (your project), Project Settings > Test Settings.

pip install codeship-yaml
codeship-yaml

This will make codeship-yaml execute the commands you specified in the default sections in the following section order:

  1. install

  2. before_script

  3. script

  4. after_success

More Control

If you want more control over which sections are executed you can specify the requested section as a parameter. For example, you could add the following commands into the below-mentioned text boxes of your Codeship project:

Project Settings > Test Settings > Setup Commands

pip install codeship-yaml
codeship-yaml install

Project Settings > Test Settings > Test Commands

codeship-yaml before_script script

Project Settings > Deployment > (branch name)

codeship-yaml after_success

Adding custom sections, other than the default ones, to your codeship.yml file is possible but discouraged (to avoid losing similarity with other build platforms). If you want an additional section, which is established on other platforms already, please consider placing a pull request.

Python 3

The build image of Codeship Basic runs Python 2.7 by default, but versions 3.4 through 3.7 are also installed. Codeship requires you to activate them using pyenv. Python is not Codeship’s main expertise though, so expect a bumpy ride. Activating Python versions could be made easier. Sad story.

To make all Python versions available in parallel add the following command to the top of your Project Settings > Setup Commands on Codeship:

pyenv global 2.7 3.4 3.5 3.6 3.7

Contribute

For development we use tox, which handles both static code analysis and tests for all supported Python versions.

$ pip install tox

After making your code changes don’t forget to add tests, and simply run:

$ tox

When you place a pull request all tests are run on the build server infrastructure of Codeship, Travis CI and Shippable again. Please check if they all pass to ensure the syntax stays compatible across the different build infrastructures.

To remove all build files and folders including Python byte code you can run:

$ tox -e clean

Credits

This project is brought to you by Painless Software, a best-practice consultancy in software development. Less pain, more fun.

A big, massive “Thank you!” to all contributors:

  • Dave Allie (sectioning and coloring of command output)

Release files for codeship-yaml 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for codeship-yaml 0.4.0
File Size Uploaded
codeship-yaml-0.4.0.tar.gz 20.8 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for codeship-yaml 0.4.0
File Interpreter ABI Platform
codeship_yaml-0.4.0-py3-none-any.whl Python 3 none any Details
codeship_yaml-0.4.0-py2-none-any.whl Python 2 none any Details

Total release size: 56.8 kB

Release files / codeship-yaml-0.4.0.tar.gz

Download URL codeship-yaml-0.4.0.tar.gz
Size 20.8 kB
Tags Source
SHA-256 checksum
How to use checksums
cb9595f360d91f444a651e3d50e302e9cbe6e1d2d1be10b52cab8cee08967146
BLAKE2b-256 checksum
How to use checksums
be44f1a58d2466bb717c516e6b2f1e86ce5b67ea8c28221e106c297cb49071d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/2.7.15

Release files / codeship_yaml-0.4.0-py3-none-any.whl

Download URL codeship_yaml-0.4.0-py3-none-any.whl
Size 18.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6ba8d9c449e93d173180870a4bfebba200b6238cdaba7ff6c737b13a746b2b49
BLAKE2b-256 checksum
How to use checksums
75ef9233bf6fea32e0798e8697314e666176d8a9a210c2be547976d784d40b17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.1

Release files / codeship_yaml-0.4.0-py2-none-any.whl

Download URL codeship_yaml-0.4.0-py2-none-any.whl
Size 18.0 kB
Tags Python 2
SHA-256 checksum
How to use checksums
2e2eb8cf1078edc654f77d0b454fbe58c8a4aff380e3d58e1fa7367cabf198a6
BLAKE2b-256 checksum
How to use checksums
fb2fd197ab40c0b66a76d8f1f9eec1fa99818405a046b15d16feabb9562d67f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/2.7.15

Release history Release notifications | RSS feed

This release

0.4.0 This release

3 release files

0.3.0

8 release files

0.2

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page