Commit a579b8af authored by 🤖 GitLab Bot 🤖's avatar 🤖 GitLab Bot 🤖

Merge branch 'ce-to-ee-2018-11-12' into 'master'

CE upstream - 2018-11-12 20:21 UTC

Closes gitlab-ce#53180 and #8397

See merge request gitlab-org/gitlab-ee!8411
parents d1dff7de 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
---
title: Do not reload self on hooks when creating deployment
merge_request:
author:
type: fixed
---
title: Make sure there's only one slash as path separator
merge_request: 22954
author:
type: other
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment