Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BASH GitHub CLI version of High Resolution cases used for CI weekly tests #1869

Conversation

TerrenceMcGuinness-NOAA
Copy link
Collaborator

@TerrenceMcGuinness-NOAA TerrenceMcGuinness-NOAA commented Sep 19, 2023

Description

A BASH script using GitHub CLI is added to create a branch from develop named weekly_tests and moves the cases from $HOMEgfs/ci/cases/weekly to $HOMEgfs/ci/cases/pr and then opens a PR and labels it with CI-Hera-Ready and CI-Orion-Ready thus creating a weekly high resolution test run that can easily be launched by a cron job.

Resolves #1663

Type of change

  • New feature (adds functionality)
  • Maintenance (new CI test)

Tests Ran

  • Ran weekly_tests.sh and successfully create PR with labels and new cases in pr directory

Checklist

  • Any dependent changes have been merged and published
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing tests pass with my changes
  • I have made corresponding changes to the documentation if necessary

@TerrenceMcGuinness-NOAA TerrenceMcGuinness-NOAA added the CI/CD Issue related to CI/CD label Sep 19, 2023
ci/scripts/driver_weekly.sh Fixed Show fixed Hide fixed
ci/scripts/driver_weekly.sh Fixed Show fixed Hide fixed
ci/scripts/driver_weekly.sh Fixed Show fixed Hide fixed
ci/scripts/driver_weekly.sh Fixed Show fixed Hide fixed
ci/scripts/driver_weekly.sh Fixed Show fixed Hide fixed
ci/scripts/driver_weekly.sh Fixed Show fixed Hide fixed
ci/scripts/driver_weekly.sh Fixed Show fixed Hide fixed
@TerrenceMcGuinness-NOAA TerrenceMcGuinness-NOAA changed the title Feature/bash weekly pr ci High Resolution cases used in CI weekly tests Sep 19, 2023
@TerrenceMcGuinness-NOAA TerrenceMcGuinness-NOAA changed the title High Resolution cases used in CI weekly tests BASH GitHub version of High Resolution cases used for CI weekly tests Sep 19, 2023
@TerrenceMcGuinness-NOAA TerrenceMcGuinness-NOAA changed the title BASH GitHub version of High Resolution cases used for CI weekly tests BASH GitHub CLI version of High Resolution cases used for CI weekly tests Sep 20, 2023
Copy link
Contributor

@WalterKolczynski-NOAA WalterKolczynski-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one minor syntax issue, plus fixing the comments.

ci/scripts/driver_weekly.sh Outdated Show resolved Hide resolved
ci/scripts/driver_weekly.sh Outdated Show resolved Hide resolved
ci/scripts/driver_weekly.sh Outdated Show resolved Hide resolved
ci/scripts/driver_weekly.sh Outdated Show resolved Hide resolved
ci/scripts/driver_weekly.sh Outdated Show resolved Hide resolved
ci/scripts/driver_weekly.sh Outdated Show resolved Hide resolved
Copy link
Contributor

@aerorahul aerorahul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great.
Some minor updates to clarify the branch name and cleaning up after the script finishes.

ci/scripts/driver_weekly.sh Show resolved Hide resolved
ci/scripts/driver_weekly.sh Show resolved Hide resolved
ci/scripts/driver_weekly.sh Outdated Show resolved Hide resolved
ci/scripts/driver_weekly.sh Show resolved Hide resolved
ci/scripts/driver_weekly.sh Outdated Show resolved Hide resolved
ci/scripts/driver_weekly.sh Outdated Show resolved Hide resolved
ci/scripts/driver_weekly.sh Outdated Show resolved Hide resolved
Co-authored-by: Walter Kolczynski - NOAA <[email protected]>
Co-authored-by: Walter Kolczynski - NOAA <[email protected]>
Co-authored-by: Walter Kolczynski - NOAA <[email protected]>
Co-authored-by: Walter Kolczynski - NOAA <[email protected]>
Co-authored-by: Walter Kolczynski - NOAA <[email protected]>
Co-authored-by: Walter Kolczynski - NOAA <[email protected]>
Copy link
Collaborator Author

@TerrenceMcGuinness-NOAA TerrenceMcGuinness-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost ready, left comment about sourcing platform env for the temp space GFS_CI_ROOT.

TerrenceMcGuinness-NOAA

This comment was marked as duplicate.


rm -Rf "${HOMEgfs_PR}/ci/cases/pr"
mv "${HOMEgfs_PR}/ci/cases/weekly" "${HOMEgfs_PR}/ci/cases/pr"
cd "${HOMEgfs_PR}" || exit 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we are already in ${HOMEgfs_PR}. There is no need to cd into it again.

do
"${GH}" pr edit --add-label "${label}"
done
rm -Rf "${develop_dir}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The script may have trouble removing this directory as it is presently in that CWD/global-workflow.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right, it should work because the shell quits on return, but yeah it's not a good idea.

move off of directory that is being removed at the end of the driver_weekly bash script
Copy link
Collaborator Author

@TerrenceMcGuinness-NOAA TerrenceMcGuinness-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated code for suggestion about deleting dir the shell is in

Copy link
Contributor

@aerorahul aerorahul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Lets get this to run weekly.

@WalterKolczynski-NOAA WalterKolczynski-NOAA merged commit d1dcad9 into NOAA-EMC:develop Sep 21, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD Issue related to CI/CD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Weekly CI cron jobs running tests on develop
4 participants