This repository has been archived by the owner on Mar 24, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update concourse polling url, since the API changed
- Loading branch information
Gregg Van Hove and Robert Neumann
committed
Aug 5, 2015
1 parent
600494c
commit 29c1406
Showing
8 changed files
with
23 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
class ConcourseProject < Project | ||
|
||
validates_presence_of :ci_build_identifier, :ci_base_url | ||
validates_presence_of :ci_build_identifier, :ci_base_url, :concourse_pipeline_name | ||
|
||
alias_attribute :build_status_url, :feed_url | ||
|
||
def feed_url | ||
"#{ci_base_url}/api/v1/jobs/#{ci_build_identifier}/builds" | ||
"#{ci_base_url}/api/v1/pipelines/#{concourse_pipeline_name}/jobs/#{ci_build_identifier}/builds" | ||
end | ||
|
||
def fetch_payload | ||
ConcoursePayload.new("#{ci_base_url}/jobs/#{ci_build_identifier}/builds") | ||
ConcoursePayload.new(feed_url) | ||
end | ||
|
||
def self.project_specific_attributes | ||
['concourse_pipeline_name', 'ci_build_identifier', 'ci_base_url'] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
db/migrate/20150805184958_add_concourse_pipeline_name_to_projects.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class AddConcoursePipelineNameToProjects < ActiveRecord::Migration | ||
def change | ||
add_column :projects, :concourse_pipeline_name, :string | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters