Commit Graph

931 Commits

Author SHA1 Message Date
drew cimino 42d6d3187f preventing blocked users and their PipelineSchdules from creating new Pipelines
updated several specs and factories to accomodate new permissions
2019-06-04 20:25:26 -05:00
drew cimino cfaac75322 && and || operators for CI Pipeline expressions.
Refactored regex pattern matching to eagerly return tokens

Packaged behind a default-enabled feature flag and added operator documentation.
2019-06-04 19:03:24 -05:00
Yorick Peterse 6cb750a2bb
Merge dev.gitlab.org master into GitLab.com master 2019-06-03 14:56:33 +02:00
Francisco Javier López 7eafe90b90
Fix port validations in .gitlab-webide.yml 2019-06-01 12:37:29 +02:00
Douwe Maan a9bcddee4c Protect Gitlab::HTTP against DNS rebinding attack
Gitlab::HTTP now resolves the hostname only once, verifies the IP is not
blocked, and then uses the same IP to perform the actual request, while
passing the original hostname in the `Host` header and SSL SNI field.
2019-05-30 10:47:31 -03:00
Thong Kuah f0efa2f91f Stop emitting AUTO_DEVOPS_DOMAIN Ci variable
Update documentation to reflect removal
2019-05-24 14:40:12 +12:00
Fabio Pitino c75b8ad4da Remove workaround by upgrading Fugit gem
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/58241
* Upgrade Fugit gem to 1.2.1 which recognizes cron expressions
for invalid days
* Reverted previously implemented workaround
* Leave test case which previously exposed the bug
2019-05-07 08:07:16 +01:00
Fabio Pitino 673ea5d2ac Rescue RuntimeError when "too many loops" occur
With this workaround we temporarily prevent an
exception from Fugit gem to be raised in
Gitlab::Ci::CronParser
2019-05-07 08:06:49 +01:00
Fabio Pitino 0edd1e6714 Write test that exposes bug with Fugit gem 2019-05-07 07:46:07 +01:00
Mayra Cabrera 89132bbdd6 Add gitlab-managed option to clusters form
When this option is enabled, GitLab will create namespaces and service
accounts as usual. When disabled, GitLab wont create any project
specific kubernetes resources

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56557
2019-05-03 01:05:53 +00:00
Mayra Cabrera 5432f5480f Adds a way to start multiple manual jobs in stage
- Adds an endpoint on PipelinesController
- Adds a service that iterates over every build in a stage and
plays it.
- Includes 'play_manual' details on EntitySerializer
- Builds a new Stage state: PlayManual. An stage can take this status if
it has manual builds or an skipped, scheduled or manual status
- Includes FE modifications and specs
2019-05-02 18:27:35 +00:00
Douwe Maan 86900f0000 Merge branch '53064-bypassing-pipeline-jobs-by-canceling-the-pipeline-and-manually-running-later-jobs' into 'master'
Disable retrying cancelled jobs

Closes #53064

See merge request gitlab-org/gitlab-ce!27503
2019-05-02 10:28:39 +00:00
Matija Čupić 07b5c50381
Remove variable masking feature flag 2019-04-26 15:20:47 -04:00
Kamil Trzciński 8fa1ab4c33 Support negative matches
This adds support for != and !~ operators
giving more flexibility in comparing values
2019-04-23 14:19:06 +02:00
mfluharty 6b7b07b7ec
Update specs that use retryable canceled jobs
Specs that test canceled jobs now
- expect them not to be retryable or playable
- expect them not to show retry buttons

Specs that test retryability now
- use failed status instead of canceled status
2019-04-19 14:03:53 -06:00
Kamil Trzciński a6a1afe070 Merge branch '60500-disable-jit-kubernetes-resource-creation-for-project-level-clusters' into 'master'
Disable JIT Kubernetes resource creation for project level clusters

Closes #60500

See merge request gitlab-org/gitlab-ce!27352
2019-04-17 18:41:15 +00:00
George Tsiolis 579fa8b8ec Rename CI related selectors 2019-04-16 12:57:07 +03:00
Tiger e33ecfdec3 Disable JIT resource creation for project clusters
JIT resource creation blocks deployments if a user is
self-managing their cluster, as it will fail the build
if unable to create a namespace and service account.

Using a custom namespace and service account was previously
supported for project level clusters, so we should preserve
this functionality.

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/27352
2019-04-16 13:59:37 +10:00
drew cimino b26fd49eb7 catching and cleanly reporting SSL errors in Ci::Config::External::Processor 2019-04-15 17:58:17 +01:00
Kamil Trzciński ef84f7bbe2 Un-quarantine spec 2019-04-15 12:50:47 +02:00
Sean McGivern 026896cca2 Merge branch 'require-all-templates-to-include-default-stages' into 'master'
Require all templates to use default stages

