Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Jenkinsfile.development
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@ node {
)

stream = streams.from_branch(change.GIT_BRANCH)
streams.build_stream(stream)
if (stream != "") {
streams.build_stream(stream)
}
}
4 changes: 3 additions & 1 deletion Jenkinsfile.mechanical
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ node {

if (streams.triggered_by_push()) {
stream = streams.from_branch(change.GIT_BRANCH)
streams.build_stream(stream)
if (stream != "") {
streams.build_stream(stream)
}
} else {
// cron or manual build: build all mechanical streams
streams.mechanical.each{ streams.build_stream(it) }
Expand Down
4 changes: 3 additions & 1 deletion Jenkinsfile.production
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,7 @@ node {
)

stream = streams.from_branch(change.GIT_BRANCH)
streams.build_stream(stream)
if (stream != "") {
streams.build_stream(stream)
}
}
15 changes: 11 additions & 4 deletions streams.groovy
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
// Canonical definition of all our streams and their type.

production = ['testing', 'stable' /* , 'next' */]
development = ['testing-devel', 'next-devel']
mechanical = ['bodhi-updates' /* , 'bodhi-updates-testing', 'branched', 'rawhide' */]
development = ['testing-devel' /* , 'next-devel' */]
mechanical = [/*'bodhi-updates', 'bodhi-updates-testing', 'branched', 'rawhide' */]

all_streams = production + development + mechanical

// Maps a list of streams to a list of GitSCM branches.
def as_branches(streams) {
return streams.collect{ [name: "origin/${it}"] }
}

// Retrieves the stream name from a branch name.
// Retrieves the stream name from a branch name. Returns "" if branch doesn't
// correspond to a stream.
def from_branch(branch) {
assert branch.startsWith('origin/')
return branch['origin/'.length()..-1]
stream = branch['origin/'.length()..-1]
if (stream in all_streams) {
return stream
}
return ""
}

// Returns the default trigger for push notifications. This will trigger builds
Expand Down