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
6f80a80b
Commit
6f80a80b
authored
Nov 12, 2018
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/master' into ce-to-ee-2018-11-12
parents
296db0e0
8f60a8ba
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
7 deletions
+23
-7
app/models/concerns/deployable.rb
app/models/concerns/deployable.rb
+2
-5
changelogs/unreleased/fix-tags-for-envs.yml
changelogs/unreleased/fix-tags-for-envs.yml
+5
-0
changelogs/unreleased/sh-53180-append-path.yml
changelogs/unreleased/sh-53180-append-path.yml
+5
-0
spec/services/ci/create_pipeline_service_spec.rb
spec/services/ci/create_pipeline_service_spec.rb
+11
-2
No files found.
app/models/concerns/deployable.rb
View file @
6f80a80b
...
...
@@ -13,17 +13,14 @@ module Deployable
name:
expanded_environment_name
)
environment
.
deployments
.
create
!
(
create_deployment
!
(
project_id:
environment
.
project_id
,
environment:
environment
,
ref:
ref
,
tag:
tag
,
sha:
sha
,
user:
user
,
deployable:
self
,
on_stop:
on_stop
).
tap
do
|
_
|
self
.
reload
# Reload relationships
end
on_stop:
on_stop
)
end
end
end
changelogs/unreleased/fix-tags-for-envs.yml
0 → 100644
View file @
6f80a80b
---
title
:
Do not reload self on hooks when creating deployment
merge_request
:
author
:
type
:
fixed
changelogs/unreleased/sh-53180-append-path.yml
0 → 100644
View file @
6f80a80b
---
title
:
Make sure there's only one slash as path separator
merge_request
:
22954
author
:
type
:
other
spec/services/ci/create_pipeline_service_spec.rb
View file @
6f80a80b
...
...
@@ -387,15 +387,24 @@ describe Ci::CreatePipelineService do
context
'with environment'
do
before
do
config
=
YAML
.
dump
(
deploy:
{
environment:
{
name:
"review/$CI_COMMIT_REF_NAME"
},
script:
'ls'
})
config
=
YAML
.
dump
(
deploy:
{
environment:
{
name:
"review/$CI_COMMIT_REF_NAME"
},
script:
'ls'
,
tags:
[
'hello'
]
})
stub_ci_pipeline_yaml_file
(
config
)
end
it
'creates the environment'
do
it
'creates the environment
with tags
'
do
result
=
execute_service
expect
(
result
).
to
be_persisted
expect
(
Environment
.
find_by
(
name:
"review/master"
)).
to
be_present
expect
(
result
.
builds
.
first
.
tag_list
).
to
contain_exactly
(
'hello'
)
expect
(
result
.
builds
.
first
.
deployment
).
to
be_persisted
expect
(
result
.
builds
.
first
.
deployment
.
deployable
).
to
be_a
(
Ci
::
Build
)
end
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