Closes #59992

See merge request gitlab-org/gitlab-ce!26954

(cherry picked from commit 39eb16aab2)

e0df05cf Require all templates to use default stages
2019-04-15 12:47:35 +02:00
Sanad Liaquat 0991dc8c82 Reduce number of rspec retries
In both e2e QA tests and unit tests, reduce the number of retires
to 2 (i.e., 1 initial and one retry)
2019-04-09 10:04:03 +00:00
Wolphin 0a4f44de83 Add environment url validation 2019-04-09 09:28:55 +00:00
Sean McGivern e32c82ed1e Revert "Merge branch 'require-all-templates-to-include-default-stages' into 'master'"
This reverts merge request !26954
2019-04-05 13:18:35 +00:00
Sean McGivern 39eb16aab2 Merge branch 'require-all-templates-to-include-default-stages' into 'master'
Require all templates to use default stages

Closes #59992

See merge request gitlab-org/gitlab-ce!26954
2019-04-05 10:18:10 +00:00
Thong Kuah 4ec16912b8 Autocorrect with RSpec/ExampleWording cop
- rewords examples starting with 'should'
- rewords examples starting with 'it'

Note: I had to manually fixup "onlies" to "only"
2019-04-05 08:43:27 +00:00
Kamil Trzciński e0df05cfbc Require all templates to use default stages
Our templates are free to override the 'stages:'.
However, they should follow the convention to always include
'build', 'test', 'deploy' which are defaults when not defined.
2019-04-05 10:13:49 +02:00
Grzegorz Bizon ff64887964 Merge branch '54506-show-error-when-namespace-svc-missing' into 'master'
Show error when namespace/svc account missing

Closes #54506

See merge request gitlab-org/gitlab-ce!26362
2019-04-05 07:05:32 +00:00
Paul 🐻 9f36097db2 fix(gitlab-ci-config): allow strings in the 'include' keyword
This fix is a followup to !24098 which introduced a validation of the
`include:` keyword of a gitlab-ci configuration file when triggered
from /ci/lint API calls.

However, there was a test case missing: the case of a single string as
value. I have added a test case for that which shows that the code was
not validating it correctly.

This commit fixes that to allow all `include:` valid inputs.
2019-04-05 06:44:33 +00:00
Kamil Trzciński 8a833c720e Allow to use untrusted Regexp via feature flag
This brings support for untrusted regexp for 'only:refs:' when
enabled via feature flag: alllow_unsafe_ruby_regexp.

This is by default disabled, and should not be used in production
2019-04-04 15:00:56 +00:00
Lucas Charles 1d88fa9c82 Include DAST as dependent CI template 2019-04-04 00:21:44 +00:00
Francisco Javier López 6ee1d8cf77 Add port section to CI Image object
In order to implement https://gitlab.com/gitlab-org/gitlab-ee/issues/10179
we need several modifications on the CI config file. We are
adding a new ports section in the default Image object.

Each of these ports will accept: number, protocol and name.

By default this new configuration will be only enabled in
the Web IDE config file.
2019-04-03 09:50:54 +00:00
Dmitriy Zaporozhets 478077747d Merge branch '47234-composable-auto-devops' into 'master'
Resolve "Composable Auto DevOps"

Closes #47234

See merge request gitlab-org/gitlab-ce!26520
2019-04-03 09:05:28 +00:00
John Jarvis 69b65a6b74 Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into jarv/dev-to-gitlab-2019-04-02 2019-04-02 10:12:32 +02:00
GitLab Release Tools Bot 3098259e90 Merge branch 'security-use-untrusted-regexp' into 'master'
Use UntrustedRegexp for CI refs matching

See merge request gitlab/gitlabhq!3005
2019-04-02 07:48:24 +00:00
Tiger 3be46bdf08 Split Security Auto DevOps jobs into templates
Container Scanning, Dependency Scanning, License Management
and SAST parts of Auto DevOps now use the preexisting templates.

Auto DevOps and the DAST job template will now use a
shared job template instead of maintaining two copies
of the job. This also allows Auto DevOps to use custom
authentication with DAST.
2019-04-02 13:31:26 +11:00
Tiger de03a8bcb4 Detailed status for builds that fail prerequisites
Create FailedUnmetPrerequisites status to allow custom
messaging for builds that were unable to be queued due
to failing to meet prerequisites (eg. failing to create
Kubernetes namespace for deployment).
2019-04-02 11:04:41 +11:00
Shinya Maeda bf639fd504 Create detached merge request pipelines
By using `refs/merge-requests/:iid/head`

ok

ok

Improve naming nicely

Add nice tests

add nice tests

fix some more

