Commit Graph

34 Commits

Author SHA1 Message Date
Rémy Coutable c946ee1282
Enable the Layout/SpaceBeforeBlockBraces cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-08-09 11:52:22 +02:00
Robert Speicher 72a7b30c9f Change all `:empty_project` to `:project` 2017-08-02 17:47:31 -04:00
Nick Thomas 35f4a00f37 Introduce cache policies for CI jobs 2017-07-05 15:39:26 +01:00
Grzegorz Bizon 0430b76441 Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
Robert Speicher a6ec5121f0 Correct RSpec/SingleLineHook cop offenses 2017-06-14 13:18:56 -05:00
Grzegorz Bizon b29bf62602 Merge branch 'feature/add-support-for-services-configuration' into 'master'
Add support for services configuration in .gitlab-ci.yml

See merge request !8578
2017-06-14 07:57:47 +00:00
Kamil Trzcinski 05683f313b Fix filename method of GitlabUploader to return always real filename 2017-06-13 00:37:12 +02:00
Tomasz Maczukin c70e9f2ed1
Send new configuration options with job's payload 2017-06-12 12:58:35 +02:00
Jacopo ff76adb547 Unnecessary "include WaitForAjax" and "include ApiHelpers"
Removed all the unnecessary include of `WaitForAjax` and `ApiHelpers` in the specs.
Removed unnecessary usage of `api:true`
2017-04-21 22:32:02 +02:00
Kamil Trzciński 828d81ee1f Optimise trace handling code to use streaming instead of full read 2017-04-06 16:20:27 +00:00
Mike Wyatt 31b8287a1b Return an empty array when dependencies is an empty array 2017-04-05 12:07:10 +00:00
Tomasz Maczukin 37b36b4693
Update example's name in /runners/verify tests 2017-03-20 09:40:37 +01:00
Tomasz Maczukin c191c1103b
Send only defined dependencies
In APIv1 we've been sending all jobs from previous stages and
a `dependencies` list with names of jobs that user want to download
artifacts from. This was selected on Runners side.

In APIv1 we've planned to send only jobs that were defined (if any; and
all previous jobs by default). However I've missed the fact that
it was Runner who selected jobs, not GitLab. And now current version
of APIV4 sends all jobs everytime.

This commit fixes this. If user will define `dependencies` in his job,
then GitLab will send only selected jobs.
2017-03-20 09:40:36 +01:00
Tomasz Maczukin 9267a9b19d
Send token of depenent job
Artifacts download for authorization is using a job token of job to
which the artifact belongs. In APIv1 the token was sent with dependent
jobs details and in APIv4 it was designed to also contain it.

However I forgot about this parameter while working on
`/api/v4/jobs/request` endpoint.

This commit adds a missing parameter which is required for APIv4 to work
properly.
2017-03-20 09:40:36 +01:00
Tomasz Maczukin e79ab1115b
Remove legacy Runners support in /api/v4/jobs/request
In Runner v1.3.0 we've started to send User-Agent header with Runner's
version data. Since GitLab v8.12.0 we've started to use this header to check
if used Runner's version supports 204 status code instead of 404 as a
response when there is no jobs to execute by a Runner.

In APIv4 (introduced in GitLab 9.0.0) will require Runner v9.0.0. And
writing more accurately: GitLab Runner v9.0.0 will require GitLab at
least 9.0.0. Because of such breaking change we are able to switch
entirely to 204 response code and there is no need to do check of
User-Agent.

This commit removes useless code and complexity.
2017-03-20 09:40:36 +01:00
Tomasz Maczukin bbf4d27a5c
Make runner's veryfication working again
In APIv1 we were using UpdateJob to verify if the runner exists. It was
the only method that was using Runner's token and used in special way
had no side effects (like scheduling a new job or unregisterring a
Runner).

In APIv4 we've change UpdateJob to use job's token as authentication
credentials, and that way we've removed the only endpoint that could
be used to verify if the Runner with a certain token exists in target
GitLab installation.

This commit adds `POST /api/v4/runners/verify` endpoint whose only
responsibility is to respond if Runner with posted credentials exists or
not.
2017-03-20 09:40:36 +01:00
Z.J. van de Weg 3ebd29b538 Futher rename the CI variables 2017-03-16 08:49:01 +01:00
Tomasz Maczukin 2e1b2233ce
Fix regression in runners registration v1 api 2017-03-13 16:35:10 +01:00
Tomasz Maczukin 32b09b8847
Add minor refactoring 2017-03-07 12:30:34 +01:00
Tomasz Maczukin 0905fe4d7a
Change artifacts and cache fields to arrays 2017-03-06 20:54:30 +01:00
Tomasz Maczukin 440ef7802d
Fix rubocop offenses 2017-03-06 11:51:09 +01:00
Tomasz Maczukin 5c1aa5fb65
Add some fixes and refactoring after review 2017-03-02 17:48:00 +01:00
Tomasz Maczukin 1bbf2c2cd1
Fix rubocop offenses 2017-03-02 17:45:46 +01:00
Tomasz Maczukin f7d352341e
Add artifacts downloading API 2017-03-02 17:45:46 +01:00
Tomasz Maczukin c2eb54760d
Add artifacts uploading API 2017-03-02 17:45:46 +01:00
Tomasz Maczukin 2a7f555caf
Add artifacts uploading authorize API 2017-03-02 17:45:46 +01:00
Tomasz Maczukin 7e46db0f5a
Add job patch trace API 2017-03-02 17:45:46 +01:00
Tomasz Maczukin d5f7e54211
Add job update API 2017-03-02 17:45:46 +01:00
Tomasz Maczukin fb8210ad19
Update step data naming 2017-03-02 17:45:45 +01:00
Tomasz Maczukin bbf5bb7070
Fix rubocop offenses 2017-03-02 17:45:45 +01:00
Tomasz Maczukin 3eafffcef0
Refactor JobRequest response structure 2017-03-02 17:45:45 +01:00
Tomasz Maczukin 3d26a8d0b6
Add jobs requesting API 2017-03-02 17:45:45 +01:00
Robert Schilling 2b8005ae41 New runner API returns 204 2017-02-28 08:32:40 +01:00
Tomasz Maczukin e25f26e550
Rename API::Ci to API::Runner 2017-02-16 01:30:46 +01:00