Deploy via Custom Script

Using A Custom Script

A custom script deployment is useful if your deployment requires additional or custom commands that are not available with some of Codeship’s integrated deployment options.

A custom script deployment is also useful when you need to execute another task after or prior to a deployment. For example:

# execute rake tasks
bundle exec rake my_rake_task

# run additional tests
# lives in the root folder

# deploy to Amazon S3 or any other server with ssh access
# you can define your keys in the environment variables

Please follow these steps to create a custom deployment script:

Step 1

Navigate to your project’s deployment configuration page by selecting Project Settings > Deployment on the top right side of the page.

Project Settings Deployment

Step 2

Edit an existing deployment pipeline or create a new deployment pipeline by selecting + Add new deployment pipeline. Create the deployment pipeline to match the exact name of your deployment branch or a wildcard branch.

Create branch deploy

Step 3

Select Custom Script

Select Custom Script

Step 4

Insert your deployment commands in the Deployment Commands box shown below. Then click Create Deployment to save your custom deployment script.

Create Custom Script


Custome Deployment Success

You have now successfully created a custom deployment script. Go ahead and push a commit to your configured deploy branch. If you have any further questions, please create a post on the Codeship Community page.

Need More Help?

Get in touch if you need more help, or post on Stack Overflow using the tag #Codeship.

  • Ask The Helpdesk A Question
  • Code Examples And Sample Projects
    • Was This Article Helpful?