revert
2019-03-29 13:58:45 +07:00
Tiger 325d504c3c Don't recreate Kubernetes namespaces if they exist
Instead of attempting to create or update a Kubernetes
namespace on every deploy, only do so when we know it
doesn't exist yet.
2019-03-20 12:04:46 +11:00
Tiger 89b0bc04b9 Create one Kubernetes namespace for a deployment
Instead of creating a Kubernetes namespace on every
cluster related to a project, only create one on the
cluster the project is about to be deployed to.
2019-03-20 12:04:46 +11:00
Tiger 98a14a498d Add build prerequisite for Kubernetes namespaces
Builds that have deployments require Kubernetes resources
to be created before the build can be deployed. These
resources are no longer created when the cluster is
created, which allows us to only create the resources
required by each specific build.
2019-03-20 12:04:46 +11:00
Tiger 00f0d356b7 Create framework for build prerequisites
Introduces the concept of Prerequisites for a CI build.
If a build has unmet prerequisites it will go through the
:preparing state before being made available to a runner.

There are no actual prerequisites yet, so current
behaviour is unchanged.
2019-03-20 12:04:40 +11:00
Tiger 42ca9c6f0d Add :preparing status to HasStatus
Introduces a new status for builds between :created and :pending
that will be used when builds require one or more prerequisite
actions to be completed before being picked up by a runner
(such as creating Kubernetes resources before deploying).

The existing :created > :pending transition is unchanged, so
only builds that require preparation will use the :preparing
status.
2019-03-20 11:48:31 +11:00
Kamil Trzciński b22287f00f Make CI refs matching to to use UntrustedRegexp
This makes ref validation to use always `UntrustedRegexp`.
This also splits the existing RubySyntax into separate
class.
2019-03-15 14:38:28 +01:00
Stan Hu d11b112664 Merge branch 'fix/gb/fix-bridge-jobs-variables-policy' into 'master'
Fix bridge jobs only/except variables policy

Closes #58199

See merge request gitlab-org/gitlab-ce!25710
2019-03-05 22:27:22 +00:00
Grzegorz Bizon b491e3f91b Freeze abstract templates constant in specs 2019-03-04 21:09:39 +08:00
Grzegorz Bizon d9fb27f42a Make serverless template a valid abstract template 2019-03-04 21:09:38 +08:00
Grzegorz Bizon 4b0036b87e Merge branch 'allow-to-recursively-include' into 'master'
Allow to recursively expand includes

Closes #55937 and #56836

See merge request gitlab-org/gitlab-ce!24356
2019-03-04 09:06:42 +00:00
Grzegorz Bizon 9e12baea1a Add test for evaluating bridge variables policy 2019-03-02 21:04:59 +01:00
Grzegorz Bizon 981c248863 Do not raise when adding undefined variables resource 2019-03-02 15:18:14 +01:00
Kamil Trzciński c78861bc42 Allow to recursively expand includes
This change introduces a support for nesting the includes,
allowing to evaluate them in context of the target,
by properly respecting the relative inclusions and user permissions
of another projects, or templates.
2019-03-01 15:55:53 +01:00
Shinya Maeda f62dc67d26 Add suffix for merge request event
Fix

ok

Add spec

Fix

ok

Fix

Add changelog

Fix

Add memoization

a

fix
2019-03-01 22:52:38 +09:00
Matija Čupić 316889cb47
Revert "Merge branch 'revert-8baf9e5f' into 'master'"
This reverts commit f5201a816f, reversing
changes made to 48e6db0dad.
2019-02-27 12:52:53 +01:00
Grzegorz Bizon 1b10b77bab Merge branch 'include-ci-yaml' into 'master'
fix: validate 'include' keywords in gitlab-ci.yml configuration files

Closes #55863

See merge request gitlab-org/gitlab-ce!24098
2019-02-27 10:29:08 +00:00
Shinya Maeda 314062fec5 Persist source sha and target sha for merge pipelines
source_sha and target_sha are used for merge request pipelines
2019-02-27 17:12:04 +09:00
Kamil Trzciński 7b445f9b15 Revert "Merge branch '13784-simple-masking-of-protected-variables-in-logs' into 'master'"
This reverts merge request !25293
2019-02-26 17:32:23 +00:00
Matija Čupić c9125c4786 Add Maskable concern for CI variables
This adds a concern that abstracts the concept of masking a variable,
including the RegEx for validation.
2019-02-26 14:03:42 +00:00
James Fargher 2d19b1adef Move ChatOps to Core
ChatOps used to be in the Ultimate tier.
2019-02-20 21:29:48 +00:00
Paul B d3aa9feffd
tests(yaml_processor): complete test scenarios on 'include' keyword 2019-02-19 17:10:51 +01:00
Paul B e5d491d15b
tests: adding a failing unit test 2019-02-19 16:44:49 +01:00
Hiroyuki Sato 30cd8432dd Support `only: changes:` on MR pipelines 2019-02-13 10:59:34 +00:00
Douwe Maan 5ab285490a Merge branch 'feature/gb/cross-project-pipeline-trigger' into 'master'
Cross-project pipeline triggers /CE

