Commit Graph
244 Commits
Author SHA1 Message Date
Grzegorz Bizon d8670e114a Merge branch 'master' into fix/status-of-pipeline-without-builds
* master: (198 commits)
  Set inverse_of for Project/Services relation
  Fix admin hooks spec
  Prevent default disabled buttons and links.
  Add index on `requested_at` to the `members` table
  Rearrange order of tabs
  Fix admin active tab tests
  Show created_at in table column
  Nest li elements directly under ul
  Move builds tab to admin overview
  Add monitoring link with subtabs
  Add sub links to overview
  Add counter for abuse reports
  Remove admin layout-nav counters
  Move admin nav to horizontal layout nav
  Eager load project relations in IssueParser
  Use validate and required for environment and project
  Award Emoji can't be awarded on system notes backend
  Get rid of Gitlab::ShellEnv
  Update CHANGELOG.
  Fix project star tooltip on the fly.
  ...

Conflicts:
	app/services/ci/create_builds_service.rb
2016-06-15 20:14:25 +02:00
Grzegorz Bizon 2d495fce52 Remove reduntant method for building pipeline builds 2016-06-15 14:12:25 +02:00
Grzegorz Bizon 6ff146340f Improve creating builds by combining two loops 2016-06-15 10:22:20 +02:00
Grzegorz Bizon a76cbe5292 Add note for short circuit eval when building builds 2016-06-15 10:11:09 +02: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
Kamil Trzcinski 14a02a6a95 Improve design after review 2016-06-14 18:34:48 +02:00
Kamil Trzcinski 006b650988 Merge remote-tracking branch 'origin/master' into environments-and-deployments
# Conflicts:
#	db/schema.rb
2016-06-14 16:19:29 +02:00
Kamil Trzcinski 6209b60c96 Properly create a new deployment after build success 2016-06-14 14:44:09 +02:00
Grzegorz Bizon cf292a3f1d Improve code clarity in pipeline create service 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
Kamil Trzcinski 3656a6edf3 Make retry action on pipeline to save a user 2016-06-14 13:04:10 +02:00
Kamil TrzcinskiandPhil Hughes 421be01dab Improve design based on review 2016-06-13 11:09:19 +01:00
Kamil TrzcinskiandPhil Hughes fab1c4a81b Show the artifacts expiration prompt in Build Artifacts widget 2016-06-13 11:05:26 +01:00
Kamil TrzcinskiandPhil Hughes ee7c5539f3 Add artifacts_expire_in method for Ci::Build 2016-06-13 11:03:30 +01:00
Kamil TrzcinskiandPhil Hughes ffe8dbde9b Move keep to ArtifactsController 2016-06-13 11:03:30 +01:00
Kamil TrzcinskiandPhil Hughes aea4041ce9 Allow to expire build artifacts 2016-06-13 11:01:19 +01:00
Kamil Trzcinski 907c0e6796 Added initial version of deployments 2016-06-10 23:36:54 +02:00
Kamil Trzcinski cf7da039be commit status 2016-06-10 22:38:40 +02:00
Rémy Coutable 133d5c1c64 Merge branch 'rename-ci-commit-phase-4' into 'master'
Rename Commit to Pipeline in TriggerRequest

Changes in TriggerRequest a `commit` to `pipeline`.


See merge request !4505
2016-06-10 14:31:21 +00:00
Tomasz Maczukin 9dfb809c57 Fix UTF-8 handling in incremental trace update API 2016-06-10 13:09:34 +02:00
Kamil Trzcinski 921c356b5e Rename commit to pipeline in TriggerRequest 2016-06-09 17:57:07 +02:00
Kamil Trzcinski 9423547f61 Fix other places where we still use commit attribute of Build 2016-06-03 15:49:14 +02:00
Kamil Trzcinski 4d5f7aa008 Fix more places where we should rename ci_commit to pipeline 2016-06-03 14:46:17 +02:00
Kamil Trzcinski bcd009e661 Use foreign_key to define column name 2016-06-03 13:58:35 +02:00
Kamil Trzcinski 0a51c95464 Merge remote-tracking branch 'origin/master' into rename-ci-commit 2016-06-03 13:10:01 +02:00
Kamil Trzcinski 3577b57f6b Try to use pipeline where applicable 2016-06-03 13:09:49 +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 b2acebb4ef Use ci_commits table 2016-06-03 12:00:16 +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 0d19abf450 Add minor improvements in create builds service 2016-06-03 11:34:36 +02:00
Grzegorz Bizon af2f56f8f7 Refactor ci commit pipeline to prevent implicit saves 2016-06-03 11:34:36 +02:00
Josh Frye 2605a0a844 Refactor. Add tests. 2016-06-02 11:10:57 -04:00
Josh Frye 4d9622e7d3 Invalidate cache on build change 2016-06-02 11:10:57 -04: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
Robert Speicher 7d33fba7af Merge branch 'upgrade-devise-two-factor' into 'master'
Upgrade devise, devise-two-factor, and attr_encrypted

