100 Commits
Author SHA1 Message Date
Lin Jen-Shin 4efc1c4a68 Rename according to:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4093#note_12563922

For clarification and consistency
2016-06-20 16:52:05 +08:00
Lin Jen-Shin 5174d6c146 Merge remote-tracking branch 'upstream/master' into feature/runner-lock-on-project
* upstream/master: (337 commits)
  Update CHANGELOG for !4659
  Center the header logo for all Devise emails
  Add previews for all customized Devise emails
  Customize the Devise `unlock_instructions` email
  Customize the Devise `reset_password_instructions` email
  Customize the Devise `password_change` emails
  Use gitlab-git 10.2.0
  Use Git cached counters on project show page
  Fix indentation scss-lint errors
  Added title attribute to enties in tree view Closes #18353
  Banzai::Filter::ExternalLinkFilter use XPath
  Reduce queries in IssueReferenceFilter
  Use gitlab_git 10.1.4
  Fixed ordering in Project.find_with_namespace
  Fix images in emails
  Banzai::Filter::UploadLinkFilter use XPath
  Turn Group#owners into a has_many association
  Make project_id nullable
  CHANGELOG [ci skip]
  CHANGELOG [ci skip]
  ...
2016-06-17 19:52:55 +08:00
Lin Jen-Shin 8a0aeab846 Use active tense, feedback from:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4093#note_12501303
2016-06-16 23:33:53 +08:00
Lin Jen-Shin ae0e1e402e blank line between setup and expectation, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4093/diffs#note_12501266
and:
https://robots.thoughtbot.com/four-phase-test
2016-06-16 23:26:49 +08:00
Grzegorz Bizon 2d495fce52 Remove reduntant method for building pipeline builds 2016-06-15 14:12:25 +02:00
Lin Jen-Shin cd3f112f88 Adopt the rename from ci_commits to ci_pipelines 2016-06-15 17:34:44 +08:00
Grzegorz Bizon bf990fcda4 Return false in create_builds if not builds created
This fixes compatibility with trigger request create service.
2016-06-15 09:35:11 +02:00
Grzegorz Bizon e45fd5a1e4 Remove ci commit specs that remain after bad merge 2016-06-14 14:22:46 +02:00
Grzegorz Bizon ab9a8643d8 Merge branch 'master' into fix/status-of-pipeline-without-builds
* master: (538 commits)
  Fix broken URI joining for `teamcity_url` with suffixes
  Factorize duplicated code into a method in BambooService and update specs
  Fix broken URI joining for `bamboo_url` with suffixes
  Honor credentials on calling Bamboo CI trigger
  Update CHANGELOG
  Use Issue.visible_to_user in Notes.search to avoid query duplication
  Project members with guest role can't access confidential issues
  Allow users to create confidential issues in private projects
  Update CHANGELOG
  Remove deprecated issues_tracker and issues_tracker_id from project
  Schema doesn’t reflect the changes of the last 3 migrations
  Apply reviewer notes: update CHANGELOG, adjust code formatting
  Move issue rendering tests into separate contexts
  Move change description to proper release and fix typo
  Add more information into RSS fead for issues
  Revert CHANGELOG
  Also rename "find" in the specs
  Change to new Notes styleguide
  Add guide on changing a document's location
  Change logs.md location in README
  ...

Conflicts:
	app/services/ci/create_builds_service.rb
	app/services/ci/create_pipeline_service.rb
	app/services/create_commit_builds_service.rb
	spec/models/ci/commit_spec.rb
	spec/services/ci/create_builds_service_spec.rb
	spec/services/create_commit_builds_service_spec.rb
2016-06-14 13:44:03 +02:00
Lin Jen-Shin cbd6ca6985 Rename specific_for to available_for:
Feedback from:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4093#note_12413950
2016-06-14 16:07:57 +08:00
Lin Jen-Shin b0908d8739 Extra tests inside shared_examples:
Feedback from:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4093#note_12321421

The advantage of this is that tests are less about logic and more
straightforward, thus could be easier to reason about each individual
tests.

The disadvantage of this is that we write more duplicated codes and
once something changed we might need to change all places and it's
harder to reason all tests as a whole. Because now we need to look at
more places to figure out how it should work under another option!
2016-06-09 16:00:24 +08:00
Lin Jen-Shin 268f7713a9 Remove Build#can_be_served? and rename Runner#can_serve? to can_pick?
This also moves tests from build_spec.rb to runner_spec.rb
2016-06-09 16:00:24 +08:00
Lin Jen-Shin de04004803 Prefer string for describe, feedback from:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4093#note_12321029
2016-06-09 16:00:24 +08:00
Lin Jen-Shin 35954572b8 Prefer do and end for before/after:
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4404#note_12217415
2016-06-09 16:00:24 +08:00
Lin Jen-Shin 0eeb4bed49 Introduced Ci::Runner.specific_for for getting specific runners:
for a particular project.
2016-06-09 16:00:24 +08:00
Kamil Trzcinski 20c7144ed2 Rename all [ci_]commit to [ci_]pipeline in specs and features 2016-06-03 16:22:26 +02:00
Kamil Trzcinski 4d5f7aa008 Fix more places where we should rename ci_commit to pipeline 2016-06-03 14:46:17 +02:00
Grzegorz Bizon d8c4556d3c Refactor code reponsible for creating builds
This removes duplications and extracts method that builds build-jobs
without persisting those objects, to a separate method.
2016-06-03 12:50:51 +02:00
Kamil Trzcinski 717fdd6d42 Rename Ci::Build commit to pipeline 2016-06-03 12:29:00 +02:00
Kamil TrzcinskiandGrzegorz Bizon 681b472c36 Update specs describe 2016-06-03 11:34:36 +02:00
Kamil TrzcinskiandGrzegorz Bizon 8e811f2c6c Update CreateCommitBuildsService to pass tests 2016-06-03 11:34:36 +02:00
Kamil TrzcinskiandGrzegorz Bizon c6bce7e63c Save Ci::Commit object to persist all created builds 2016-06-03 11:34:36 +02:00
Grzegorz Bizon 53fe06efde Update ci commit pipeline specs according to changes 2016-06-03 11:34:36 +02:00
Kamil Trzcinski 021d3810c3 Rename Ci::Commit to Ci::Pipeline and rename some of the ci_commit to pipeline 2016-06-02 16:59:04 +02:00
Connor Shea d287315dbf Upgrade attr_encrypted and encryptor
attr_encrypted (1.3.4 => 3.0.1) Changelog:
https://github.com/attr-encrypted/attr_encrypted/blob/master/CHANGELOG.m
d

