Commit Graph

749 Commits

Author SHA1 Message Date
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
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