Skip to content

Commit dfcdfb3

Browse files
committed
token changes'
1 parent 49673cf commit dfcdfb3

File tree

7 files changed

+54
-36
lines changed

7 files changed

+54
-36
lines changed

.c9build.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ npm install
99
# Test
1010
gulp build
1111

12-
# Publish
12+
# Push content
13+
14+
## Requires TESTSPACE_TOKEN = $ACCESS_TOKEN:@samples.testspace.com.
15+
16+
BRANCH_NAME=`git symbolic-ref --short HEAD`
17+
GIT_URL=`git remote show origin -n | grep Fetch\ URL: | sed 's/.*URL: //'`
18+
REPO_SLUG=`echo ${GIT_URL#*github.com?} | sed 's/.git//'`
19+
1320
curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
14-
CI_REPORTS=$PWD/test/reports testspace @.testspace master.c9
21+
testspace @.testspace.txt $TESTSPACE_TOKEN/${REPO_SLUG/\//:}/${BRANCH_NAME}#c9.Build

.testspace

Lines changed: 0 additions & 12 deletions
This file was deleted.

.testspace.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Test Content files to publish
2+
3+
# "Static Analyis"
4+
$PWD/test/reports/jscs.xml
5+
$PWD/test/reports/jshint.xml
6+
7+
# "Tests"
8+
[Tests]$PWD/test/reports/junitresults.xml{test}
9+
10+
# "Code Coverage"
11+
$PWD/test/reports/coverage/clover.xml
12+
[Code Coverage]+$PWD/test/reports/coverage/clover.xml{attaching actual content for example only}

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ before_script:
99
script:
1010
- gulp build
1111

12+
# Requires TESTSPACE_TOKEN environment variable.
1213
after_script:
1314
- curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
14-
- CI_REPORTS=$PWD/test/reports testspace @.testspace $TESTSPACE_TOKEN/${TRAVIS_BRANCH}#travis.Build.${TRAVIS_BUILD_NUMBER}
15-
15+
- testspace @.testspace.txt $TESTSPACE_TOKEN/${TRAVIS_REPO_SLUG/\//:}/${TRAVIS_BRANCH}#travis.Build.${TRAVIS_BUILD_NUMBER}

circle.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ test:
77
- npm install -g gulp
88
- npm install
99
- gulp build
10-
10+
11+
# Requires TESTSPACE_TOKEN environment variable.
1112
post:
1213
- curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
13-
- CI_REPORTS=$PWD/test/reports testspace @.testspace $TESTSPACE_TOKEN/${CIRCLE_BRANCH}#circle.Build.${CIRCLE_BUILD_NUM}
14+
- testspace @.testspace.txt $TESTSPACE_TOKEN/${CIRCLE_PROJECT_USERNAME}:${CIRCLE_PROJECT_REPONAME}/${CIRCLE_BRANCH}#circle.Build.${CIRCLE_BUILD_NUM}

readme.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
[![Testspace](http://www.testspace.com/public/img/testspace_logo.png)](http://www.testspace.com)
1+
[![Testspace](http://www.testspace.com/img/Testspace.png)](http://www.testspace.com)
2+
23
***
34

45
## JavaScript/Jasmine sample for demonstrating Testspace based on the [javascript-algorithms repo](https://github.com/mgechev/javascript-algorithms)
@@ -15,10 +16,12 @@ Using Multiple Online CI Services:
1516
***
1617
Publising **Test Content** using www.testspace.com
1718

18-
[![Space Health](https://samples.testspace.com/projects/114/spaces/431/badge)](https://samples.testspace.com/projects/114/spaces/431 "Test Cases")
19-
[![Space Metric](https://samples.testspace.com/projects/114/spaces/431/metrics/238/badge)](https://samples.testspace.com/spaces/431/schema/Code%20Coverage "Code Coverage (branches)")
20-
[![Space Metric](https://samples.testspace.com/projects/114/spaces/431/metrics/239/badge)](https://samples.testspace.com/spaces/431/schema/Code%20Coverage "Code Coverage (methods)")
21-
[![Space Metric](https://samples.testspace.com/projects/114/spaces/431/metrics/241/badge)](https://samples.testspace.com/spaces/431/schema/Static%20Analysis "Static Analysis (issues)")
19+
[![Space Health](https://samples.testspace.com/projects/165/spaces/804/badge)](https://samples.testspace.com/projects/165/spaces/804 "Test Cases")
20+
[![Space Metric](https://samples.testspace.com/projects/165/spaces/804/metrics/755/badge)](https://samples.testspace.com/spaces/804/schema/Code%20Coverage "Code Coverage (branches)")
21+
[![Space Metric](https://samples.testspace.com/projects/165/spaces/804/metrics/756/badge)](https://samples.testspace.com/spaces/804/schema/Code%20Coverage "Code Coverage (methods)")
22+
[![Space Metric](https://samples.testspace.com/projects/165/spaces/804/metrics/758/badge)](https://samples.testspace.com/spaces/804/schema/Static%20Analysis "Static Analysis (issues)")
23+
24+
2225

2326
***
2427

@@ -30,19 +33,21 @@ npm install
3033
gulp build
3134
</pre>
3235

33-
Publishing results example:
36+
Push Content using **Testspace client**:
3437

3538
<pre>
3639
curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
37-
CI_REPORTS=$PWD/test/reports testspace @.testspace $TESTSPACE_TOKEN/$BRANCH_NAME
40+
testspace @.testspace.txt $TESTSPACE_TOKEN/$GITHUB_ORG:$REPO_NAME/$BRANCH_NAME#$BUILD_NUMBER
3841
</pre>
3942

40-
Checkout the [Space](http://samples.testspace.com/projects/javascript.jasmine).
43+
Checkout the published [Test Content](https://samples.testspace.com/projects/testspace-samples:python.unittest). Note that the `.testspace.txt` file contains the [set of files](http://help.testspace.com/how-to:publish-content#publishing-via-content-list-file) to publish.
4144

4245
***
46+
4347
To replicate this sample:
44-
- Account at www.testspace.com.
45-
- CI Environment Variable called **TESTSPACE_TOKEN** required:
46-
- `TESTSPACE_TOKEN` = `[email protected]/my-project`
47-
- `credentials` set to `username:password` or your [access token](http://help.testspace.com/reference:client-reference#login-credentials).
48-
- `my-org-name.testspace.com/my-project` based on your *organization* (subdomain) and *project* names.
48+
- Setup account at www.testspace.com.
49+
- Create a Environment variable called `TESTSPACE_TOKEN`
50+
- `TESTSPACE_TOKEN` = `[email protected]`
51+
- `credentials` set to `username:password` or your [access token](http://help.testspace.com/reference:client-reference#login-credentials)
52+
- To [use Testspace with a CI system](http://help.testspace.com/how-to:add-to-ci-workflow), store `TESTSPACE_TOKEN` as a secure environment variable
53+

shippable.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,19 @@ node_js:
55

66
env:
77
global:
8-
- secure: dS551dAR1+AWu+lKPqoObGME/BRgPcMJJ8G+U/TkhSMyeUi0y9Xjr87LJJJs2/aEKW63vdrAuwdMhIzcev9jU0/ZAGz2/pmyfDzj0iM+wh2MQYydwb2vughPVr7qb2j9EDczKuxW+S/DIPqkvNgS2oXjIyMsiJJbYPu7bOaBbVNcB2zFraNQShAz8/lMOwsDRPkKYf5rbtWeO4nNwD1OilfUU8t+hVcKiFZZY/iLbqamI1anXNhSnB6w5MptYDw0YNiHZMOA43oEUe4clayHssKjiG26UDDBvfUyRGh6KpTYT13EG1ddCVzsOLhw6a4P0l2wOBikN7cEhsNPFgq7tw==
9-
8+
- secure: hG019jypQeIigMnNCKU3LZ7+lfMV5xzKMadSLDYjAerUFfiNizFIMU37r4+1hOqhB5coqnUe39ljfvRnZ6hvKysOBOrJMOWgdrxzNdT9c1g9rgPfkrBq3BHDp2eh5wSN5rFQwEU+83mcgKHLDwo0xnw9D98UFaNNr/00tHt3zA3Kk0FjSf4Zcv9JVE9LxG6Hr/05jHWd7N/41pxdnIQ59fPN1LbCkQsBcVizw6o2MuLy0Jqprv1SniH1Kj4FGsNG8lNTYvVAA2hLcFJ31iYzFFmrFtaqu1hYDgW8mNQMMFr59NGWeeA1BXuDNUZHPRSYK/FioBj+RuYGq0kupGT1UA==
9+
1010
build:
1111
ci:
1212
- npm install -g gulp
1313
- npm install
1414
- gulp build
1515

16-
post_ci:
17-
- curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
18-
- CI_REPORTS=$PWD/test/reports testspace @.testspace $TESTSPACE_TOKEN/${BRANCH}#ship.Build.${BUILD_NUMBER}
16+
# Requires TESTSPACE_TOKEN environment variable.
17+
on_success:
18+
- curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
19+
- testspace @.testspace.txt $TESTSPACE_TOKEN/${SHIPPABLE_REPO_SLUG/\//:}/${BRANCH}#ship.Build.${BUILD_NUMBER}
20+
21+
on_failure:
22+
- curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
23+
- testspace @.testspace.txt $TESTSPACE_TOKEN/${SHIPPABLE_REPO_SLUG/\//:}/${BRANCH}#ship.Build.${BUILD_NUMBER}

0 commit comments

Comments
 (0)