Commit Graph
99 Commits
Author SHA1 Message Date
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
Grzegorz Bizon db2d067eec Fix project destroy callback
See gitlab-org/gitlab-ee!107.
2016-01-05 20:49:31 +01:00
Grzegorz Bizon 504696453b Add hotfix that allows to access build artifacts created before 8.3
This is a temporary hotfix that allows to access build artifacts created
before 8.3. See #5257.

This needs to be changed after migrating CI build files.

Note that `ArtifactUploader` uses `artifacts_path` to create a storage
directory before and after parsisting `Ci::Build` instance, before and
after moving a file to store (save and fetch a file).
2015-12-29 09:51:19 +01:00
Grzegorz Bizon 42592201d9 Hotfix for builds trace data integrity
Issue #4246
2015-12-28 15:28:39 +01:00
Douwe Maan 17ed42e362 Merge branch 'issue_3452' 2015-12-21 17:43:58 +01:00
Douwe Maan 058f27ad2a Merge branch 'coverage-regex' into 'master'
Fix build coverage regex matching to allow captures.

Fixes #2644 

/cc @DouweM 

See merge request !2138
2015-12-21 16:25:09 +00:00
Jared Szechy 5a3237fd8d Fix build coverage regex.
Added a spec for regex captures as well.

Fixes #2644
2015-12-20 13:18:14 -05:00
Kamil Trzcinski 58a56a0396 Don't create CI status for refs that doesn't have .gitlab-ci.yml, even if the builds are enabled 2015-12-17 16:33:47 +01:00
Jared Szechy 05e0b6d014 Fix build coverage regex matching to allow captures.
Fixes #2644
2015-12-17 09:59:14 -05:00
Rubén Dávila 3f83a1585f Add link to MR from Build detail page. #3452 2015-12-16 11:54:48 -05:00
Grzegorz Bizon 32d83ee79f Merge branch 'master' into ux/suppress-ci-yml-warning
* master: (24 commits)
  Fix runners admin view
  Fix migrations
  Run builds from projects with enabled CI
  Use Gitlab::Git instead of Ci::Git
  Fix last specs
  Fix specs
  Fix after column rename
  Fix errors
  Update badge
  Finishing touches
  Fix triggers tests
  Rename columns and rename migrations
  Reimplement Trigger API
  Remove ci_ prefix from all ci related things
  Add runners token
  Migrate CI::Project to Project
  Fix indentation and BuildsEmailService
  Change default values
  Enhance migrate CI emails
  Fix issue tracker service
  ...

Conflicts:
	spec/features/commits_spec.rb
2015-12-14 12:25:37 +01:00
Grzegorz Bizon b8f67c5e47 Do not display ci build status if builds enabled but no .gitlab-ci.yml
Ref #3827
2015-12-14 11:28:49 +01:00
Kamil Trzcinski c9ac38a074 Use Gitlab::Git instead of Ci::Git 2015-12-11 18:02:32 +01:00
Kamil Trzcinski 513d551c8f Fix after column rename 2015-12-11 18:02:10 +01:00
Kamil Trzcinski 64bfd9d71a Remove ci_ prefix from all ci related things 2015-12-11 18:02:09 +01:00
Kamil Trzcinski 8cdd54cc06 Add runners token 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 8fb49a4b70 Merge branch 'master' into merge-if-green
# Conflicts:
#	app/views/projects/merge_requests/widget/_heading.html.haml
#	app/views/projects/merge_requests/widget/open/_accept.html.haml
2015-12-08 22:34:03 +01:00
Douwe Maan 75486f09c4 Merge branch 'master' into zj/gitlab-ce-merge-if-green 2015-12-08 13:43:45 +01:00
Douwe Maan 3f1e72a0cc Memoize ci_yaml_file. 2015-12-08 13:06:54 +01:00
Robert Speicher d5ea93469b Add custom UrlValidator 2015-12-07 16:57:26 -05:00
Zeger-Jan van de Weg 0e96d6eb10 Merge branch 'master' into merge-if-green 2015-12-07 10:06:07 +01:00
Stan Hu 32b45493b8 Fix application settings cache not expiring after changes
cache_key is an instance method that relies on updated_at. When changes
were made, the time-dependent key was being used instead of X.application_setting.last.

Closes #3609
2015-12-04 07:11:25 -08:00
Stan Hu e55473ad68 Expire application settings from cache at startup
If a DB migration occurs, there's a chance that the application settings are
loaded from the cache and provide stale values, causing Error 500s.
This ensures that at startup the settings are always refreshed.

Closes #3643
2015-11-25 11:30:33 -08:00
Kamil Trzcinski 57e974c03b Fix 500 when using CI
- Fix for Ci::Build state machine, allowing to process builds without the project
- Forcefully update builds that didn't want to update with state machine
- Fix saving GitLabCiService as Admin Template
2015-11-23 13:51:41 +01:00
Kamil Trzcinski 8248314bc9 Don't rescue Exception, but StandardError 2015-11-19 20:17:17 +01:00
Kamil Trzcinski 0df7a32ea5 Fix tests 2015-11-19 12:09:34 +01:00
Kamil Trzcinski 2b907f61ff Commits without .gitlab-ci.yml are marked as skipped
- Save detailed error when YAML syntax
2015-11-19 12:09:34 +01:00
Zeger-Jan van de Weg 53b285c9a8 Merge branch 'master' into merge-if-green 2015-11-18 11:58:01 +01:00
Dmitriy Zaporozhets da8ca8b217 Merge branch 'annotate-models' into 'master'
Annotate models

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