attr_encrypted 2.x included a vulnerability, so that major version is
skipped. 3.x requires that the algorithm and mode used by each
encrypted attribute is specified explicitly.

`nil` is no longer a valid value for the encrypted_value_iv field, so
it’s changed to a randomly generated string.
2016-05-30 13:51:21 -06:00
Robert Speicher 1087b26bf2 Remove boilerplate spec file for Ci::RunnerProject
[ci skip]
2016-05-26 17:52:43 -04:00
Robert Speicher 75739e54be Enable RSpec/NotToNot cop and auto-correct offenses
Also removes the note from the development/testing.md guide
2016-05-24 15:40:29 -04:00
Robert Speicher f26389a02a Merge branch 'feature/runner-config-untagged-jobs' into 'master'
Add config for CI Runner that prevents it from picking untagged jobs

Closes #3456

See merge request !4039
2016-05-19 21:54:33 +00:00
Grzegorz Bizon 8252333183 Extend CI runners specs 2016-05-19 22:01:53 +02:00
Kamil Trzcinski 2566c89a32 Remove testing delegate 2016-05-14 15:55:00 -05:00
Jeroen van Baarsen f1479b56b7 Remove the annotate gem and delete old annotations
In 8278b763d9 the default behaviour of annotation
has changes, which was causing a lot of noise in diffs. We decided in #17382
that it is better to get rid of the whole annotate gem, and instead let people
look at schema.rb for the columns in a table.

Fixes: #17382
2016-05-09 18:00:28 +02:00
Grzegorz Bizon 40a25732e9 Reorder asserts is ci commits specs for consistency 2016-04-28 15:15:59 +02:00
Grzegorz Bizon 60492caa98 Add tests exercising builds scheduler after cancel 2016-04-28 12:49:46 +02:00
Grzegorz Bizon 7518330aa1 Refactor ci commit specs by adding context blocks 2016-04-28 12:49:35 +02:00
Kamil Trzcinski e5ff37c1fc Fix rubocop 2016-04-18 07:45:23 -04:00
Kamil Trzcinski 28ce41c00e Fix tests 2016-04-18 07:35:43 -04:00
Kamil Trzcinski 1c5b172abb Write specs for this feature 2016-04-16 22:43:40 +02:00
Kamil Trzcinski af7214d0f0 Fix specs 2016-04-11 23:32:55 +02:00
Kamil Trzcinski f32e28f6fa Fix commit_spec: invalid validation 2016-03-14 13:20:35 +01:00
Kamil Trzcinski 0672258915 Cleanup CiCommit and CiBuild
- Remove all view related methods from Ci::Build and CommitStatus
- Remove unused Ci::Commit and Ci::Build methods
- Use polymorphism to render different types of CommitStatus
2016-03-14 13:20:35 +01:00
Yorick PeterseandRobert Speicher 2076bdb62e Use ILIKE/LIKE for searching CI runners 2016-03-11 15:25:21 -05:00
Tomasz Maczukin 49d5c35b69 Fix old usages of ci_runner factory 2016-02-19 13:18:49 +01:00
Grzegorz Bizon bee26f9c4e Add specs covering bug in build allowed to fail case 2016-02-18 14:08:50 +01:00
Stan Hu 4b4fdf58c7 Fix Error 500 when visiting build page of project with nil runners_token
Properly ensure that the token exists and add defensively check for a
non-nil value.

Closes #4294
2016-01-10 18:12:47 -08:00
Stan Hu 79c0e7212a Annotate models 2016-01-06 13:09:55 +00:00
Gabriel Mazetto b5291f9599 Fixed Rubocop offenses 2015-12-15 00:53:52 -02:00
Kamil Trzcinski 64bfd9d71a Remove ci_ prefix from all ci related things 2015-12-11 18:02:09 +01:00
Kamil Trzcinski e80e3f5372 Migrate CI::Project to Project 2015-12-11 18:02:09 +01:00
Kamil Trzcinski 2988e1fbf5 Migrate CI::Services and CI::WebHooks to Services and WebHooks 2015-12-10 16:04:08 +01:00
Douwe Maan 1e8d703a85 Tag model specs 2015-12-09 10:50:51 +01:00