See merge request gitlab-org/gitlab-ce!24664
2019-01-25 12:31:49 +00:00
Grzegorz Bizon 552f803283 Merge branch '40997-gitlab-pages-deploy-jobs-have-a-null-status' into 'master'
Fix empty labels for `pages:deploy` job

Closes #40997

See merge request gitlab-org/gitlab-ce!24451
2019-01-25 10:51:47 +00:00
Grzegorz Bizon 4967fe9454 Do not assigne unused attributes to CI/CD builds 2019-01-25 10:33:53 +01:00
Grzegorz Bizon 3a8b9aad69 Refactor pipeline specs and remove raise_error warning 2019-01-25 10:33:18 +01:00
Grzegorz Bizon 5d85a04927 Make it possible to fabricate CI/CD bridge jobs 2019-01-25 10:32:40 +01:00
Rémy Coutable 3a2abc1d50
Enable the Layout/ExtraSpacing cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-01-24 13:05:45 +01:00
Vladimir Shushlin 7f6e0c84f8 Treat "" as nil for external commit status description 2019-01-22 15:17:30 +03:00
Matija Čupić a2477ec2e3
Assign pipeline protected attribute in Populate
This removes the Protect pipeline chain step and assigns the protected
attribute in the Populate step instead.
2019-01-21 16:26:09 +01:00
Vladimir Shushlin ffc9fe49a1 Fix empty labels for `pages:deploy` job
Use description of GenericCommitStatus as label if provided
Fallback to core status labels if not
2019-01-21 17:16:22 +03:00
Matija Čupić 673b809775
Move assignment to protected to separate step
This moves setting the protected attribute of a pipeline to a separate
pipeline chain step in order to perform the assignment after validation.
2019-01-18 19:34:22 +01:00
Matija Čupić 09d8c77ab2
Prevent checking protected_ref? for ambiguous refs 2019-01-16 21:38:17 +01:00
Grzegorz Bizon 7b712d3598 Make default config entry value configurable
Introduce `default:` configuration entry setting that makes it possible
to configure a default value of an entry, what overrides class-level
`def self.default` value.
2019-01-15 11:18:14 +01:00
Grzegorz Bizon 0cba9bef8a Fix specs related to emtpy `except` policy config 2019-01-14 14:50:12 +01:00
Grzegorz Bizon 0ea8c236c1 Add more specs for only/except policy config entry 2019-01-14 14:41:12 +01:00
Matija Čupić ebdf9fada7
Add specs for both parallel and regular job deps 2019-01-09 16:57:11 +01:00
Grzegorz Bizon 604073ffc3 Merge branch 'include-project' into 'master'
Allow to include another project files

Closes #53903

See merge request gitlab-org/gitlab-ce!24101
2019-01-07 09:19:36 +00:00
Kamil Trzciński c4d615c9dc Allow to include files from another projects
This adds `project:, file:, ref:` specification support.
2019-01-07 09:38:05 +01:00
Grzegorz Bizon 1aa2ac13b9 Merge branch 'kamil-refactor-ci-builds-v5' into 'master'
Use BuildMetadata to store build configuration in JSONB form

See merge request gitlab-org/gitlab-ce!21499
2019-01-06 09:47:29 +00:00
Kamil Trzciński b97b85c37e Merge branch 'include-templates' into 'master'
Include templates

Closes #53445

See merge request gitlab-org/gitlab-ce!23495
2019-01-04 15:42:53 +00:00
Kamil Trzciński 0103d5be96 Add config_options|variables to BuildMetadata
These are data columns that store runtime configuration
of build needed to execute it on runner and within pipeline.

The definition of this data is that once used, and when no longer
needed (due to retry capability) they can be freely removed.

They use `jsonb` on PostgreSQL, and `text` on MySQL (due to lacking
support for json datatype on old enough version).
2019-01-04 16:38:17 +01:00
Kamil Trzciński a8c5096026 Allow to include templates
This rewrites a syntax to allow include of templates.
This also normalises the syntax used by include: feature
2019-01-04 15:22:41 +01:00
John Jarvis a74700178d Merge branch 'security-master-secret-ci-variables-exposed' into 'master'
[master] Secret CI variables can exposed by creating a tag with the same name as an existing protected branch

