Skip to content

Commit 16cc1c4

Browse files
committed
Upload artifacts only on main repository.
1 parent 047c60a commit 16cc1c4

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

.travis.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,16 @@ env:
44
- ARTIFACTS_S3_BUCKET=matplotlib-test-results
55
- secure: RgJI7BBL8aX5FTOQe7xiXqWHMxWokd6GNUWp1NUV2mRLXPb9dI0RXqZt3UJwKTAzf1z/OtlHDmEkBoTVK81E9iUxK5npwyyjhJ8yTJmwfQtQF2n51Q1Ww9p+XSLORrOzZc7kAo6Kw6FIXN1pfctgYq2bQkrwJPRx/oPR8f6hcbY=
66
- secure: E7OCdqhZ+PlwJcn+Hd6ns9TDJgEUXiUNEI0wu7xjxB2vBRRIKtZMbuaZjd+iKDqCKuVOJKu0ClBUYxmgmpLicTwi34CfTUYt6D4uhrU+8hBBOn1iiK51cl/aBvlUUrqaRLVhukNEBGZcyqAjXSA/Qsnp2iELEmAfOUa92ZYo1sk=
7-
8-
matrix:
97
- TEST_ARGS=--no-pep8
108

11-
before_script:
12-
- gem install travis-artifacts
13-
149
language: python
1510

16-
python:
17-
- 2.6
18-
- 2.7
19-
- 3.3
20-
- 3.4
21-
2211
matrix:
2312
include:
13+
- python: 2.6
14+
- python: 2.7
15+
- python: 3.3
16+
- python: 3.4
2417
- python: 2.7
2518
env: TEST_ARGS=--pep8
2619

@@ -43,6 +36,6 @@ script:
4336

4437
after_failure:
4538
- tar cjf result_images.tar.bz2 result_images
46-
- travis-artifacts upload --path result_images.tar.bz2
47-
- echo "The result images will only be uploaded if they are on the matplotlib/matplotlib repo - this is for security reasons to prevent arbitrary PRs echoing security details."
48-
- echo https://s3.amazonaws.com/matplotlib-test-results/artifacts/${TRAVIS_BUILD_NUMBER}/${TRAVIS_JOB_NUMBER}/result_images.tar.bz2
39+
- if [[ $TRAVIS_PULL_REQUEST == false ]]; then gem install travis-artifacts; fi
40+
- if [[ $TRAVIS_PULL_REQUEST == falst ]]; then travis-artifacts upload --path result_images.tar.bz2; fi
41+
- if [[ $TRAVIS_PULL_REQUEST != false ]]; then echo "The result images will only be uploaded if they are on the matplotlib/matplotlib repo - this is for security reasons to prevent arbitrary PRs echoing security details." else echo https://s3.amazonaws.com/matplotlib-test-results/artifacts/${TRAVIS_BUILD_NUMBER}/${TRAVIS_JOB_NUMBER}/result_images.tar.bz2; fi

0 commit comments

Comments
 (0)