Commit Graph
37 Commits
Author SHA1 Message Date
Kamil TrzcinskiandRémy Coutable 858bf727bc Test dependencies defined as symbols 2016-03-23 12:55:23 +01:00
Kamil TrzcinskiandRémy Coutable 8fac12c590 Fix build dependencies, when the dependency is a string 2016-03-23 12:55:23 +01:00
Kamil Trzciński fc6ee35928 Merge branch 'feature-ci-only-except-trigger' into 'master'
CI: Add 'triggers' keyword to 'only' and 'except' lists to allow control over when triggers cause builds to run

Currently, the `only` and `except` keywords in `.gitlab-ci.yml` only accept ref names or the special `branches` and `tags` keywords. However, these are primarily useful when controlling how repository activity affects the creation of builds. In my case, instead of building on every commit, I'd like to use the following logic:

- If the repository is tagged, do a build.
- Any other normal commits should not cause a build.
- If a build is triggered via the API, always create one for the specified ref.

From what I can tell, this isn't possible via the existing YAML syntax. In this MR, I introduce a new keyword `triggers` that goes along with `branches` and `tags`. I can implement the logic above using the following job configuration:

```yaml
only:
  - tags
  - triggers
```

I updated the tests and documentation to reflect this and everything seems to pass.

See merge request !3230
2016-03-22 09:42:40 +00:00
Geoffrey Lalonde 4117c815df adjusted behavior so canceled builds tagged as allowed to fail do not fail build 2016-03-17 07:55:10 -07:00
Jason Roehm 6c1badbd10 add tests for only/except 'triggers' keyword 2016-03-15 09:35:38 -04:00
Kamil Trzcinski 388f69b0de Merge remote-tracking branch 'origin/master' into gitlab-ci-yaml-updates
# Conflicts:
#	spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
2016-03-11 14:22:49 +01:00
Kamil Trzcinski 9a271d8012 Allow to define on which builds the current one depends on 2016-03-11 14:15:13 +01:00
Kamil Trzcinski d300ecf8d9 Allow to pass name of created artifacts archive in .gitlab-ci.yml 2016-03-11 13:43:57 +01:00
Kamil Trzcinski ad4d3a075f Describe special YAML features: the use of anchors and hidden jobs 2016-03-11 13:41:05 +01:00
Pascal Bach 344d6e6f89 Support YAML alias/anchor usage in .gitlab-ci.yml
This allows to reuse one job as a template for another one:

```
job1: &JOBTMPL
  script: execute-script-for-job

job2: *JOBTMPL

```

This also helps to solve some of the issues in #342

Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Fabio Huser <fabio.huser@siemens.com>
2016-03-08 08:49:32 +01:00
Grzegorz Bizon c8b4c874d7 Extend specs for summary build status
Additional specs cover a case when one of the builds is running but
allowed to fail. Previous implementation returned `running` status,
which is wrong. This behavior has been changed in 8.5, this commit adds
missing specs.
2016-02-20 16:35:29 +01:00
Kamil Trzcinski aa812dbfcc Fix missing ignored? for GenericCommitStatus 2016-02-19 19:58:43 +01:00
Grzegorz Bizon 8114786665 Fix builds scheduler when first build is allowed to fail
Before this fix when there was only one relevant, previous build and it
failed, but was allowed to fail, entire build had been marked as
skipped.

Closes #3192
2016-02-18 11:50:11 +01:00
Grzegorz Bizon 0ae7c95453 Add specs for build status helper class 2016-02-18 10:52:57 +01:00
Kamil Trzcinski c45a6bf3ba Added cache:key to .gitlab-ci.yml allowing to fine tune the caching 2016-01-20 23:12:48 +01:00
Sytse Sijbrandij 4465e2eca0 Fix spelling mistake, thanks Connor. 2015-12-28 17:08:15 +01:00
Douwe Maan 50f8366a89 Merge branch 'complexity/rubocop-metrics' into 'master'
Enable rubocop metrics

This enables rubocop metrics like CyclomaticComplexity and ABCSize.
Initial threshold values are high, should be probably decreased.

See merge request !1802
2015-12-11 15:06:31 +00:00
Douwe Maan 13d6bab177 Tag lib specs 2015-12-09 11:55:42 +01:00
Grzegorz Bizon 652de0b820 Refactor CI YAML processor's validators 2015-12-08 08:43:09 +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
Kamil Trzcinski 58074ab7da Allow to define cache in .gitlab-ci.yml 2015-11-10 23:01:11 +01:00
Kamil Trzcinski 97f58bae87 Change artifacts syntax to allow uploading untracked files 2015-11-10 12:51:50 +01: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 fe34b745e7 Fix tests 2015-11-03 11:05:54 +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
Kamil Trzcinski 2305483d7d Require jobs to be named 2015-10-22 10:39:00 +02:00
Kamil Trzcinski 9419046196 Fix specs 2015-10-15 23:51:45 +02:00
Kamil Trzcinski 0aa6061d6a Implement when syntax in .gitlab-ci.yml 2015-10-15 23:49:39 +02:00
Kamil Trzcinski 517815f40f Fix gitlab_ci_yaml_processor specs 2015-10-05 16:07:50 +02:00
Kamil Trzcinski d2d2df0738 Fix next round of tests 2015-10-05 13:12:00 +02:00
Kamil Trzcinski 0f3deac362 Fix tests 2015-09-29 10:47:04 +02:00
Valery Sizov b87ca7500f fix specs. Stage 7 2015-09-15 17:43:17 +03:00
Valery Sizov e2cbb36ba9 fix specs. Stage 5 2015-09-15 15:51:03 +03:00
Valery Sizov 4c53cc0eba rubocop satisfy 2015-09-14 14:37:18 +03:00
Dmitriy Zaporozhets ae5d2f5b31 Fix Ci::Ansi2html spec 2015-09-11 13:10:37 +02:00
Dmitriy Zaporozhets 90c338a495 Move helpers back to original directory 2015-09-09 14:37:34 +02:00
Dmitriy Zaporozhets cc4ef4da11 Refactor CI tests 2015-09-09 14:17:16 +02:00