Make sure that environment was created before deploying
This commit is contained in:
parent
3731ae092c
commit
4968f226a0
2 changed files with 6 additions and 0 deletions
|
@ -112,6 +112,10 @@ class Gitlab::Seeder::Pipelines
|
|||
|
||||
setup_artifacts(build)
|
||||
setup_build_log(build)
|
||||
|
||||
build.project.environments.
|
||||
find_or_create_by(name: build.expanded_environment_name)
|
||||
|
||||
build.save
|
||||
end
|
||||
end
|
||||
|
|
|
@ -78,6 +78,8 @@ module CycleAnalyticsHelpers
|
|||
end
|
||||
|
||||
def new_dummy_job(environment)
|
||||
project.environments.find_or_create_by(name: environment)
|
||||
|
||||
Ci::Build.new(
|
||||
project: project,
|
||||
user: user,
|
||||
|
|
Loading…
Reference in a new issue