Commit Graph

123 Commits

Author SHA1 Message Date
GitLab Bot 921173681c Add latest changes from gitlab-org/gitlab@master 2021-03-10 09:09:29 +00:00
GitLab Bot eb1755b2d9 Add latest changes from gitlab-org/gitlab@master 2021-03-02 21:11:07 +00:00
GitLab Bot 76215aab04 Add latest changes from gitlab-org/gitlab@master 2021-01-26 00:08:57 +00:00
GitLab Bot 899bb5c4a9 Add latest changes from gitlab-org/gitlab@master 2021-01-25 18:09:03 +00:00
GitLab Bot e32167eb63 Add latest changes from gitlab-org/gitlab@master 2020-12-15 21:09:53 +00:00
GitLab Bot 15ea3fec22 Add latest changes from gitlab-org/gitlab@master 2020-11-23 12:09:11 +00:00
GitLab Bot b9033ad415 Add latest changes from gitlab-org/gitlab@master 2020-11-16 21:09:02 +00:00
GitLab Bot f4182abcb6 Add latest changes from gitlab-org/gitlab@master 2020-11-12 18:09:26 +00:00
GitLab Bot 9e68395a98 Add latest changes from gitlab-org/gitlab@master 2020-08-21 12:10:22 +00:00
GitLab Bot 61d62a2960 Add latest changes from gitlab-org/gitlab@master 2020-08-07 15:10:17 +00:00
GitLab Bot 5958e399de Add latest changes from gitlab-org/gitlab@master 2020-08-07 12:09:59 +00:00
GitLab Bot 14497073dc Add latest changes from gitlab-org/gitlab@master 2020-08-05 00:09:52 +00:00
GitLab Bot 3ce55b46df Add latest changes from gitlab-org/gitlab@master 2020-07-22 18:09:27 +00:00
GitLab Bot bf213f07c8 Add latest changes from gitlab-org/gitlab@master 2020-07-20 18:09:27 +00:00
GitLab Bot 4c5468b408 Add latest changes from gitlab-org/gitlab@master 2020-06-24 15:08:50 +00:00
GitLab Bot 5956978e1d Add latest changes from gitlab-org/gitlab@master 2020-06-22 09:08:42 +00:00
GitLab Bot 4f5c8572e9 Add latest changes from gitlab-org/gitlab@master 2020-06-16 18:09:01 +00:00
GitLab Bot 292d054661 Add latest changes from gitlab-org/gitlab@master 2020-06-16 00:08:33 +00:00
GitLab Bot 3795b229ab Add latest changes from gitlab-org/gitlab@master 2020-05-01 00:09:59 +00:00
GitLab Bot 22e60f1c61 Add latest changes from gitlab-org/gitlab@master 2020-04-22 21:10:00 +00:00
GitLab Bot 8c9dc985b9 Add latest changes from gitlab-org/gitlab@master 2020-02-12 06:09:05 +00:00
GitLab Bot f6e985dba4 Add latest changes from gitlab-org/gitlab@master 2020-01-08 06:08:13 +00:00
GitLab Bot 4eea104c69 Add latest changes from gitlab-org/gitlab@master 2019-12-11 15:07:38 +00:00
GitLab Bot ed73d4f207 Add latest changes from gitlab-org/gitlab@master 2019-12-06 03:08:02 +00:00
GitLab Bot ab7cf450ba Add latest changes from gitlab-org/gitlab@master 2019-12-03 18:06:49 +00:00
GitLab Bot 77fc73217e Add latest changes from gitlab-org/gitlab@master 2019-11-17 21:06:14 +00:00
GitLab Bot f155cc9034 Add latest changes from gitlab-org/gitlab@master 2019-10-16 03:06:12 +00:00
GitLab Bot f1a5755898 Add latest changes from gitlab-org/gitlab@master 2019-09-24 15:06:34 +00:00
GitLab Bot 6f9edd1a4c Add latest changes from gitlab-org/gitlab@master 2019-09-23 15:06:32 +00:00
drew 9458192f2b Passing job:rules downstream and E2E specs for job:rules configuration 2019-09-09 13:21:26 +00:00
dineshpanda e908e11776 Avoid calling freeze on already frozen strings in lib/gitlab 2019-09-04 09:52:02 +05:30
Tiger 9e8daeb8a6 Move generic k8s services out of GCP namespace
These services aren't specific to GCP, and will be used for AWS
as part of https://gitlab.com/gitlab-org/gitlab-ce/issues/46686
2019-08-28 13:54:32 +10:00
drew ac77bb9376 Introducing new Syntax for Ci::Build inclusion rules
- Added Gitlab::Ci::Config::Entry::Rules and Gitlab::Ci::Config::Entry::Rules:Rule
  to handle lists of Rule objects to be evalauted for job inclusion
- Added `if:` and `changes:` as available Rules::Rule::Clause classes
- Added Rules handling logic to Seed::Build#included? with extra specs
- Use DisallowedKeysValidator to mutually exclude rules: from only:/except: on job config
2019-08-20 20:03:43 +00:00
Tiger Watson 36a01a88ce Use separate Kubernetes namespaces per environment
Kubernetes deployments on new clusters will now have
a separate namespace per project environment, instead
of sharing a single namespace for the project.

Behaviour of existing clusters is unchanged.

All new functionality is controlled by the
:kubernetes_namespace_per_environment feature flag,
which is safe to enable/disable at any time.
2019-08-07 04:40:29 +00:00
Thong Kuah 4615dca1d9 Drop fallback to deployment platform
All deployments should have already their cluster_id filled in on
creation. Legacy deployments will not be retried as:-

* Ci::Build#retry calls `Ci::RetryBuildService`
* Ci::Pipeline#retry
calls `Ci::RetryPipelineService` which also calls
`Ci::RetryBuildService`
* `Ci::RetryBuildService` will clone a build to retry

It is also impossibly to backfill Deployment#cluster_id from
Project#deployment_platform correctly as clusters could have been
deleted, added or altered in the intervening time.
2019-06-27 17:28:52 +12:00
Thong Kuah 2cdb72ea03 Use deployment's cluster for kubernetes prereq
A deployment will have a cluster associated on creation if there is one.

Otherwise fallback to deployment_platform for legacy deployments.
2019-06-27 17:28:52 +12:00
Stan Hu db9783f782 Merge branch 'refactor_deployment_cluster' into 'master'
Refactor Deployment#cluster to #deployment_platform_cluster

See merge request gitlab-org/gitlab-ce!29961
2019-06-24 22:23:18 +00:00
Thong Kuah ee18ca2fa5 Rename method to not clash with #cluster
We will introduce #cluster at a later stage.
Also deprecate this method
2019-06-24 16:59:22 +12:00
Tiger 74702f0e0e Enable project-level JIT resource creation
Previously this behaviour was only available to group
and instance-level clusters, as some project clusters
relied on Kubernetes credentials being passed through
to the runner instead of having their resources managed
by GitLab (which is not available when using JIT). These
clusters have been migrated to unmanaged, so resources
can be created on demand for the remaining managed clusters.
2019-06-18 12:43:52 +10:00
Dylan Griffith ee28255b21 Refresh service_account_token for kubernetes_namespaces
There seems to be several examples where service_account_token is blank
even in GitLab.com newly created kubernetes_namespaces . We have not
figured out why they are blank but this should hopefully fix some issues
similar to https://gitlab.com/gitlab-org/gitlab-ce/issues/55362
2019-06-14 16:00:54 +10:00
Stan Hu f93b2e02a5 Run rubocop -a on CE files 2019-05-05 03:24:28 -07: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
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
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
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
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 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