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
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
Lin Jen-Shin
ac531c0ee5
Test against default to '0', it should not set
2017-02-24 17:15:25 +08:00
Lin Jen-Shin
83418ad846
Merge remote-tracking branch 'upstream/master' into 27762-add-default-artifacts-expiration
...
* upstream/master: (247 commits)
Switched CONTRIBUTING.md style guide recommendation for method chaining
Fix new offenses
Stylistic tweaks
Fix OAuth/SAML user blocking behavior
Revert "Enable Style/DotPosition"
Revert "Prefer leading style for Style/DotPosition"
Revert "Enable Style/BarePercentLiterals"
Manually correct autocorrect
Move up delegate calls
Exclude migrations from Style/MutableConstant
ActiveSupport delegation is preferred over Forwardable
Update haml_lint to work with newest rubocop
Add explanations to cops
Update rubocop and rubocop-rspec and regenerate .rubocop_todo.yml
Update rubocop and rubocop-rspec and regenerate .rubocop_todo.yml
Order cops alphabetically
Don’t exclude some file in lib from rubocop
Fix new offenses
Enable Rails/Delegate
Enable Style/WordArray
...
2017-02-24 17:14:35 +08:00
Douwe Maan
56de781a2c
Revert "Enable Style/DotPosition"
...
This reverts commit e00fb2bdc2090e9cabeb1eb35a2672a882cc96e9.
# Conflicts:
# .rubocop.yml
# .rubocop_todo.yml
# lib/gitlab/ci/config/entry/global.rb
# lib/gitlab/ci/config/entry/jobs.rb
# spec/lib/gitlab/ci/config/entry/factory_spec.rb
# spec/lib/gitlab/ci/config/entry/global_spec.rb
# spec/lib/gitlab/ci/config/entry/job_spec.rb
# spec/lib/gitlab/ci/status/build/factory_spec.rb
# spec/lib/gitlab/incoming_email_spec.rb
2017-02-23 09:33:19 -06:00
Douwe Maan
1fe7501b49
Revert "Prefer leading style for Style/DotPosition"
...
This reverts commit cb10b725c8929b8b4460f89c9d96c773af39ba6b.
2017-02-23 09:33:05 -06:00
Douwe Maan
7d4b52b27d
Enable Style/WordArray
2017-02-23 09:32:41 -06:00
Douwe Maan
206953a430
Prefer leading style for Style/DotPosition
2017-02-23 09:32:22 -06:00
Douwe Maan
3dadf306dd
Enable Style/DotPosition
2017-02-23 09:31:56 -06:00
Robert Schilling
b8c88a839d
Grapfiy the CI::Triggers API
2017-02-22 10:47:48 +01:00
Lin Jen-Shin
53c94f9ea2
Use the same syntax for default expiration
...
Feedback:
* https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9219#note_23343951
* https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9219#note_23344036
* https://gitlab.com/gitlab-org/gitlab-ce/issues/27762#note_23344797
2017-02-15 15:31:51 +08:00
Lin Jen-Shin
ac87207848
Test build API if expire_in not set, set to app default
2017-02-15 15:31:51 +08:00
Lin Jen-Shin
696a5da7fd
ApplicationSetting.current doesn't work well in tests
...
Therefore we prefer
`Gitlab::CurrentSettings.current_application_settings`
and fix the tests by setting default_artifacts_expire_in to 0
to restore the original behaviour.
2017-02-15 15:31:51 +08:00
Filipa Lacerda
c5f5ce8807
Fix broken tests
...
Rename Build to Job
Replace "Builds" by "Jobs" and fix broken specs
Replace "Builds" by "Jobs"
Fix broken spinach test
Fix broken test
Remove `˙` at the beginning of the file
Fix broken spinach test
Fix broken tests
Changes after review
2017-02-03 09:43:04 +00:00
Valery Sizov
ceb1ebd959
Active tense test coverage
...
Ports changes from https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/642 back into CE
2017-02-01 22:45:41 +00:00
Robert Speicher
9a31ecbef2
Use `:empty_project` where possible in request specs
2017-01-26 18:52:10 -05:00
Kamil Trzcinski
3234741576
Add 409 conflict tests
2017-01-25 10:49:36 +01:00
Kamil Trzcinski
746e7e765a
Fix specs
2017-01-20 02:38:07 +01:00
Kamil Trzcinski
8171a1932b
Merge remote-tracking branch 'origin/master' into 21698-redis-runner-last-build
2017-01-19 15:31:04 +01:00
Lin Jen-Shin
8c9a4ed373
WIP: Add tests and make sure that headers are set
...
* We realized that headers were not set whenever we give 204
because `render_api_error!` doesn't preserve the headers.
* We also realized that `update_runner_info` would be called in
POST /builds/register every time therefore runner is updated
every time, ticking the queue, making this last_update didn't
work very well, and the test would be failing due to that.
2017-01-04 17:46:56 +08:00
Rémy Coutable
359718603e
Ensure nil User-Agent doesn't break the CI API
...
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-12-21 11:46:16 +01:00
Lin Jen-Shin
a0690c4c01
Spaces around literal hash
...
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/builds/7617209
2016-12-19 23:20:22 +08:00
Lin Jen-Shin
e6c83b1c1f
Just set the status rather than calling event
...
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8091#note_20239558
2016-12-19 22:19:03 +08:00
Lin Jen-Shin
1e2e0de944
Define actions in let so that it could be overridden
...
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8091/diffs#note_20236356
2016-12-19 22:01:37 +08:00
Lin Jen-Shin
fb23153343
Delete the project when building the build
...
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8091#note_20222756
2016-12-19 18:50:01 +08:00
Lin Jen-Shin
e485b3f6ad
Give forbidden if project for the build was deleted
...
Closes #25309
2016-12-15 00:28:55 +08:00
Livier
eb4f15571d
Changed API spec files to describe the correct class
...
Restore changes for api spec files
Fix error in rspec Users
Delete extra space Repositories-spec
2016-11-28 10:55:27 -07:00
Kamil Trzciński
3c8d2148fc
Merge branch 'feature/send-registry-address-with-build-payload' into 'master'
...
Send registry address with build payload
## What does this MR do?
Adds `registry_url` as a part of a build payload, when sending a response to a GitLab Runner which requested a new build.
## Are there points in the code the reviewer needs to double check?
Change in `lib/ci/api/entities.rb`.
## Why was this MR needed?
This is one of the steps needed to add support for private/protected registries hosted with GitLab CE/EE.
## Screenshots (if relevant)
## Does this MR meet the acceptance criteria?
- [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html ) added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md )
- [x] API support added
- Tests
- [x] Added for this feature/bug
- [ ] All builds are passing
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html )
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides )
- [ ] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits )
## What are the relevant issue numbers?
Related to gitlab-org/gitlab-ci-multi-runner#1828, gitlab-org/gitlab-ci-multi-runner!386, gitlab-org/gitlab-ci-multi-runner#1434
See merge request !7474
2016-11-21 20:22:55 +00:00
Tomasz Maczukin
461195665b
Add Gitlab::Ci::Build::Credentials module with build credentials abstraction
2016-11-21 19:49:29 +01:00
Tomasz Maczukin
e3fb074022
Send credentials array with build data
2016-11-21 15:01:06 +01:00
Tomasz Maczukin
596bbf670c
Send registry_url with build data to GitLab Runner
2016-11-16 13:31:02 +01:00
Tomasz Maczukin
4dab79c5c6
Update the updated_at of a build while patching the trace
2016-11-15 13:54:47 +01:00
Valery Sizov
a6ba358a8f
Make specs a bit faster
2016-11-01 14:46:59 +02:00
Grzegorz Bizon
aa1ab8aa17
Add some tests for updating ci runner information
2016-10-03 12:07:47 +02:00
Kamil Trzcinski
135be3cabb
Solve code review comments
2016-09-19 14:23:18 +02:00
Kamil Trzcinski
ac6412d076
Added builds_spec and git_http_specs
2016-09-15 23:27:01 +02:00
Tomasz Maczukin
5b8613b8e6
Add test with inactive error use case for 'POST /ci/api/v1/builds/register.json'
2016-09-13 17:44:20 +02:00
Tomasz Maczukin
f369e62a16
Fix rubocop offences
2016-09-13 17:44:19 +02:00
Tomasz Maczukin
940f900f1c
Change response for /ci/api/v1/builds/register.json from 404 to 204
2016-09-13 17:44:18 +02:00
Jacob Vosmaer
8e97323d49
Constants in specs
2016-09-06 17:26:16 +02:00
Jacob Vosmaer
c87540ed46
Verify JWT messages from gitlab-workhorse
2016-09-05 15:05:31 +02:00
Kamil Trzcinski
39203f1adf
Pre-create all builds for Pipeline when a trigger is received
...
This change simplifies a Pipeline processing by introducing a special new status: created.
This status is used for all builds that are created for a pipeline.
We are then processing next stages and queueing some of the builds (created -> pending) or skipping them (created -> skipped).
This makes it possible to simplify and solve a few ordering problems with how previously builds were scheduled.
This also allows us to visualise a full pipeline (with created builds).
This also removes an after_touch used for updating a pipeline state parameters.
Right now in various places we explicitly call a reload_status! on pipeline to force it to be updated and saved.
2016-08-11 15:22:35 +02:00
tiagonbotelho
1d268a89de
adds second batch of tests changed to active tense
2016-08-09 15:11:39 +01:00
Katarzyna Kobierska
9403827933
Fix tests
2016-07-26 11:19:40 +02:00
Kamil Trzcinski
e6cbd62684
Update all exposed variables to CI builds
2016-07-20 00:15:18 +02:00
Lin Jen-Shin
36a73929df
Use describe rather than context for this:
...
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4964/diffs#note_12867416
Guidelines:
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/testing.md#general-guidelines
> Use `context` to test branching logic.
2016-07-04 23:05:05 +08:00
Lin Jen-Shin
79d7e71487
Use describe rather than context, feedback from:
...
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4964#note_12861588
2016-07-04 19:06:34 +08:00
Lin Jen-Shin
7cc6a703f6
Rename to "successful artifacts upload", feedback:
...
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4964#note_12861577
2016-07-04 19:04:51 +08:00