Devise 4 includes support for Rails 5, working towards #14286. devise-async doesn't support Devise 4.0 and in 4.1 the bug that was blocking using Devise's built-in ActiveJob integration was fixed. So devise-async is removed. devise-two-factor 3.0.0 is required for Devise 4 support.

attr_encrypted and encryptor are optional but recommended upgrades for devise-two-factor 3.0.0. The mode and algorithm will need to be changed in order to update to attr_encrypted 4.x in the future.

See merge request !4216
2016-06-02 00:44:41 +00:00
Kamil Trzcinski bc621eef54 Pipelines can be canceled only when there are running builds 2016-05-31 15:26:00 +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 e7586cfbdc Merge branch 'rubocop/enable-negatedif-style-cop' into 'master'
Enable Style/NegatedIf Rubocop cop

Favor `unless` over `if` for negative conditions (or control flow ||).

```ruby
# bad
do_something if !some_condition
# bad
do_something if not some_condition

# good
do_something unless some_condition
# good
some_condition || do_something
```

See #17478

See merge request !4355
2016-05-30 17:59:10 +00:00
Grzegorz Bizon a55e8f109f Enable Style/NegatedIf Rubocop cop
Favor `unless` over `if` for negative conditions
(or control flow ||).

See #17478
2016-05-30 13:53:25 +02:00
Grzegorz Bizon 9d5f80e00b Enable Style/MethodDefParentheses rubocop cop
Use def with parentheses when there are parameters.

See #17478
2016-05-30 12:08:53 +02: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
Douwe Maan 3f6f2bbe14 Merge branch 'create-todo-on-failing-build' into 'master'
Create a todo on failing MR build

Implements #14067. I worked on this with @DouweM (any mistakes are mine).

When a build fails for a commit, create a todo for the author of the merge request that commit is the HEAD of. If the commit isn't the HEAD commit of any MR, don't do anything. If there already is a todo for that user and MR, don't do anything.

Current limitations:
- This isn't configurable by project.
- The author of a merge request might not be the person who pushed the breaking commit.
- I haven't tested this with a working CI setup, just with the unit tests below and by modifying my DB directly.


See merge request !3177
2016-05-19 21:18:22 +00:00
Grzegorz Bizon c3c503d259 Rename method that validates runner tag constrains 2016-05-19 22:01:53 +02:00
Grzegorz Bizon f6dd8a5257 Move runner validator to separate private method 2016-05-19 22:01:53 +02:00
Grzegorz Bizon 8001eed06e Add method that check if build has tags 2016-05-19 22:01:53 +02:00
Grzegorz Bizon 9fd6f1b600 Improve displaying validation messages for runner 2016-05-19 22:01:53 +02:00
Grzegorz Bizon dd8e9e2d7a Add custom validator to runner model 2016-05-19 22:01:53 +02:00
Grzegorz Bizon 83df638455 Disallow runner to pick untagged build if configured 2016-05-19 22:01:53 +02:00
Grzegorz Bizon 2aa5707194 Extend runner config options for untagged jobs 2016-05-19 22:01:53 +02:00
Sean McGivernandSean McGivern 6b834f2cbc Create a todo on failing MR build
When a build fails for a commit, create a todo for the author of the
merge request that commit is the HEAD of. If the commit isn't the HEAD
commit of any MR, don't do anything. If there already is a todo for that
user and MR, don't do anything.

Current limitations:
- This isn't configurable by project.
- The author of a merge request might not be the person who pushed the
  breaking commit.
2016-05-17 10:17:45 +01:00