codeship Tracking Deployments From Codeship

Codeship is a Continuous Integration/ Continuous Delivery platform in the cloud. It offers both CodeShip Basic and CodeShip Pro for you to choose from.

Codeship Pro

Setting your API key and project id

You will need to add your Atatus API key and project id to your encrypted environment variables that you encrypt and include in your codeship-services.yml file.

Logging During Deployment

Next, you will need to add the following commands to a script, placed in your repository, that you will call from your codeship-steps.yml file:

In this case, we are calling a script named deploy-atatus.sh .

copy
icon/buttons/copy
curl https://api.atatus.com/v2/projects/$PROJECT_ID/deployments \
    -F api_key=$API_KEY \
    -F revision=$CI_COMMIT_ID \
    -F release_stage=$CI_BRANCH \
    -F user=$CI_COMMITTER_USERNAME \
    -F changes="$DEPLOYMENT_NOTES"

You will need to call this script on all deployment related branches by specifying the tag. Be sure to add this step after your deployment commands, so that it only runs if the deployments were successful. For example:

- name: deploy
  service: app
  tag: master
  command: your deployment commands

- name: atatus
  service: app
  tag: master
  command: deploy-atatus.sh

Codeship Basic

Setting your API key and project id

You will need to add your Atatus API key and project id to your project’s environment variables.

You can do this by navigating to Project Settings and then clicking on the Environment tab.

Logging during Deployment

To log a deployment related data point in Atatus, you will want to add a new custom-script step to all of your deployment pipelines.

This new step will either run the following commands or run a script that includes the following commands:

copy
icon/buttons/copy
curl https://api.atatus.com/v2/projects/$PROJECT_ID/deployments \
    -F api_key=$API_KEY \
    -F revision=$CI_COMMIT_ID \
    -F release_stage=$CI_BRANCH \
    -F user=$CI_COMMITTER_USERNAME \
    -F changes="$DEPLOYMENT_NOTES"

Codeship is now successfully integrated with Atatus.