Skip to content

Commit

Permalink
Make job number argument optional
Browse files Browse the repository at this point in the history
Only "needed" from Jenkins. When not in Jenkins, avoid making the caller
pass zero.  If we need the names differentiated per-build, we'll have to
figure out something else to pass (and then renaming the option may make
more sense).

Signed-off-by: Samuel E. Browne <[email protected]>
  • Loading branch information
sebrowne committed Sep 3, 2024
1 parent 22fd8f5 commit 7b8ca19
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/AT2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ jobs:
--target-branch-name ${{ github.event.pull_request.base.ref }} \
--genconfig-build-name rhel8_gcc-openmpi_debug_shared_no-kokkos-arch_no-asan_complex_no-fpic_mpi_no-pt_no-rdc_no-uvm_deprecated-on_no-package-enables \
--pullrequest-number ${{ github.event.pull_request.number }} \
--jenkins-job-number 0 \
--pullrequest-env-config-file ${GITHUB_WORKSPACE}/packages/framework/pr_tools/trilinos_pr.ini \
--pullrequest-gen-config-file ${GITHUB_WORKSPACE}/packages/framework/GenConfig/src/gen-config.ini \
--workspace-dir /home/runner/_work/Trilinos \
Expand Down Expand Up @@ -153,7 +152,6 @@ jobs:
--target-branch-name ${{ github.event.pull_request.base.ref }} \
--genconfig-build-name rhel8_gcc-serial_release-debug_shared_no-kokkos-arch_no-asan_no-complex_no-fpic_no-mpi_no-pt_no-rdc_no-uvm_deprecated-on_no-package-enables \
--pullrequest-number ${{ github.event.pull_request.number }} \
--jenkins-job-number 0 \
--pullrequest-env-config-file ${GITHUB_WORKSPACE}/packages/framework/pr_tools/trilinos_pr.ini \
--pullrequest-gen-config-file ${GITHUB_WORKSPACE}/packages/framework/GenConfig/src/gen-config.ini \
--workspace-dir /home/runner/_work/Trilinos \
Expand Down Expand Up @@ -226,7 +224,6 @@ jobs:
--target-branch-name ${{ github.event.pull_request.base.ref }} \
--genconfig-build-name rhel8_cuda-gcc-openmpi_release_static_Ampere80_no-asan_complex_no-fpic_mpi_pt_no-rdc_uvm_deprecated-on_no-package-enables \
--pullrequest-number ${{ github.event.pull_request.number }} \
--jenkins-job-number 0 \
--pullrequest-env-config-file ${GITHUB_WORKSPACE}/packages/framework/pr_tools/trilinos_pr.ini \
--pullrequest-gen-config-file ${GITHUB_WORKSPACE}/packages/framework/GenConfig/src/gen-config.ini \
--workspace-dir /home/runner/_work/Trilinos \
Expand Down
3 changes: 2 additions & 1 deletion packages/framework/pr_tools/PullRequestLinuxDriverTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,9 @@ def parse_args():
required.add_argument('--jenkins-job-number',
dest="jenkins_job_number",
action='store',
default="UNKNOWN",
help='The Jenkins build number',
required=True)
required=False)

optional.add_argument('--dashboard-build-name',
dest="dashboard_build_name",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,10 +480,12 @@ def pullrequest_build_name(self):
"""
Generate the build name string to report back to CDash.
PR-<PR Number>-test-<Jenkins Job Name>-<Job Number">
PR-<PR Number>-test-<Jenkins Job Name>-<Job Number>
"""
if "Pull Request" in self.arg_pullrequest_cdash_track:
output = "PR-{}-test-{}-{}".format(self.arg_pullrequest_number, self.arg_pr_genconfig_job_name, self.arg_jenkins_job_number)
output = f"PR-{self.arg_pullrequest_number}-test-{self.arg_pr_genconfig_job_name}"
if "UNKNOWN" not in self.arg_jenkins_job_number:
output = f"{output}-{self.arg_jenkins_job_number}"
elif self.arg_dashboard_build_name != "__UNKNOWN__":
output = self.arg_dashboard_build_name
else:
Expand Down

0 comments on commit 7b8ca19

Please sign in to comment.