You'll need roughly 5 minutes to read this article.
Codeship Basic makes it easy and simple to get a working CI/CD process running through an easy-to-configure web UI and turnkey deployments.
This article will walk you through setting up a Codeship Basic project.
To create your account and project, you will just need to connect a repository to Codeship. We have a guide here for how to do that.
Since this article is about setting up a Codeship Basic project, you’ll want to be sure to select the Basic infrastructure when adding your project.
After selecting the Basic infrastructure for your project, Codeship will next ask you to configure your setup and test commands.
First, you will configure your setup commands. Setup commands are the commands you need to be able to run your tests and deployments. Typically these are things like fetching dependencies and seeding database.
Note that Codeship provides a list of popular setup commands for many common languages in the dropdown, but you can enter in your own commands as needed.
Next, you will enter in your test commands. These are all tests you want to have run in your CI/CD pipeline, and all deployments you configure will be contingent on these tests passing.
Now that you’ve defined your setup and test commands, you’ll want to define your deployment pipelines. Deployment pipelines run only when a build’s setup and tests commands have completed successful and only when the branch defined for the deployment is matched. We call them deployment pipelines rather than deployments because you can have different deployment destinations - perhaps staging and master environments - triggered by different branches.
Defining the branches that will trigger your deployment pipelines is the first step. You can either match a specific branch - i.e.
master - or you can choose to match any branch that starts with a specific string.
After specifying which branch triggers your new deployment pipeline, you can choose to use one of Codeship’s turnkey deployment integrations or to use your own custom script deployment.
If you want to use one of Codeship’s turnkey deployment integrations, just click on your host provider and provide the necessary account credentials as requested.
If you don’t want to use one of the turnkey deployment integrations, you can instead use your own custom script deployment. From the list of deployment targets, just select the last option - Custom Script.
From there you will be presented with a command window, just like when you entered your setup and test commands, in which you can define what deployment scripts or commands you would like to run.
It’s worth noting that for each deployment pipeline, you can add multiple deployments or multiple deployment steps. For instance, you can have one deployment on a
master pipeline that runs your deployment scripts followed by another pipeline that runs notification scripts.
To add multiple steps or deployments to a pipeline, just click on an additional deployment target and specify as needed. You can then use the simple drag-and-drop interface to arrange the deployment commands in the order you need them to run in.
If you’re looking to automate more of your processes, you can access your projects and builds via the Codeship API. See the Codeship API Documentation for more details and examples.
Codeship Basic has an automatic, built-in dependency cache, meaning we cache the packages directory for the most common dependency management systems, like NPM and Rubygems. You can clear your dependency cache at any time via the sidebar.
By using the string
--skip-ci in your commit message, you can instruct Codeship not to run a build for a particular commit. You can learn more about this via our article on skipping builds
Codeship offers the option to upgrade your Basic account with additional parallel test pipelines, allowing you to run multiple test commands simultaneously as a way to speed up your builds.
You can sign up for a free ParallelCI trial from the sidebar or get in touch with us to discuss configuration options.
Codeship Basic builds run on fresh VMs provisioned on Ubuntu Trusty. You can learn more about our infrastructure setup here
If a command runs for longer than 10 minutes without printing any log output, the command and build will be automatically failed. Additionally, if a build runs for longer than 3 hours, it will be automatically failed.
We also have a couple of code examples and sample projects available.