See merge request gitlab/gitlabhq!2596
2019-01-02 09:33:23 +00:00
Takuya Noguchi 1b87f8d763 Remove gem install bundler from Docker-based Ruby environments
bundler gem has been included in the Docker official Ruby image since 2.1.

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2019-01-01 19:27:19 +09:00
Kamil Trzciński 0165cfaa07 Re-define default only except policy 2018-12-13 10:39:55 +00:00
Gilbert Roulot e6226e8cb3 Generalise test compare service
It adds a base class for CompareTestReportsService
containing common code with CompareLicenseManagementReportsService
which is present in GitLab Enterprise Edition.
2018-12-11 11:39:22 +01:00
Matija Čupić a1be580979
Implement Command#ambiguous_ref? 2018-12-08 19:28:56 +01:00
Matija Čupić b6c8d3ac9f
Reintroduce Command#protected_ref? 2018-12-08 19:28:54 +01:00
Matija Čupić ce14c20a82
Avoid using magic variable in spec 2018-12-08 19:28:34 +01:00
Matija Čupić 2edc02143b
Prevent creating pipelines with ambiguous refs 2018-12-08 19:28:33 +01:00
Shinya Maeda e62bfc7817 Merge request pipelines 2018-12-05 15:57:52 +09:00
Shinya Maeda ad957a3f42 Define the default value for only/except policies
Currently, if a job does not have only/except policies, the policy is considered as an unspecified state, and therefore the job is executed regardless of how it's executed and which branch/tags are targetted.
Ideally, this should be specified as only: ['branches', 'tags'], as it indicates that unspecified policy jobs are meant to run on any git references.
2018-12-05 00:11:48 +09:00
Kamil Trzciński 64b1044e7a ci/config: generalize Config validation into Gitlab::Config:: module
This decouples Ci::Config to provide a common interface for handling
user configuration files.
2018-11-29 16:09:18 +01:00
Stan Hu 6c83c2d8b9 Merge branch 'lock-trace-writes' into 'master'
Lock writes to trace stream

Closes #51502

See merge request gitlab-org/gitlab-ce!23332
2018-11-27 20:56:40 +00:00
Kamil Trzciński 31a1ce2132 Lock writes to trace stream 2018-11-27 17:55:20 +01:00
Stan Hu deaf3af7e5 Merge branch 'fix-deadlock-chunked-io' into 'master'
Fix deadlock on ChunkedIO

See merge request gitlab-org/gitlab-ce!23329
2018-11-26 21:16:40 +00:00
Kamil Trzciński c150772edb Fix deadlock on ChunkedIO 2018-11-26 13:15:46 +01:00
Kamil Trzciński 56a01151d5 Allow to store null variables 2018-11-23 15:20:07 +01:00
Takuya Noguchi e902f462c2 Eliminate duplicated words
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2018-11-22 01:01:23 +09:00
Sean McGivern 69f74582aa Merge branch 'improve-variables-support' into 'master'
Improve variables support

See merge request gitlab-org/gitlab-ce!23077
2018-11-19 15:57:53 +00:00
Kamil Trzciński c3bd3bfc6e Improve variables support
This ensures that variables accept only string,
alongside also improves kubernetes_namespace,
improving validation and default value being set.
2018-11-19 14:09:39 +01:00
Grzegorz Bizon 875bae16d0 Merge branch 'allow-to-use-glob-for-ci-changes-detection' into 'master'
Add glob for CI changes detection

See merge request gitlab-org/gitlab-ce!23128
2018-11-16 10:35:18 +00:00
Kirill Zaitsev 9bea3c0fbb Add glob for CI changes detection 2018-11-15 22:04:47 +02:00
George Tsiolis 566ba126f5 Fix typos in lib 2018-11-15 12:15:43 +02:00
Kamil Trzciński 036c9c58ba Limit parallel to 100
This prevents some of the abusive behaviors, of someone putting 100000 and creating out of memory condition easily
2018-11-08 11:58:54 +01:00
Grzegorz Bizon f323d6148b Merge branch 'max_retries_when' into 'master'
Allow to configure when to retry builds

Closes gitlab-runner#3515

See merge request gitlab-org/gitlab-ce!21758
2018-11-07 15:02:18 +00:00
Markus Doits 0c59fdaab6
fix merge conflict 2018-11-07 14:21:44 +01:00
Markus Doits 3aa85715dd
change forgotten constant in spec to match code 2018-11-07 13:05:24 +01:00
Markus Doits c68f527035
fix failing specs due to latest changes 2018-11-07 13:05:15 +01:00
Markus Doits 9818bb5618
refactoring after latest feedback 2018-11-07 13:04:43 +01:00
Markus Doits 7c5c1e9240
fix wrong retry error messages 2018-11-07 13:04:23 +01:00
Markus Doits b7ee04d456
refactor validations to a Entry::Retry class 2018-11-07 13:04:21 +01:00
Markus Doits 48f37a92be
add a test that checks that retry when values in documentation are valid 2018-11-07 13:04:03 +01:00
Markus Doits fdb5a51352
refactor for hopefully lower cognitive complexity
before:

