Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
9d0b65f4b8
commit
ca89460cfa
|
@ -1,22 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Mutations
|
||||
module Ci
|
||||
class Base < BaseMutation
|
||||
PipelineID = ::Types::GlobalIDType[::Ci::Pipeline]
|
||||
|
||||
argument :id, PipelineID,
|
||||
required: true,
|
||||
description: 'The ID of the pipeline to mutate'
|
||||
|
||||
private
|
||||
|
||||
def find_object(id:)
|
||||
# TODO: remove this line when the compatibility layer is removed
|
||||
# See: https://gitlab.com/gitlab-org/gitlab/-/issues/257883
|
||||
id = PipelineID.coerce_isolated_input(id)
|
||||
GlobalID::Locator.locate(id)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,24 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Mutations
|
||||
module Ci
|
||||
module Pipeline
|
||||
class Base < BaseMutation
|
||||
PipelineID = ::Types::GlobalIDType[::Ci::Pipeline]
|
||||
|
||||
argument :id, PipelineID,
|
||||
required: true,
|
||||
description: 'The ID of the pipeline to mutate.'
|
||||
|
||||
private
|
||||
|
||||
def find_object(id:)
|
||||
# TODO: remove this line when the compatibility layer is removed
|
||||
# See: https://gitlab.com/gitlab-org/gitlab/-/issues/257883
|
||||
id = PipelineID.coerce_isolated_input(id)
|
||||
GlobalID::Locator.locate(id)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,24 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Mutations
|
||||
module Ci
|
||||
module Pipeline
|
||||
class Cancel < Base
|
||||
graphql_name 'PipelineCancel'
|
||||
|
||||
authorize :update_pipeline
|
||||
|
||||
def resolve(id:)
|
||||
pipeline = authorized_find!(id: id)
|
||||
|
||||
if pipeline.cancelable?
|
||||
pipeline.cancel_running
|
||||
{ success: true, errors: [] }
|
||||
else
|
||||
{ success: false, errors: ['Pipeline is not cancelable'] }
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,24 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Mutations
|
||||
module Ci
|
||||
module Pipeline
|
||||
class Destroy < Base
|
||||
graphql_name 'PipelineDestroy'
|
||||
|
||||
authorize :destroy_pipeline
|
||||
|
||||
def resolve(id:)
|
||||
pipeline = authorized_find!(id: id)
|
||||
project = pipeline.project
|
||||
|
||||
result = ::Ci::DestroyPipelineService.new(project, current_user).execute(pipeline)
|
||||
{
|
||||
success: result.success?,
|
||||
errors: result.errors
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,29 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Mutations
|
||||
module Ci
|
||||
module Pipeline
|
||||
class Retry < Base
|
||||
graphql_name 'PipelineRetry'
|
||||
|
||||
field :pipeline,
|
||||
Types::Ci::PipelineType,
|
||||
null: true,
|
||||
description: 'The pipeline after mutation.'
|
||||
|
||||
authorize :update_pipeline
|
||||
|
||||
def resolve(id:)
|
||||
pipeline = authorized_find!(id: id)
|
||||
project = pipeline.project
|
||||
|
||||
::Ci::RetryPipelineService.new(project, current_user).execute(pipeline)
|
||||
{
|
||||
pipeline: pipeline,
|
||||
errors: errors_on_object(pipeline)
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,22 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Mutations
|
||||
module Ci
|
||||
class PipelineCancel < Base
|
||||
graphql_name 'PipelineCancel'
|
||||
|
||||
authorize :update_pipeline
|
||||
|
||||
def resolve(id:)
|
||||
pipeline = authorized_find!(id: id)
|
||||
|
||||
if pipeline.cancelable?
|
||||
pipeline.cancel_running
|
||||
{ success: true, errors: [] }
|
||||
else
|
||||
{ success: false, errors: ['Pipeline is not cancelable'] }
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,22 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Mutations
|
||||
module Ci
|
||||
class PipelineDestroy < Base
|
||||
graphql_name 'PipelineDestroy'
|
||||
|
||||
authorize :destroy_pipeline
|
||||
|
||||
def resolve(id:)
|
||||
pipeline = authorized_find!(id: id)
|
||||
project = pipeline.project
|
||||
|
||||
result = ::Ci::DestroyPipelineService.new(project, current_user).execute(pipeline)
|
||||
{
|
||||
success: result.success?,
|
||||
errors: result.errors
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,27 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Mutations
|
||||
module Ci
|
||||
class PipelineRetry < Base
|
||||
graphql_name 'PipelineRetry'
|
||||
|
||||
field :pipeline,
|
||||
Types::Ci::PipelineType,
|
||||
null: true,
|
||||
description: 'The pipeline after mutation'
|
||||
|
||||
authorize :update_pipeline
|
||||
|
||||
def resolve(id:)
|
||||
pipeline = authorized_find!(id: id)
|
||||
project = pipeline.project
|
||||
|
||||
::Ci::RetryPipelineService.new(project, current_user).execute(pipeline)
|
||||
{
|
||||
pipeline: pipeline,
|
||||
errors: errors_on_object(pipeline)
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -88,9 +88,9 @@ module Types
|
|||
mount_mutation Mutations::ContainerExpirationPolicies::Update
|
||||
mount_mutation Mutations::ContainerRepositories::Destroy
|
||||
mount_mutation Mutations::ContainerRepositories::DestroyTags
|
||||
mount_mutation Mutations::Ci::PipelineCancel
|
||||
mount_mutation Mutations::Ci::PipelineDestroy
|
||||
mount_mutation Mutations::Ci::PipelineRetry
|
||||
mount_mutation Mutations::Ci::Pipeline::Cancel
|
||||
mount_mutation Mutations::Ci::Pipeline::Destroy
|
||||
mount_mutation Mutations::Ci::Pipeline::Retry
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -16732,7 +16732,7 @@ input PipelineCancelInput {
|
|||
clientMutationId: String
|
||||
|
||||
"""
|
||||
The ID of the pipeline to mutate
|
||||
The ID of the pipeline to mutate.
|
||||
"""
|
||||
id: CiPipelineID!
|
||||
}
|
||||
|
@ -16798,7 +16798,7 @@ input PipelineDestroyInput {
|
|||
clientMutationId: String
|
||||
|
||||
"""
|
||||
The ID of the pipeline to mutate
|
||||
The ID of the pipeline to mutate.
|
||||
"""
|
||||
id: CiPipelineID!
|
||||
}
|
||||
|
@ -16860,7 +16860,7 @@ input PipelineRetryInput {
|
|||
clientMutationId: String
|
||||
|
||||
"""
|
||||
The ID of the pipeline to mutate
|
||||
The ID of the pipeline to mutate.
|
||||
"""
|
||||
id: CiPipelineID!
|
||||
}
|
||||
|
@ -16880,7 +16880,7 @@ type PipelineRetryPayload {
|
|||
errors: [String!]!
|
||||
|
||||
"""
|
||||
The pipeline after mutation
|
||||
The pipeline after mutation.
|
||||
"""
|
||||
pipeline: Pipeline
|
||||
}
|
||||
|
|
|
@ -49465,7 +49465,7 @@
|
|||
"inputFields": [
|
||||
{
|
||||
"name": "id",
|
||||
"description": "The ID of the pipeline to mutate",
|
||||
"description": "The ID of the pipeline to mutate.",
|
||||
"type": {
|
||||
"kind": "NON_NULL",
|
||||
"name": null,
|
||||
|
@ -49697,7 +49697,7 @@
|
|||
"inputFields": [
|
||||
{
|
||||
"name": "id",
|
||||
"description": "The ID of the pipeline to mutate",
|
||||
"description": "The ID of the pipeline to mutate.",
|
||||
"type": {
|
||||
"kind": "NON_NULL",
|
||||
"name": null,
|
||||
|
@ -49897,7 +49897,7 @@
|
|||
"inputFields": [
|
||||
{
|
||||
"name": "id",
|
||||
"description": "The ID of the pipeline to mutate",
|
||||
"description": "The ID of the pipeline to mutate.",
|
||||
"type": {
|
||||
"kind": "NON_NULL",
|
||||
"name": null,
|
||||
|
@ -49971,7 +49971,7 @@
|
|||
},
|
||||
{
|
||||
"name": "pipeline",
|
||||
"description": "The pipeline after mutation",
|
||||
"description": "The pipeline after mutation.",
|
||||
"args": [
|
||||
|
||||
],
|
||||
|
|
|
@ -2565,7 +2565,7 @@ Autogenerated return type of PipelineRetry.
|
|||
| ----- | ---- | ----------- |
|
||||
| `clientMutationId` | String | A unique identifier for the client performing the mutation. |
|
||||
| `errors` | String! => Array | Errors encountered during execution of the mutation. |
|
||||
| `pipeline` | Pipeline | The pipeline after mutation |
|
||||
| `pipeline` | Pipeline | The pipeline after mutation. |
|
||||
|
||||
### Project
|
||||
|
||||
|
|
|
@ -44,22 +44,21 @@ Below is a diagram of the recommended architecture.
|
|||
|
||||
## AWS costs
|
||||
|
||||
Here's a list of the AWS services we will use, with links to pricing information:
|
||||
GitLab uses the following AWS services, with links to pricing information:
|
||||
|
||||
- **EC2**: GitLab will deployed on shared hardware which means
|
||||
[on-demand pricing](https://aws.amazon.com/ec2/pricing/on-demand/)
|
||||
will apply. If you want to run it on a dedicated or reserved instance,
|
||||
consult the [EC2 pricing page](https://aws.amazon.com/ec2/pricing/) for more
|
||||
information on the cost.
|
||||
- **S3**: We will use S3 to store backups, artifacts, LFS objects, etc. See the
|
||||
[Amazon S3 pricing](https://aws.amazon.com/s3/pricing/).
|
||||
- **ELB**: A Classic Load Balancer will be used to route requests to the
|
||||
GitLab instances. See the [Amazon ELB pricing](https://aws.amazon.com/elasticloadbalancing/pricing/).
|
||||
- **RDS**: An Amazon Relational Database Service using PostgreSQL will be used. See the
|
||||
[Amazon RDS pricing](https://aws.amazon.com/rds/postgresql/pricing/).
|
||||
- **ElastiCache**: An in-memory cache environment will be used to provide a
|
||||
Redis configuration. See the
|
||||
[Amazon ElastiCache pricing](https://aws.amazon.com/elasticache/pricing/).
|
||||
- **EC2**: GitLab is deployed on shared hardware, for which
|
||||
[on-demand pricing](https://aws.amazon.com/ec2/pricing/on-demand/) applies.
|
||||
If you want to run GitLab on a dedicated or reserved instance, see the
|
||||
[EC2 pricing page](https://aws.amazon.com/ec2/pricing/) for information about
|
||||
its cost.
|
||||
- **S3**: GitLab uses S3 ([pricing page](https://aws.amazon.com/s3/pricing/)) to
|
||||
store backups, artifacts, and LFS objects.
|
||||
- **ELB**: A Classic Load Balancer ([pricing page](https://aws.amazon.com/elasticloadbalancing/pricing/)),
|
||||
used to route requests to the GitLab instances.
|
||||
- **RDS**: An Amazon Relational Database Service using PostgreSQL
|
||||
([pricing page](https://aws.amazon.com/rds/postgresql/pricing/)).
|
||||
- **ElastiCache**: An in-memory cache environment ([pricing page](https://aws.amazon.com/elasticache/pricing/)),
|
||||
used to provide a Redis configuration.
|
||||
|
||||
## Create an IAM EC2 instance role and profile
|
||||
|
||||
|
|
Loading…
Reference in New Issue