-
Notifications
You must be signed in to change notification settings - Fork 60
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
gitlab-ci: Adds (command-line) tool to simplify .gitlab-ci.yml #226
Conversation
- Adds `.gitlab/pipeline-ci-tool.sh` to enact most of the stages of the gitlab CI pipeline - enables interactive/command-line reproduction of the pipeline - `.gitlab/pipeline-ci-tool.sh` is documented in .gitlab/README.md with instructions on how to use at the command line and what each function is doing - All commands formerly in .gitlab-ci.yml are now one-line invocations of `.gitlab/pipeline-ci-tool.sh` so .gitlab-ci.yml is now considerably smaller and easier to read with statements like `.gitlab/pipeline-ci-tool.sh mrs-compile debug_gnu` or `.gitlab/pipeline-ci-tool.sh check-params gnu` - Previously, all results were compared again the stored regression answers. This meant that any error (e.g. layout) would show up as a fail of all types. We use the regression answers to check the repro-symmetric mode and then compare everything else to repro-symmetric or other results as appropriate. This allows us to distinguish between types of errors. The GH actions are doing it this way, and we originally did this in the first forms of the pipeline, but in the last re-factor I lazily switched to using the regression answers for everything.
Codecov Report
@@ Coverage Diff @@
## dev/gfdl #226 +/- ##
============================================
- Coverage 37.78% 37.23% -0.56%
============================================
Files 263 263
Lines 71012 73060 +2048
Branches 13149 13605 +456
============================================
+ Hits 26834 27201 +367
- Misses 39279 40841 +1562
- Partials 4899 5018 +119
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a very valuable refactoring and cleanup of the gitlab-CI code. Apart from noting the occasional spelling error (unless "eport" on line 15 means something technical that I have not heard of) it all looks good to me. However, rather than approving this myself, I would like to give Marshall or anyone else who speaks fluent yml to also take a look.
Gaea regression: https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/17282 ✔️ (Hopefully this used the new gitlab config file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Typos etc can be sorted out in the next refactor.
Fix string order in the instructions for defining regional_section
This is a re-factor of the gitlab pipeline scripts. The main change is to encapsulate in bash functions the long list of commands for each job/stage in the pipeline yml file. The bash functions can be invoked succinctly at the command line (see
.gitlab/README.md
) and most jobs in the pipeline are now one-liners. The build process still replicates FRE by using the MRS scripts but the functions are named so that we can deliberately add other build processes when they start being used for production.This re-factor was triggered because the logic in the previous scripts was not catching all the parameter doc string changes. In fixing that issue, I took the opportunity to clean up the output and have tested various cases to make sure the reporting is correct. Example output:
Breakdown of changes:
.gitlab/pipeline-ci-tool.sh
to enact most of the stages of the gitlab CI pipeline.gitlab/pipeline-ci-tool.sh
is documented in .gitlab/README.md with instructions on how to use it at the command line and what each function is doing.gitlab/pipeline-ci-tool.sh
so .gitlab-ci.yml is now considerably smaller and easier to read with statements like.gitlab/pipeline-ci-tool.sh mrs-compile debug_gnu
or.gitlab/pipeline-ci-tool.sh check-params gnu
Future:
pipeline-ci-tool.sh
I hope will avoid anyone thinking this is for users.