Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Travis to test deployment #22

Open
certik opened this issue Apr 23, 2016 · 0 comments
Open

Use Travis to test deployment #22

certik opened this issue Apr 23, 2016 · 0 comments

Comments

@certik
Copy link
Member

certik commented Apr 23, 2016

Currently we exit early if DEPLOY_TOKEN is empty, e.g. on Travis:

if [ "${DEPLOY_TOKEN}" = "" ]; then

So anything after that is not tested. As such, of course, I broke it in #17 when I modified the end of the script, even though Travis passed, and it had to be fixed by 07765a0. The solution is to add a Travis ssh key into the repository, using the travis subdirectory (see the README there for more info how it works), which will generate another set of private/public keys, and we put the public key into a new testing repository on github, which will receive deployments from PRs.

In addition, the Travis test which executes docker should then be written as close to real deployment as possible. This means the deployment repository URL should be passed as an environment variable. And probably we should pass another variable denoting how many times it should get deployed (2x should be tested --- to ensure that the upload.sh script can be executed 2x, this tests things like proper cleaning of generated files between runs), in production it's infinity, and finally, how much time between runs (something like 1s for testing, and 20 min for production).

That way everything will be tested to the very end, ensuring that it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant