Skip to content

dev06 github integrations

Deron Smith edited this page Jul 16, 2018 · 5 revisions

slack

dockerhub

https://docs.docker.com/docker-hub/github/
https://docs.docker.com/docker-hub/github/#creating-an-automated-build

pyup

Join pyup with your github account: https://pyup.io/ and give it access to your public quanted repos.

We just have one version controlled requirements file that is used by all the projects, it is available from https://pyup.io/account/repos/github/quanted/requirements_qed/

pyup once a week will create pull requests for the dev branch. We can then accept that request at our leisure and check the updated libraries before deploying on dev and ultimately master. This requirements file is incorporated into the docker builds and well as all the django and flask projects. The requirements.txt file for all the django and flask projects is located at https://github.com/quanted/requirements_qed/tree/dev and must be manually set in pycharm.

Setup

Adding repos and customized builds

Secrets

Encrypting files official wiki

Notes:

  • Frequent issues with encryption when done from Windows machine

Steps:

  1. Install/Update Ruby on local machine
  2. Install Travis CLI
  3. From the command line, login to travis with 'travis login', a prompt for a username followed by password will be requested
    a. Standard login may fail on Windows, resolve by generating a new github token from "Personal settings" -> "Developer settings" -> "Personal access tokens"
    b. Login with "travis login --github-token TOKEN"
  4. From the git repo that will be executing the .travis.yml, run the 'travis encrypt-file' command
    a. If file is in a subrepo, use "-w PATH" to designate the path that travis will decrypt the file to when it builds the repo b. Include "--add" to automatically have the decryption command added to .travis.yml
    c. Example command:
travis encrypt-file secrets_dir/secrets.env secrets_dir/secrets.env.enc -w secrets_dir/secrets.env --add
  1. Push encrypted filed, NOT the original file, and updated travis yml to github to trigger build

The user must have the correct permissions on github/travis to successfully encrypt a file/files. The process of encrypting the file creates two encryption variables that are then associated with the repository the encryption was made in. The '-r REPO' tag can be used to specify a different repo then the current one. These encryption variables are then used by travis-ci when it attempts to decrypt the files.

codacy

code climate

landscape