Skip to content

Commit 7ae6c53

Browse files
rcal-859 Update okify script to use GA directories on artifactory (#1282)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 0ad965c commit 7ae6c53

File tree

2 files changed

+9
-15
lines changed

2 files changed

+9
-15
lines changed

CHANGES.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Documentation
99
general
1010
-------
1111

12+
- Update okify script to use GA directory structure [#1282]
13+
1214
- pin numpy to <2 [#1275]
1315

1416
- refactor exposure level pipeline to use asn's and ModelContainer [#1271]

romancal/scripts/okify_regtests.py

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,9 @@ def parse_args():
2626
parser = ArgumentParser(description="Okify regression test results")
2727
parser.add_argument(
2828
"build_number",
29-
help="Jenkins build number for Roman builds",
29+
help="GitHub Actions build number for Roman builds",
3030
metavar="build-number",
3131
)
32-
parser.add_argument(
33-
"--job-name",
34-
help="Jenkins job name under [RT] (default: romancal)",
35-
default="romancal",
36-
metavar="job-name",
37-
)
3832
parser.add_argument(
3933
"--dry-run", action="store_true", help="pass the --dry-run flag to JFrog CLI"
4034
)
@@ -52,29 +46,28 @@ def artifactory_copy(specfile, dry_run=False):
5246
subprocess.run(args, check=True)
5347

5448

55-
def artifactory_get_breadcrumbs(build_number, job_name, suffix):
49+
def artifactory_get_breadcrumbs(build_number, suffix):
5650
"""Download specfiles or other breadcrump from Artifactory associated with
5751
a build number and return a list of their locations on the local file system
5852
5953
An example search would be:
6054
6155
jfrog rt search roman-pipeline-results/*/*_okify.json --props='build.number=540;build.name=RT :: romancal'
6256
""" # noqa: E501
63-
build_name = f"{job_name}"
6457

6558
# Retreive all the okify specfiles for failed tests.
6659
args = list(
6760
["jfrog", "rt", "dl"]
68-
+ [f"{ARTIFACTORY_REPO}/*RT-{build_name}-{build_number}*/*{suffix}"]
61+
+ [f"{ARTIFACTORY_REPO}/*_GITHUB_CI_*-{build_number}/*{suffix}"]
6962
)
7063
subprocess.run(args, check=True, capture_output=True)
7164

7265
return sorted(glob(f"**/**/*{suffix}"))
7366

7467

75-
def artifactory_get_build_artifacts(build_number, job_name):
76-
specfiles = artifactory_get_breadcrumbs(build_number, job_name, SPECFILE_SUFFIX)
77-
asdffiles = artifactory_get_breadcrumbs(build_number, job_name, RTDATA_SUFFIX)
68+
def artifactory_get_build_artifacts(build_number):
69+
specfiles = artifactory_get_breadcrumbs(build_number, SPECFILE_SUFFIX)
70+
asdffiles = artifactory_get_breadcrumbs(build_number, RTDATA_SUFFIX)
7871

7972
if len(specfiles) != len(asdffiles):
8073
raise RuntimeError("Different number of _okify.json and _rtdata.asdf files")
@@ -100,14 +93,13 @@ def main():
10093
args = parse_args()
10194

10295
build = args.build_number
103-
name = args.job_name
10496

10597
# Create and chdir to a temporary directory to store specfiles
10698
with tempfile.TemporaryDirectory() as tmpdir:
10799
print(f"Downloading test okify artifacts to local directory {tmpdir}")
108100
with pushd(tmpdir):
109101
# Retreive all the okify specfiles for failed tests.
110-
specfiles, asdffiles = artifactory_get_build_artifacts(build, name)
102+
specfiles, asdffiles = artifactory_get_build_artifacts(build)
111103

112104
number_failed_tests = len(specfiles)
113105

0 commit comments

Comments
 (0)