forked from apache/arrow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ARROW-17233: [Packaging][Linux] Update artifact patterns (apache#13740)
Add `--validate` option to `archery crossbow status`. If `--validate` is specified and there are any missing artifacts, `archery crossbow status --validate` is existed with non-zero exit code. We can use it for CI to detect missing artifacts. We can't use `@github-actions crossbow submit` for this change because this isn't merged into the master branch yet. See https://github.com/ursacomputing/crossbow/branches/all?query=build-674 that is submitted `nightly-packages` manually. Authored-by: Sutou Kouhei <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
- Loading branch information
Showing
4 changed files
with
79 additions
and
24 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 |
---|---|---|
|
@@ -675,6 +675,7 @@ def put(self, job, prefix='build', increment_job_id=True): | |
params = { | ||
**job.params, | ||
"arrow": job.target, | ||
"job": job, | ||
"queue_remote_url": self.remote_url | ||
} | ||
files = task.render_files(job.template_searchpath, params=params) | ||
|
@@ -790,7 +791,7 @@ class Task(Serializable): | |
submitting the job to a queue. | ||
""" | ||
|
||
def __init__(self, ci, template, artifacts=None, params=None): | ||
def __init__(self, name, ci, template, artifacts=None, params=None): | ||
assert ci in { | ||
'circle', | ||
'travis', | ||
|
@@ -799,6 +800,7 @@ def __init__(self, ci, template, artifacts=None, params=None): | |
'github', | ||
'drone', | ||
} | ||
self.name = name | ||
self.ci = ci | ||
self.template = template | ||
self.artifacts = artifacts or [] | ||
|
@@ -1011,6 +1013,7 @@ def render_tasks(self, params=None): | |
params = { | ||
**self.params, | ||
"arrow": self.target, | ||
"job": self, | ||
**(params or {}) | ||
} | ||
for task_name, task in self.tasks.items(): | ||
|
@@ -1081,9 +1084,10 @@ def from_config(cls, config, target, tasks=None, groups=None, params=None): | |
'no_rc_version': target.no_rc_version, | ||
'no_rc_semver_version': target.no_rc_semver_version} | ||
for task_name, task in task_definitions.items(): | ||
task = task.copy() | ||
artifacts = task.pop('artifacts', None) or [] # because of yaml | ||
artifacts = [fn.format(**versions) for fn in artifacts] | ||
tasks[task_name] = Task(artifacts=artifacts, **task) | ||
tasks[task_name] = Task(task_name, artifacts=artifacts, **task) | ||
|
||
return cls(target=target, tasks=tasks, params=params, | ||
template_searchpath=config.template_searchpath) | ||
|
@@ -1219,7 +1223,7 @@ def validate(self): | |
# validate that the tasks are constructible | ||
for task_name, task in self['tasks'].items(): | ||
try: | ||
Task(**task) | ||
Task(task_name, **task) | ||
except Exception as e: | ||
raise CrossbowError( | ||
'Unable to construct a task object from the ' | ||
|
@@ -1236,13 +1240,19 @@ def validate(self): | |
version='1.0.0dev123', | ||
email='[email protected]' | ||
) | ||
job = Job.from_config(config=self, | ||
target=target, | ||
tasks=self['tasks'], | ||
groups=self['groups'], | ||
params={}) | ||
|
||
for task_name, task in self['tasks'].items(): | ||
task = Task(**task) | ||
task = Task(task_name, **task) | ||
files = task.render_files( | ||
self.template_searchpath, | ||
params=dict( | ||
arrow=target, | ||
job=job, | ||
queue_remote_url='https://github.com/org/crossbow' | ||
) | ||
) | ||
|
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