See merge request !1799
2015-11-14 08:27:12 +00:00
Dmitriy Zaporozhets a237999f00 Annotate models
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-13 19:22:46 +01:00
Kamil Trzcinski e53a56acea Fix broken tests 2015-11-13 10:52:50 +01:00
Dmitriy Zaporozhets 37465f44b4 Merge pull request #9825 from huacnlee/cache-application-setting
Add caching for ApplicationSetting, Ci::ApplicationSetting.
2015-11-13 10:15:52 +01:00
Jason Lee 2e4a673cbc Add caching for ApplicationSetting, Ci::ApplicationSetting.
ApplicationSetting.current was called in every pages, cache it and expires it after it updated.

This changes will avoid a SQL query in every pages (~0.3 - 0.5ms).

```SQL
SELECT  "application_settings".* FROM "application_settings"   ORDER BY "application_settings"."id" DESC LIMIT 1
```
2015-11-12 17:19:03 +08:00
Kamil Trzcinski d0e3e823a2 Implement Build Artifacts
- Offloads uploading to GitLab Workhorse
- Use /authorize request for fast uploading
- Added backup recipes for artifacts
- Support download acceleration using X-Sendfile
2015-11-10 12:51:50 +01:00
Kamil Trzcinski ba68facf8d CI details cleanup
- Add page titles to CI settings.
- Fix CI admin navigation.
- Remove duplicated scope.
- Use monospace font for commit sha.
- Add page title and header title to build page.
- Proper authorization for cancel/retry builds.
- Use gitlab pagination theme for builds and group members.
- Don't paginate builds widget on build page.
- Add badges to commit page Changes/Builds tabs.
- Add "Builds" to commit Builds tab page title.
- Add and use Ci::Build#retryable? method.
- Add CI::Build#retried? method.
- Allow all failed commit builds to be retried.
- Proper authorization for cancel/retry all builds.
- Remove unused param.
- Use time_ago_with_tooltip where appropriate.
- Tweak builds index text
- Remove duplication between builds/build and commit_statuses/commit_status.
- Use POST rather than GET for canceling and retrying builds.
- Remove redundant URL helpers.
- Add build ID to build page.
- Link branch name on build page.
- Move commit/:sha/ci to commit/:sha/builds.
2015-11-05 15:24:27 +01:00
Zeger-Jan van de Weg 77f8a1e392 Merge when build succeeds 2015-11-02 17:27:38 +01:00
Kamil Trzcinski c03da1caad Extend yml syntax for only and except to support specifying repository path 2015-11-02 14:44:06 +01:00
Robert Speicher 2b1636a320 Merge branch 'fix-ci-badge' into 'master'
Fix CI badge

The previous code relied on having on ref stored in commit, however the ref was moved to the build.

Fixes #3104

See merge request !1690
2015-10-26 14:02:21 +00:00
Kamil Trzcinski 271ad4e354 Fix CI badge
The previous code relied on having on ref stored in commit, however the ref was moved to the build.
2015-10-26 12:23:40 +01:00
Kamil Trzcinski 6db014987d Fix specific runner visibility 2015-10-26 11:23:11 +01:00
Kamil Trzcinski f230b42f84 On CI Admin page show only projects that are present in GitLab 2015-10-23 11:45:45 +02:00
Kamil Trzcinski 0aa6061d6a Implement when syntax in .gitlab-ci.yml 2015-10-15 23:49:39 +02:00
Kamil Trzciński daccc54d25 Merge branch 'builds-view' into 'master'
Added builds view

![Screen_Shot_2015-10-13_at_19.02.48](https://gitlab.com/gitlab-org/gitlab-ce/uploads/95bb3a7d9d603678fdd077558637045d/Screen_Shot_2015-10-13_at_19.02.48.png)

/cc @dzaporozhets @vsizov 


See merge request !1593
2015-10-15 11:35:57 +00:00
Kamil Trzciński a3a80eac11 Merge branch 'show_pending_warning' into 'master'
Show warning when build is pending and there are not runners

This change is based on: !1530.

This resolves #2967.



See merge request !1573
2015-10-14 18:57:05 +00:00
Kamil Trzcinski d9ece71ef0 Fix specs 2015-10-14 17:38:26 +02:00
Kamil Trzcinski 7af4f5215e Show warning if build doesn't have runners with specified tags or runners didn't connect recently
Slightly refactor runner status detection: moving it to Runner class

Signed-off-by: Kamil Trzcinski <ayufan@ayufan.eu>
2015-10-14 17:29:18 +02:00
Kamil Trzcinski 09255eecd0 Remove ordering from :ci_commits relation 2015-10-14 17:28:38 +02:00