- Clone this repo
- Initialize as a new git repo --
rm -rf .git && git init && git add . && git commit -m 'first commit'
- To generate a
codeship_deploy_keyandcodeship_deploy_key.pubfile, modify the following command with your own email address and run our ssh-helper tool in your project directory:
docker run -it --rm -v $(pwd):/keys/ codeship/ssh-helper generate "<YOUR_EMAIL>"
- Copy file to project directory and rename to
codeship_deploy_key(must be a key that does not require a passphrase)
- Run the following command from the project directory:
docker run -it --rm -v $(pwd):/keys/ codeship/ssh-helper prepare
- Process will store
PRIVATE_SSH_KEYvalue as a one liner entry into thecodeship.envfile. Ifcodeship.envalready exists, thePRIVATE_SSH_KEYentry will be appended to it. - Remove the
codeship_deploy_key(!) - Add
codeship.envto your.gitignorefile (!)
- Install our jet cli tool on your local machine
- Setup your repository on your SCM of choice
- Grab the git url of the repository and create a Codeship Pro project
- From your Codeship 'Project Settings' > 'General' page, scroll down to AES key section and click 'Download Key'
- Move downloaded key to your project directory and rename to
codeship.aes - Add
codeship.aesto your.gitignorefile (!) - Add any additional environment variables to the
codeship.envfile - Run
jet encrypt codeship.env codeship.env.encrypted - The
codeship.env.encryptedwill be safe to check into your git repository
- Add the codeship_deploy_key.pub to your Github account
- Demo is set to attempt a connection with Github. You may use Bitbucket or Gitlab as well, but will require tweaking test steps in
codeship-steps.yml
- Run
jet steps - Steps should pass, demonstrating that
id_rsais now accessible to the main app via volumes - Be sure to modify the volume pathing to
.sshin thecodeship-services.ymlif the container user is notroot - Add
.sshdirectory to your.gitignorefile (!)