Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
256de77c
Commit
256de77c
authored
Dec 01, 2021
by
Allen Cook
Committed by
Jan Provaznik
Dec 01, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "GitLab Migration - Migrate Auto DevOps"
parent
c867a760
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
73 additions
and
0 deletions
+73
-0
ee/spec/lib/ee/bulk_imports/projects/stage_spec.rb
ee/spec/lib/ee/bulk_imports/projects/stage_spec.rb
+1
-0
lib/bulk_imports/projects/pipelines/auto_devops_pipeline.rb
lib/bulk_imports/projects/pipelines/auto_devops_pipeline.rb
+15
-0
lib/bulk_imports/projects/stage.rb
lib/bulk_imports/projects/stage.rb
+4
-0
spec/lib/bulk_imports/projects/pipelines/auto_devops_pipeline_spec.rb
...k_imports/projects/pipelines/auto_devops_pipeline_spec.rb
+52
-0
spec/lib/bulk_imports/projects/stage_spec.rb
spec/lib/bulk_imports/projects/stage_spec.rb
+1
-0
No files found.
ee/spec/lib/ee/bulk_imports/projects/stage_spec.rb
View file @
256de77c
...
...
@@ -18,6 +18,7 @@ RSpec.describe BulkImports::Projects::Stage do
[
4
,
BulkImports
::
Projects
::
Pipelines
::
CiPipelinesPipeline
],
[
5
,
BulkImports
::
Common
::
Pipelines
::
WikiPipeline
],
[
5
,
BulkImports
::
Common
::
Pipelines
::
UploadsPipeline
],
[
5
,
BulkImports
::
Projects
::
Pipelines
::
AutoDevopsPipeline
],
[
6
,
BulkImports
::
Common
::
Pipelines
::
EntityFinisher
]
]
end
...
...
lib/bulk_imports/projects/pipelines/auto_devops_pipeline.rb
0 → 100644
View file @
256de77c
# frozen_string_literal: true
module
BulkImports
module
Projects
module
Pipelines
class
AutoDevopsPipeline
include
NdjsonPipeline
relation_name
'auto_devops'
extractor
::
BulkImports
::
Common
::
Extractors
::
NdjsonExtractor
,
relation:
relation
end
end
end
end
lib/bulk_imports/projects/stage.rb
View file @
256de77c
...
...
@@ -55,6 +55,10 @@ module BulkImports
pipeline:
BulkImports
::
Common
::
Pipelines
::
UploadsPipeline
,
stage:
5
},
auto_devops:
{
pipeline:
BulkImports
::
Projects
::
Pipelines
::
AutoDevopsPipeline
,
stage:
5
},
finisher:
{
pipeline:
BulkImports
::
Common
::
Pipelines
::
EntityFinisher
,
stage:
6
...
...
spec/lib/bulk_imports/projects/pipelines/auto_devops_pipeline_spec.rb
0 → 100644
View file @
256de77c
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
BulkImports
::
Projects
::
Pipelines
::
AutoDevopsPipeline
do
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:group
)
{
create
(
:group
)
}
let_it_be
(
:project
)
{
create
(
:project
,
group:
group
)
}
let_it_be
(
:bulk_import
)
{
create
(
:bulk_import
,
user:
user
)
}
let_it_be
(
:entity
)
do
create
(
:bulk_import_entity
,
:project_entity
,
project:
project
,
bulk_import:
bulk_import
,
source_full_path:
'source/full/path'
,
destination_name:
'My Destination Project'
,
destination_namespace:
group
.
full_path
)
end
let_it_be
(
:tracker
)
{
create
(
:bulk_import_tracker
,
entity:
entity
)
}
let_it_be
(
:context
)
{
BulkImports
::
Pipeline
::
Context
.
new
(
tracker
)
}
let
(
:auto_devops
)
do
{
'created_at'
=>
'2016-06-13T15:02:47.967Z'
,
'updated_at'
=>
'2016-06-14T15:02:47.967Z'
,
'enabled'
=>
true
,
'deploy_strategy'
=>
'continuous'
}
end
subject
(
:pipeline
)
{
described_class
.
new
(
context
)
}
describe
'#run'
do
it
'imports auto devops options into destination project'
do
group
.
add_owner
(
user
)
allow_next_instance_of
(
BulkImports
::
Common
::
Extractors
::
NdjsonExtractor
)
do
|
extractor
|
allow
(
extractor
).
to
receive
(
:extract
).
and_return
(
BulkImports
::
Pipeline
::
ExtractedData
.
new
(
data:
[
auto_devops
]))
end
pipeline
.
run
expect
(
project
.
auto_devops
.
enabled
).
to
be_truthy
expect
(
project
.
auto_devops
.
deploy_strategy
).
to
eq
(
'continuous'
)
expect
(
project
.
auto_devops
.
created_at
).
to
eq
(
'2016-06-13T15:02:47.967Z'
)
expect
(
project
.
auto_devops
.
updated_at
).
to
eq
(
'2016-06-14T15:02:47.967Z'
)
end
end
end
spec/lib/bulk_imports/projects/stage_spec.rb
View file @
256de77c
...
...
@@ -17,6 +17,7 @@ RSpec.describe BulkImports::Projects::Stage do
[
4
,
BulkImports
::
Projects
::
Pipelines
::
CiPipelinesPipeline
],
[
5
,
BulkImports
::
Common
::
Pipelines
::
WikiPipeline
],
[
5
,
BulkImports
::
Common
::
Pipelines
::
UploadsPipeline
],
[
5
,
BulkImports
::
Projects
::
Pipelines
::
AutoDevopsPipeline
],
[
6
,
BulkImports
::
Common
::
Pipelines
::
EntityFinisher
]
]
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment