BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
cdcc196c
Commit
cdcc196c
authored
Aug 26, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make it possible to access deployment details from pipeline
parent
5ce9e03f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
pipeline.rb
app/models/ci/pipeline.rb
+1
-0
pipeline_spec.rb
spec/models/ci/pipeline_spec.rb
+8
-0
No files found.
app/models/ci/pipeline.rb
View file @
cdcc196c
...
...
@@ -31,6 +31,7 @@ module Ci
has_many
:auto_canceled_jobs
,
class_name:
'CommitStatus'
,
foreign_key:
'auto_canceled_by_id'
delegate
:id
,
to: :project
,
prefix:
true
delegate
:deployment_variables
,
to: :project
,
prefix:
true
validates
:source
,
exclusion:
{
in:
%w(unknown)
,
unless: :importing?
},
on: :create
validates
:sha
,
presence:
{
unless: :importing?
}
...
...
spec/models/ci/pipeline_spec.rb
View file @
cdcc196c
...
...
@@ -27,6 +27,14 @@ describe Ci::Pipeline, :mailer do
it
{
is_expected
.
to
respond_to
:git_author_email
}
it
{
is_expected
.
to
respond_to
:short_sha
}
describe
'#project_deployment_variables'
do
it
'delegates deployment variables to project'
do
expect
(
pipeline
)
.
to
delegate_method
(
:deployment_variables
)
.
to
(
:project
).
with_prefix
end
end
describe
'#source'
do
context
'when creating new pipeline'
do
let
(
:pipeline
)
do
...
...
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