CloudBees 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 CloudBees CodeShip Basic project. For a video introduction to CloudBees CodeShip Basic, you can view our overview video.
CodeShip requires that you set up a CodeShip Account and connect to a Source Content Management (SCM). See Setting Up A New CodeShip Account Guide for more information.
Setup commands are the commands needed to run your tests and deployments. Examples of setup commands include fetching dependencies and seeding the database.
To configure your setup commands:
Select the Tests tab in the dashboard.
Click the dropdown arrow on the right to see a list of technologies.
Either select a technology to pre-populate basic commands or select I want to create my own custom commands.
If select I want to create my own custom commands then enter setup commands in box.
Either click Save and go to dashboard or Save Changes.
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.
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.
To configure your deployment pipelines:
Select the Deploy tab in the dashboard.
Click the dropdown arrow on the right to see a list of ways to configure a branch that triggers the deployment pipeline.
Select either Branch is exactly to match a specific branch or select Branch starts with to match any branch that starts with a specific string.
Enter branch name in the box.
Click the Save Pipeline Settings button.
See deployment pipeline for more information.
After specifying which branch triggers your new deployment pipeline, you can choose to use one of CodeShip’s pre-configured deployment integrations or to use your own custom script deployment.
To use a pre-configured deployment:
Click on your host provider and then provide the necessary account credentials as requested.
If you don’t want to use one of the pre-configured deployment integrations, you can instead use your own custom script deployment.
To use your own custom script deployment: 1. Select the Custom Script button. 2. Enter your custom deployment script in the box. 3. Click the Create Deployment button.
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:
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.
You can trigger a build when committing, merging, and pushing tags to your project. This is default behavior. You can also trigger a build when opening, merging, and updating a Pull Request (PR). See Configuring Build Triggers for more information.
You can skip builds on both CloudBees CodeShip Basic and CloudBees CodeShip Pro by using a special commit directive. See Skipping Builds for more information.
CloudBees 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.
To clear your dependency cache:
Select Builds from the top-level navigation.
Click the drop down arrow from the Build box.
Select Reset Cache.
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 Parallel Test Pipelines Trial by clicking Add Pipeline or get in touch with us to discuss configuration options.
In order to troubleshoot issues, CodeShip provides command line access to a replicated instance of your build. The SSH debug session will include all configured variables from the original build run. See Debugging builds via SSH for more information.
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.
We maintain a scripts library with scripts for common packages, deployments and other useful workflow improvements on CloudBees CodeShip Basic.
If you’re looking for a specific tool or version, the scripts library is a great first place to check.
CloudBees CodeShip Basic builds run on fresh VMs provisioned on Ubuntu 18.04 (Bionic). You can learn more about our infrastructure setup in the VM And Infrastructure documentation.