- Method `validate_retry` has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
- Method `validate_retry_max` has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
- Method `validate_retry_when` has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
2018-11-07 13:02:56 +01:00
Markus Doits ffcc200a68
fix allowed keys validator to use correct attribute as error base? 2018-11-07 13:01:57 +01:00
Markus Doits 0db50a808d
update job config validator to validate new retry syntax 2018-11-07 13:01:53 +01:00
Matija Čupić 126fbe580f
Return untouched hash if no job is parallelized 2018-11-07 13:01:33 +01:00
Grzegorz Bizon 6f6cd4f43d Merge branch '21480-parallel-job-keyword-mvc' into 'master'
Resolve "`parallel` job keyword MVC"

Closes #21480

See merge request gitlab-org/gitlab-ce!22631
2018-11-07 10:38:05 +00:00
Winnie Hellmann 390abbf054 Add placeholder for remaining time in delayed job tooltips 2018-11-07 10:00:25 +01:00
Matija Čupić 7366c319df
Add additional specs for Normalizer 2018-11-06 18:56:06 +01:00
Matija Čupić 4ba960c17d
Use instance based approach for Normalizer 2018-11-06 18:35:44 +01:00
Matija Čupić f48261a409
Refactor Normalizer specs 2018-11-06 18:23:45 +01:00
Kamil Trzciński e65162842c Fix invalid artifact path for codequality 2018-11-05 17:32:03 +01:00
Matija Čupić 4b2b154c4e
Refactor Gitlab::Ci::Config::Normalizer
Use Hash#each_with_object to manipulate job hashes.
2018-11-05 15:53:37 +01:00
Matija Čupić 5fd8933d97
Use instance based approach for Normalizer 2018-11-05 14:36:52 +01:00
Matija Čupić 8a6a312db8
Make Rubocop and Danger happy 2018-11-02 14:20:27 +01:00
Matija Čupić 73e17446ef
Move parallelized node index to job options 2018-11-01 16:18:27 +01:00
Matija Čupić 77715e47d6
Add Normalizer specs 2018-11-01 15:24:29 +01:00
Achilleas Pipinellis 7f47e13218 Merge branch 'gt-update-typos-in-comments-and-specs' into 'master'
Fix typos in comments and specs

See merge request gitlab-org/gitlab-ce!22683
2018-11-01 10:34:23 +00:00
George Tsiolis 733ae94921 Fix typos in comments and specs 2018-11-01 08:59:20 +02:00
Matija Čupić 56a08d233f
Parallelize jobs in Gitlab::Ci::YamlProcessor 2018-11-01 01:05:42 +01:00
Matija Čupić 94923328fd
Revert Seed based parallelization implementation
Revert "Add Build seed specs"

This reverts commit 03bc722ea1.

Revert "Add build specs"

This reverts commit c2d49565cf.

Revert "Refactor parallelization implementation"

This reverts commit 72430483de.

Revert "Implement POC for job parallelization"

This reverts commit 44b740f99d.
2018-10-30 15:06:00 +01:00
Marcel Amirault 14fc739c94 Renaming Secret Variables in the codebase 2018-10-30 08:49:26 +00:00
Matija Čupić 9ba72fe09a
Change minimum parallel value to 2 2018-10-27 19:06:46 +02:00
Matija Čupić 03bc722ea1
Add Build seed specs 2018-10-27 18:52:47 +02:00
Matija Čupić a12da215c9
Add YamlProcessor specs 2018-10-27 18:21:32 +02:00
Matija Čupić d9b56bc13b
Add parallel keyword to CI config 2018-10-26 22:02:18 +02:00
Grzegorz Bizon 708875ae9e Merge branch 'support-license-management-and-performance' into 'master'
Support licenses and performance

See merge request gitlab-org/gitlab-ce!22175
2018-10-23 12:07:05 +00:00
Grzegorz Bizon 075bbd4cb6 Merge branch 'sh-pages-eof-error' into 'master'
Fix EOF detection with CI artifacts metadata

Closes #36954

See merge request gitlab-org/gitlab-ce!22479
2018-10-23 06:40:57 +00:00
Douwe Maan b887d106cc Merge branch 'feature/gb/improve-include-config-errors-reporting' into 'master'
Improve validation errors for external CI/CD configuration

Closes #51369

