Skip to content

Commit ea8487e

Browse files
authored
Merge pull request #9 from moufmouf/gitlab-api-v8
Migrating artifacts download to the Jobs API
2 parents 9c1654a + 3d320f3 commit ea8487e

File tree

7 files changed

+343
-186
lines changed

7 files changed

+343
-186
lines changed

README.md

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
[![Total Downloads](https://poser.pugx.org/thecodingmachine/washingmachine/downloads)](https://packagist.org/packages/thecodingmachine/washingmachine)
33
[![Latest Unstable Version](https://poser.pugx.org/thecodingmachine/washingmachine/v/unstable)](https://packagist.org/packages/thecodingmachine/washingmachine)
44
[![License](https://poser.pugx.org/thecodingmachine/washingmachine/license)](https://packagist.org/packages/thecodingmachine/washingmachine)
5-
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/thecodingmachine/washingmachine/badges/quality-score.png?b=1.2)](https://scrutinizer-ci.com/g/thecodingmachine/washingmachine/?branch=1.2)
6-
[![Build Status](https://travis-ci.org/thecodingmachine/washingmachine.svg?branch=1.2)](https://travis-ci.org/thecodingmachine/washingmachine)
7-
[![Coverage Status](https://coveralls.io/repos/thecodingmachine/washingmachine/badge.svg?branch=1.2&service=github)](https://coveralls.io/github/thecodingmachine/washingmachine?branch=1.2)
5+
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/thecodingmachine/washingmachine/badges/quality-score.png?b=1.3)](https://scrutinizer-ci.com/g/thecodingmachine/washingmachine/?branch=1.3)
6+
[![Build Status](https://travis-ci.org/thecodingmachine/washingmachine.svg?branch=1.3)](https://travis-ci.org/thecodingmachine/washingmachine)
7+
[![Coverage Status](https://coveralls.io/repos/thecodingmachine/washingmachine/badge.svg?branch=1.3&service=github)](https://coveralls.io/github/thecodingmachine/washingmachine?branch=1.3)
88

99

1010
# Washing machine
@@ -57,18 +57,35 @@ Now, we need to install the *washingmachine*, and get it to run.
5757

5858
`.gitlab-ci.yml`
5959
```
60-
before_script:
61-
- composer global require 'thecodingmachine/washingmachine'
60+
image: php:7.0
61+
62+
test:
63+
before_script:
64+
- cd /root && composer create-project thecodingmachine/washingmachine washingmachine ^1.2
6265
63-
script:
64-
- phpdbg -qrr vendor/bin/phpunit
66+
script:
67+
- phpdbg -qrr vendor/bin/phpunit
6568
66-
after_script:
67-
- /root/.composer/vendor/bin/washingmachine run -v
69+
after_script:
70+
- /root/washingmachine/washingmachine run -v
6871
```
6972

7073
Notice that we need to make sure the PHPDbg extension for PHP is installed. Also, make sure that Xdebug is NOT enabled on your Docker instance. Xdebug can also return code coverage data but is less accurate than PHPDbg, leading to wrong CRAP score results.
7174

75+
### Supported Gitlab versions
76+
77+
Gitlab 8+ is supported.
78+
79+
- The washingmachine v1.0 => v1.2 has support for Gitlab 8.
80+
- The washingmachine v1.2+ has support for Gitlab 8 and 9.
81+
82+
Starting with v1.3, we use some features only available in Gitlab 9.
83+
You can still run the washingmachine on Gitlab 8.10+, but you will need to fill the `job_stage` parameters when program is run:
84+
85+
/root/washingmachine/washingmachine run --job-stage=test
86+
87+
THe 'job_stage' parameter is the name of the stage in your `gitlab-ci.yml` file.
88+
7289
### Adding extra data in the comment
7390

7491
When the *washingmachine* adds a comment in your merge-request, you can ask it to add additional text.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
}
1010
],
1111
"require": {
12-
"m4tthumphrey/php-gitlab-api": "^7.16",
12+
"m4tthumphrey/php-gitlab-api": "dev-feature/jobs_api as 8.0.0",
1313
"symfony/console": "^3.0",
1414
"mouf/picotainer": "^1.0",
1515
"symfony/filesystem": "^3.0",

0 commit comments

Comments
 (0)