Skip to content
This repository has been archived by the owner on May 17, 2022. It is now read-only.

Builder to query crossbow job's status #122

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
32 changes: 26 additions & 6 deletions ursabot/builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ class UrsabotTest(DockerBuilder):
)


class CrossbowTrigger(DockerBuilder):
class CrossbowBuilder(DockerBuilder):
tags = ['crossbow']
steps = [
GitHub(
Expand All @@ -398,7 +398,16 @@ class CrossbowTrigger(DockerBuilder):
# quite misleasing option, but it prevents checking out the branch
# set in the sourcestamp by the pull request, which refers to arrow
alwaysUseLatest=True
),
)
]
images = images.filter(
name='crossbow',
tag='worker'
)


class CrossbowTrigger(CrossbowBuilder):
steps = CrossbowBuilder.steps + [
Crossbow(
args=util.FlattenList([
'--github-token', util.Secret('ursabot/github_token'),
Expand All @@ -412,10 +421,21 @@ class CrossbowTrigger(DockerBuilder):
result_file='job.yml'
)
]
images = images.filter(
name='crossbow',
tag='worker'
)


class CrossbowStatus(CrossbowBuilder):
steps = CrossbowBuilder.steps + [
Crossbow(
args=[
'--github-token', util.Secret('ursabot/github_token'),
'status',
'--output', 'status.txt',
'--job-prefix', 'nightly',
],
workdir='arrow/dev/tasks',
result_file='status.txt'
)
]


# TODO(kszucs): properly implement it
Expand Down