See merge request gitlab-org/gitlab-ce!22394
2018-10-22 20:11:08 +00:00
Grzegorz Bizon a91899be10 Improve specs for abstract remote `include` file 2018-10-22 12:00:11 +02:00
Grzegorz Bizon e26a30e5ce Improve error message when `include` is blocked 2018-10-22 11:57:55 +02:00
Grzegorz Bizon fdcdc36eec Merge branch 'drop-allow_overflow-option-duration_in_numbers' into 'master'
Drop allow overflow option duration in numbers

Closes #52284

See merge request gitlab-org/gitlab-ce!22246
2018-10-22 08:59:16 +00:00
Kamil Trzciński bc333f38d8 Support licenses and performance
This introduces a new syntax for all licenses and performance jobs:

```yaml
job:
  reports:
    performance: performance.json
    license_management: gl-license-management-report.json
```
2018-10-22 10:20:12 +02:00
Grzegorz Bizon 44a9231d19 Merge branch 'use-raw-file-format' into 'master'
Add RAW file format which is used to store security reports

Closes gitlab-ee#7996

See merge request gitlab-org/gitlab-ce!22365
2018-10-22 08:09:40 +00:00
Shinya Maeda 1f1b3923ec Rename "scheduled" label/badge of delayed jobs to "delayed" 2018-10-19 16:28:41 +00:00
Grzegorz Bizon 380f63bf8d Improve remote CI/CD config file extension validation 2018-10-19 16:38:09 +02:00
Grzegorz Bizon 7977a20bb4 Extend error message in case of HTTP errors in `include` 2018-10-19 16:16:30 +02:00
Stan Hu 9065599e79 Add a spec that generates the metadata dynamically 2018-10-19 05:03:53 -07:00
Grzegorz Bizon 39dac14e9c Refactor `include` code and improve error reporting 2018-10-18 14:13:26 +02:00
Grzegorz Bizon e0830a748a Extract method that fetchesremote CI/CD included config 2018-10-18 11:17:42 +02:00
Grzegorz Bizon 2243f0e3de Add IncludeError exception and use it in CI config 2018-10-18 11:07:32 +02:00
Shinya Maeda fb685031d8 Fix spec 2018-10-18 15:11:12 +09:00
Grzegorz Bizon 5f502c3a82 Move external CI config class into proper namespace 2018-10-16 15:11:50 +02:00
Grzegorz Bizon 7acc6340c1 Move external CI config files into Ci class context 2018-10-16 15:04:32 +02:00
Kamil Trzciński 15cd91c71a Make all legacy security reports to use raw format
- This introduces and uses `:raw` format for all legacy reports,
  the ones that do not have yet proper parsers on Backend
- Raw format is needed to make Frontend be able to parse reports,
  without the need of decompressing,
- This also extends fixtures to seed security reports with database,
  even though parser code is part of EE
