-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #94 from jpopelka/buildInfo
Add getBuildInfo() step
- Loading branch information
Showing
8 changed files
with
65 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# getBuildInfo() step | ||
|
||
Return information about given Koji build. | ||
|
||
## Parameters | ||
|
||
* **buildId**: integer; Koji build ID | ||
|
||
## Example Usage | ||
|
||
```groovy | ||
def buildInfo = getBuildInfo(2615024) | ||
``` |
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
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,27 @@ | ||
#!/usr/bin/groovy | ||
|
||
import org.fedoraproject.jenkins.koji.Koji | ||
|
||
|
||
/** | ||
* getBuildInfo() step. | ||
*/ | ||
def call(buildId) { | ||
def koji = new Koji(env.KOJI_API_URL) | ||
def buildInfo = koji.getBuildInfo(buildId.toInteger()) | ||
|
||
// TODO: we can do this mapping directly in BuildInfo class | ||
def buildInfoMap = [ | ||
'id': buildInfo.id, | ||
'nvr': buildInfo.nvr | ||
'name': buildInfo.name, | ||
'packageName': buildInfo.packageName, | ||
'version': buildInfo.version, | ||
'release': buildInfo.release, | ||
'ownerName': buildInfo.ownerName, | ||
'taskId': buildInfo.taskId, | ||
'tags': buildInfo.tags | ||
] | ||
|
||
return buildInfoMap | ||
} |
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