Reputation: 297
For local I know how to download the failed tests screenshots.
scp -P 2222 [email protected]:/tmp/features_article_feature_817.png ~/Downloads/.
How do we download the screenshot from travis CI ?
Upvotes: 3
Views: 1366
Reputation: 11
There's a bit of an error in the yaml here - paths
should be indented under artifacts
. The .travis.yml fiel would have
# .travis.yml
addons:
artifacts:
paths:
- $(ls /tmp/*.png | tr "\n" ":")
Upvotes: 1
Reputation: 83
For people who get here via Google, there is an alternative approach.
You can run a (failing) job/build in debug mode, which gives you access to an interactive session via ssh. See the Travis docs for more information on how to.
Once in your interactive environment, you can run your build phases and find info on failing specs in your tmp
folder.
Upvotes: 3
Reputation: 36201
You can't really ssh to Travis CI. What you can do is to upload your build artifacts (like screenshots) to Amazon S3. Here's an example config that would result in uploading all png files found in the /tmp directory:
# .travis.yml
addons:
artifacts: true
paths:
- $(ls /tmp/*.png | tr "\n" ":")
You'll also have to configure some Amazon specific environment variables:
ARTIFACTS_KEY=(AWS access key id)
ARTIFACTS_SECRET=(AWS secret access key)
ARTIFACTS_BUCKET=(S3 bucket name)
Environment variables can be encrypted and securely defined in your .travis.yml
with the travis tool.
Read more about amazon s3 uploader and secure variables in Travis CI docs:
Upvotes: 1