2018-10-16 13:51:49 +02:00
Shinya Maeda a9e742554f Improve spec for Gitlab::Ci::Status::Pipeline::Factory 2018-10-10 14:34:37 +09:00
Jasper Maes 043f899b2a Rails 5: fix mysql milliseconds problems in scheduled build specs 2018-10-06 14:13:13 +02:00
Shinya Maeda 7542a5d102 Merge branch 'master-ce' into scheduled-manual-jobs 2018-10-05 23:38:02 +09:00
Kamil Trzciński 84c4e920cd Merge branch 'master' into 'feature/gb/pipeline-only-except-with-modified-paths'
# Conflicts:
#   app/models/ci/pipeline.rb
2018-10-04 16:52:48 +00:00
Shinya Maeda e84230ebb6 Add limitation for start_in keyword 2018-10-04 18:59:34 +09:00
Shinya Maeda 1da4ae719a Add spec for Status::Pipeline::Scheduled 2018-10-03 15:28:17 +09:00
Shinya Maeda 5f3c1a5412 Add spec for Gitlab::Ci::Status::Build::Unschedule 2018-10-03 15:25:17 +09:00
Shinya Maeda 41fe9edcf7 Merge branch 'master-ce' into scheduled-manual-jobs 2018-10-03 10:33:33 +09:00
Matija Čupić 48c911b75e CE Resolve "Refactor code quality similar to JUnit tests" 2018-10-02 17:01:26 +00:00
Shinya Maeda 4dd70b9e1e Fix spec 2018-10-02 17:08:14 +02:00
Shinya Maeda 384da9279e Fix spec 2018-10-02 17:08:14 +02:00
Shinya Maeda 19fb42b5ca Add spec for Build::Factory 2018-10-02 17:08:13 +02:00
Shinya Maeda 9ceb61634e Add spec for YamlProcessor 2018-10-02 17:08:12 +02:00
Shinya Maeda 5e35e85acb Add spec for scheduled status 2018-10-02 17:08:12 +02:00
Shinya Maeda 5e4824d9ed Fix Status::Pipeline::Blocked spec 2018-10-02 17:08:12 +02:00
Shinya Maeda fcb77970b6 Fix Status::Build::Scheduled. Add spec for the class. 2018-10-02 17:08:12 +02:00
Shinya Maeda eee454e142 Fix validation methods in Config::Entry::Job. Added spec for that 2018-10-02 17:08:12 +02:00
Shinya Maeda 571a934f29 Fix spec. Create scheduled status entry for pipeline 2018-10-02 17:02:12 +02:00
Grzegorz Bizon c945112093 Add Gitaly integration tests for only: changes feature 2018-10-02 15:56:17 +02:00
Grzegorz Bizon b772e7f4c6 Match a dot in paths configured for only: changes 2018-10-02 15:04:32 +02:00
Grzegorz Bizon 0f78ceca1b Add only/except pipeline build policy for `changes` 2018-10-02 14:48:18 +02:00
Grzegorz Bizon 740ee583b3 Make it possible to specifiy only: changes keywords 2018-10-02 14:03:20 +02:00
Olivier Gonzalez cfedc0a9f4 Extend reports to support security features 2018-09-27 21:15:08 +00:00
Dylan Griffith f5f5d6ea1f Resolve "Un-vendor CI templates" 2018-09-26 15:39:27 +00:00
Matija Čupić b470f975e1
Add missing frozen string literal comments 2018-09-11 16:26:57 +02:00
Matija Čupić 5b2c873cfd
Fix references to ee .gitlab-ci.yml spec fixtures 2018-09-08 22:37:47 +02:00
Matija Čupić df16969c24
Reconcile differences in lib/gitlab/ci 2018-09-08 14:55:36 +02:00
Matija Čupić 5e0ce238d2
Reconcile differences in lib/gitlab/ci/external 2018-09-08 14:09:26 +02:00
Matija Čupić 797046e358
Reconcile differences in lib/gitlab/ci/external/file 2018-09-08 12:09:14 +02:00
Matija Čupić 6a8133b943
Stub http request on specs intead of mocking HTTParty
CE mirror of bb2a9fde8e6a4d1df13638fe336f641b9c72ef59
2018-09-07 22:37:37 +02:00
Matija Čupić 1e816a9721
Address MR suggestions
CE mirror of c4578b951e331fe8c75cd4f948ce74cec6587bad
2018-09-07 22:22:52 +02:00
Matija Čupić 3149b5cfea
Improve external architecture
CE mirror of 4f17c7b2c30188302e6a73421acbf5a09fb2c823
2018-09-07 22:03:05 +02:00
Matija Čupić 1a53f017b4
Make Repository#blob_data_at public
CE mirror of 17de13ada1a98da060802c55889489a512183cd1
2018-09-07 21:37:44 +02:00
Matija Čupić eca73d2b30
Address MR comments
CE mirror of 1269dc47b7f8d1a9913de326c9bd356d3e603663
2018-09-07 21:33:06 +02:00
Matija Čupić 95b296f8ac
Change ExternalFile to retrieve local file from repository instead of GitLab project
CE mirror of 03c6094997023d9c8875ced421a6c9ef39a4af44
2018-09-07 21:18:26 +02:00
Matija Čupić cd72189fc0
Import external files in Gitlab CI config
CE mirror of a10b777f8cb1902bba3964a4cbad2b1dd6bce785
2018-09-07 21:00:52 +02:00
Matija Čupić 5f33690ebb
Load external files in config
CE mirror of 8e03a6619be44fdaf19a6c13284ea8e51377b311
2018-09-07 20:54:27 +02:00
Matija Čupić c3e33f06c2
Build barebones for ExternalFiles libraries
CE mirror of 30ca00f17034f654403ec7cb5dc370d1e5db8152
2018-09-07 19:57:57 +02:00
Grzegorz Bizon eedebb2bac Improve specs and error messages in extendable config 2018-09-05 10:52:53 +02:00
Grzegorz Bizon 7efef550da Add unit test for `extends` in .gitlab-ci.yml 2018-09-05 10:27:21 +02:00
Grzegorz Bizon b83fa58f06 Improve extended CI/CD config error messages 2018-09-05 10:19:35 +02:00
Grzegorz Bizon 609cb3e0f7 Simplify classes and exceptions of extendable config 2018-09-05 10:08:12 +02:00
Grzegorz Bizon afbe5490f0 Limit extendable CI/CD config entry nesting levels 2018-09-05 09:57:36 +02:00
Grzegorz Bizon d2f46c3025 Add feature tests for CI/CD `extends` keyword 2018-09-04 14:17:01 +02:00