Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
d23d787
simplifing the demarcation of generated host/case sections of main mu…
Apr 8, 2025
427b72f
finaly have base mix-modality framework with each mode in each pipeli…
Apr 8, 2025
a2aeda4
remove the old case-host pipeline include file that is now replaced b…
Apr 8, 2025
2171fd2
had naming of ctest_case_template inverted with the run_ctests_templa…
Apr 8, 2025
37adf0c
still trying to get extends naming aliment set
Apr 8, 2025
e3ece6a
added extra include of ci-hosts in ci-ctests direclty, thought it was…
Apr 8, 2025
b1a5c76
used an all inclusive approach of including depecancies
Apr 8, 2025
c3f298e
had the tags sytax wrong there for a bit in the host include file
Apr 8, 2025
6a4e76f
was missing the insstantiation of the create ctests per host
Apr 8, 2025
7c29e1f
bringing back new main pipeline from final design.
Apr 8, 2025
fda2752
removed old docs and generate_pipelines
Apr 8, 2025
03b5bbf
added inline documention and a docs README.md in the gitlab ci folder
Apr 8, 2025
8c68fd2
small refinments in key features for clearity
Apr 8, 2025
d48f907
removed refence to script generator with is no longer used at this time
Apr 8, 2025
6363dd9
a misspelling of the include host supporting pipeline got in the repo…
Apr 9, 2025
5752f17
adding some debug outpouts to build and try to proporgating error to …
Apr 9, 2025
5632780
fixed bug with renaming GW_RUN_PATH in cases pipline
Apr 9, 2025
28431ae
made script blocks more readble and added explicit exit to catch erro…
Apr 9, 2025
7e5ce32
updated multi-host with semi-dynamic case lists for GitLab pipelines …
TerrenceMcGuinness-NOAA Apr 14, 2025
b3ddc8c
added BUILD back into the build path for GitLab CI jobs which vaule c…
TerrenceMcGuinness-NOAA Apr 14, 2025
b260216
folded ci_utils_wrapper into ci_utils because that was redundent to h…
TerrenceMcGuinness-NOAA Apr 14, 2025
9a1006e
replaced _here/_top crap with find_homegfs()
TerrenceMcGuinness-NOAA Apr 14, 2025
1e59d5f
added detailed inline documentation for the intent and usage of the g…
TerrenceMcGuinness-NOAA Apr 15, 2025
6bbd386
added a finilize stage to the common pipeline, using this for pushing…
TerrenceMcGuinness-NOAA Apr 15, 2025
5b9b85b
pushing out generated Gitlab Pipeline
TerrenceMcGuinness-NOAA Apr 15, 2025
658352b
using find_homegfs in GitLab runner launch script
TerrenceMcGuinness-NOAA Apr 15, 2025
0d32164
push test run in dev
TerrenceMcGuinness-NOAA Apr 15, 2025
334243a
needed fix with MACHINE not being used for the matrix loop control va…
TerrenceMcGuinness-NOAA Apr 15, 2025
774e18b
forgot to update the pipeline witht the lcv update
TerrenceMcGuinness-NOAA Apr 15, 2025
f9b8a20
missed a new dev in the path to yaml input case file in the pipeline …
TerrenceMcGuinness-NOAA Apr 15, 2025
11f085d
removed old ci BASH script and renamed files to elimnate - and rename…
TerrenceMcGuinness-NOAA Apr 15, 2025
d35ad44
replaced all instances of getting HOMEgfs with find_homegfs method an…
TerrenceMcGuinness-NOAA Apr 15, 2025
04032a9
just noticed that Rahul had added HOMEgfs_dev so put it back
TerrenceMcGuinness-NOAA Apr 15, 2025
69bc3c8
adding in latest generated CI GitLab pipeline
TerrenceMcGuinness-NOAA Apr 15, 2025
9bfd17e
added some {} for shell norms
TerrenceMcGuinness-NOAA Apr 15, 2025
94e6888
removed vistigal debug outputs in gitlab runner launch scripts
TerrenceMcGuinness-NOAA Apr 15, 2025
fa4fda4
updated sys.path to import find_homegfs in test_create_experments
TerrenceMcGuinness-NOAA Apr 15, 2025
623d252
bunch of white spaces removed from find_home script
TerrenceMcGuinness-NOAA Apr 15, 2025
433d387
fixed shell norms for splitting up gett type
TerrenceMcGuinness-NOAA Apr 15, 2025
58c87ce
tried to fix shellnorms for getting SCRIPT_DIR in java launch script
TerrenceMcGuinness-NOAA Apr 15, 2025
fa4f1e1
add relative path to find the find_homegfs library in test_create+exp…
TerrenceMcGuinness-NOAA Apr 15, 2025
c6e6360
fixed run_check_ci.sh as the corret name for the bash scripts that ad…
TerrenceMcGuinness-NOAA Apr 16, 2025
8899c04
added /usr/bin/env bash for all shall scripts under ci
TerrenceMcGuinness-NOAA Apr 16, 2025
4b33965
had to shorten paths on Hera because fortran pathlen=128 in fv3 jdei …
TerrenceMcGuinness-NOAA Apr 16, 2025
2d8094c
the create_gist finalize job was a template and had to be updated to …
TerrenceMcGuinness-NOAA Apr 16, 2025
b462776
removed the label update so we can do that next sprint with an emc-bo…
Apr 8, 2025
a6fa1d8
ci_ctest_multimodality updates
TerrenceMcGuinness-NOAA Apr 16, 2025
ed9d2da
completed preliminary design of mixed-modality pipelines
TerrenceMcGuinness-NOAA Apr 16, 2025
6f798bb
Merge branch 'NOAA-EMC:develop' into ci_gitlab_ctests_multi-modality
TerrenceMcGuinness-NOAA Apr 17, 2025
eeb78e7
removed badge update exploration and created a generlized version as …
Apr 8, 2025
4219a84
updated cmake ctest commands for vertical structgure in GitLab pipeline
TerrenceMcGuinness-NOAA Apr 18, 2025
928f84a
forgot to cd into build for cmake ../../..
TerrenceMcGuinness-NOAA Apr 18, 2025
f9d79c5
fixed up main ctest pipeline since all the tag a depenency logic is i…
TerrenceMcGuinness-NOAA Apr 18, 2025
8e6638d
ctests setup templated bash script was not pointing to create experme…
TerrenceMcGuinness-NOAA Apr 18, 2025
987ccd6
removed allow fail as it was not usefull durint the test cases
TerrenceMcGuinness-NOAA Apr 18, 2025
edca1cf
missed dev again on path to source config.
TerrenceMcGuinness-NOAA Apr 19, 2025
f888d46
needed full path because job had GIT_STRATEGY set to none
TerrenceMcGuinness-NOAA Apr 19, 2025
14afd70
super imposed spelling of platforms and put dependecies back in at th…
TerrenceMcGuinness-NOAA Apr 19, 2025
a63463b
My coding partner suggested to use a DAG so we can relax the bottle n…
TerrenceMcGuinness-NOAA Apr 19, 2025
4495d14
put build back in not that it runs through
TerrenceMcGuinness-NOAA Apr 19, 2025
e749491
cleaned up few left overs, added all ctests back and used -L per test…
TerrenceMcGuinness-NOAA Apr 19, 2025
70d6f3d
Merge branch 'NOAA-EMC:develop' into ci_gitlab_mulihost_dev
TerrenceMcGuinness-NOAA Apr 21, 2025
0d7292d
testing merge from multihost to skip current PR
Apr 8, 2025
69c92cb
Merge branch 'NOAA-EMC:develop' into ci_gitlab_pipelines_dev
TerrenceMcGuinness-NOAA Apr 22, 2025
be7a857
Update dev/ci/.gitlab-ci-ctests.yml
TerrenceMcGuinness-NOAA Apr 22, 2025
d3ab98d
Update dev/ci/scripts/utils/find_homegfs.py
TerrenceMcGuinness-NOAA Apr 22, 2025
79236f0
Update dev/ci/.gitlab-ci.yml
TerrenceMcGuinness-NOAA Apr 22, 2025
dbb8a6e
applied review changes
TerrenceMcGuinness-NOAA Apr 22, 2025
67c5d29
added steps to make sure failures are captured to pipeline with ctest…
TerrenceMcGuinness-NOAA Apr 22, 2025
07335ea
Replaced HOMEGFS_ with HOMEgfs_
TerrenceMcGuinness-NOAA Apr 22, 2025
48cfe3b
moved .gitlab-ci.yml to root default
TerrenceMcGuinness-NOAA Apr 22, 2025
89c27d8
Merge branch 'develop' into ci_gitlab_pipelines_dev
TerrenceMcGuinness-NOAA Apr 23, 2025
2dd0117
added NOTE about the supported ctests neeeding updates to there data …
Apr 8, 2025
469e6e6
did some re-naming of variables to relax the confution between GitLab…
TerrenceMcGuinness-NOAA Apr 24, 2025
28544e5
changed HOMEGFS to GW_HOMEgfs
TerrenceMcGuinness-NOAA Apr 24, 2025
12b4956
updated to corrrect RUNNER vars for script times and update config va…
TerrenceMcGuinness-NOAA Apr 24, 2025
4ac9285
missed one update name in echo part of gitlab launcher for RUNNER dir
TerrenceMcGuinness-NOAA Apr 24, 2025
ab8d12b
debugging submodule checkout
Apr 9, 2025
318af28
Merge branch 'NOAA-EMC:develop' into ci_gitlab_pipelines_dev
TerrenceMcGuinness-NOAA Apr 24, 2025
7803099
fixed bug with find_homegfs.py with using data before it was defined …
TerrenceMcGuinness-NOAA Apr 25, 2025
ad9df9e
pynorms inforcement by elmenating spaceds on empty lines
TerrenceMcGuinness-NOAA Apr 25, 2025
7ec1046
fixed pynorms spaces
TerrenceMcGuinness-NOAA Apr 25, 2025
8b48c8d
Merge branch 'NOAA-EMC:develop' into ci_gitlab_pipelines_dev
TerrenceMcGuinness-NOAA Apr 28, 2025
961bcf2
Merge branch 'develop' into ci_gitlab_pipelines_dev
aerorahul Apr 28, 2025
745fc57
Merge branch 'develop' into ci_gitlab_pipelines_dev
aerorahul Apr 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/ci_unit_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ jobs:
sudo apt-get install -y perl libxml-libxml-perl libxml-libxslt-perl libdatetime-perl
python -m pip install --upgrade pip
python -m pip install -r global-workflow/dev/workflow/requirements.txt
pip install pytest
pip install wget
pip install pytest pytest-cov pyyaml jinja2 wget

- name: Cache Rocoto
id: cache-rocoto
Expand Down Expand Up @@ -60,14 +59,19 @@ jobs:
cd global-workflow/sorc
git submodule update --init -j 2 wxflow ufs_model.fd
./link_workflow.sh
cd ../dev/ci/scripts/tests

# Create test data directory for unit tests
mkdir -p ../dev/ci/scripts/unittests/test_data
echo "Creating test directories and files for CI tests"

cd ../dev/ci/scripts/unittests
pytest -v --junitxml test-results.xml


- name: Publish Test Results
if: always()
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: global-workflow/dev/ci/scripts/tests/test-results.xml
files: global-workflow/dev/ci/scripts/unittests/test-results.xml
job_summary: true
comment_mode: off
2 changes: 1 addition & 1 deletion .github/workflows/pw_aws_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ jobs:
- name: Run Experiment ${{ matrix.case }}
run: |
cd ${{ env.TEST_DIR }}/HOMEgfs
./dev/ci/scripts/run-check_ci.sh ${{ env.TEST_DIR }} ${{ matrix.case }}.${{ github.run_id }} HOMEgfs
./dev/ci/scripts/run_check_ci.sh ${{ env.TEST_DIR }} ${{ matrix.case }}.${{ github.run_id }} HOMEgfs

clean-up:
needs: run-experiments
Expand Down
80 changes: 80 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# ==========================================================================
# Main GitLab CI Configuration for the global-workflow Project
# ==========================================================================
#
# This is the primary CI/CD configuration file that orchestrates the GitLab CI
# testing framework for the global-workflow project. It defines pipeline stages
# and includes specialized configuration files for different testing aspects.
#
# The pipeline architecture supports:
# 1. Multiple host environments (hera, gaeac6, etc.)
# 2. Two primary testing modes:
# - PR validation via standard test cases
# - CTest-based tests triggered via GitHub API
#
# Included files:
# - .gitlab-ci-ctests.yml: Handles CMake/CTest-based testing framework
# - .gitlab-ci-cases.yml: Defines templates for standard experiment cases
# - .gitlab-ci-hosts.yml: Contains host-specific configurations and test matrices
# that can be extended to support additional hosts
#
# The host configuration in .gitlab-ci-hosts.yml is designed to be easily
# extended with new computing platforms and allows per-host specification
# of which test cases to run.

stages:
- build
- create_experiments
- run_tests
- finalize

variables:
BUILD: '' # Placeholder for control over build directory path
# Using GW prefix to avoid confusion with GitLab predefined variables
GW_RUN_PATH: ${CI_BUILDS_DIR}/${BUILD}/${CI_COMMIT_SHORT_SHA}
# Overriding GitLab's predefined GIT_CLONE_PATH variable to specify the exact location
# where the repository should be cloned. This works with custom_build_dir-enabled in the runner config.
GIT_CLONE_PATH: '${GW_RUN_PATH}/global-workflow'
GW_HOMEgfs: ${GIT_CLONE_PATH}
RUNTESTS_DIR: ${GW_RUN_PATH}/RUNTESTS
GIT_DEPTH: 10
RUNNER_SCRIPT_TIMEOUT: 6h
RUNNER_AFTER_SCRIPT_TIMEOUT: 6h
# Controls pipeline behavior: CTests (true) or PR cases (false)
GITHUB_API_TRIGGER: ${GITHUB_API_TRIGGER:-"false"}
PR_NUMBER: ${PR_NUMBER:-"0"}

# Include specialized pipeline configuration files
include:
- local: 'dev/ci/gitlab-ci-ctests.yml' # CTest framework configuration
- local: 'dev/ci/gitlab-ci-cases.yml' # Standard test case templates
- local: 'dev/ci/gitlab-ci-hosts.yml' # Host-specific configurations

.base_config:
variables:
GIT_STRATEGY: none

# Common build template for all modalities
.build_template:
variables:
GIT_STRATEGY: clone
GIT_SUBMODULE_STRATEGY: recursive
GIT_SSL_NO_VERIFY: "true" # Address potential certificate verification issues
stage: build
script:
- |
set -e # Fail the job if any command fails
echo "Setting up build environment for ${machine}"
echo "Using build directory ${GW_HOMEgfs}"
git submodule status

dev/ci/scripts/utils/ci_utils.sh build
build_status=$?

if [ $build_status -ne 0 ]; then
echo "Build failed with exit code $build_status"
exit $build_status
fi

sorc/link_workflow.sh
mkdir -p ${RUNTESTS_DIR}
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ endif()
# add_subdirectory(sorc)

# Setup tests
add_subdirectory(ctests)
add_subdirectory(dev/ctests)
69 changes: 0 additions & 69 deletions dev/ci/.gitlab-ci.yml

This file was deleted.

18 changes: 9 additions & 9 deletions dev/ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ pipeline {
def error_logs_message = ""
dir("${HOMEgfs}/sorc") {
try {
sh(script: "${HOMEgfs_dev}/ci/scripts/utils/ci_utils_wrapper.sh build_compute") // build the global-workflow executables
sh(script: "${HOMEgfs_dev}/ci/scripts/utils/ci_utils.sh build") // build the global-workflow executables
} catch (Exception error_build) {
echo "Failed to build global-workflow: ${error_build.getMessage()}"
if ( fileExists("logs/error.logs") ) {
Expand Down Expand Up @@ -203,7 +203,7 @@ pipeline {
try {
error_output = sh(script: """
source ${HOMEgfs_dev}/ush/gw_setup.sh
${HOMEgfs_dev}/ci/scripts/utils/ci_utils_wrapper.sh create_experiment ${HOMEgfs_dev}/ci/cases/pr/${caseName}.yaml
${HOMEgfs_dev}/ci/scripts/utils/ci_utils.sh create_experiment ${HOMEgfs_dev}/ci/cases/pr/${caseName}.yaml
""", returnStdout: true).trim()
} catch (Exception error_create) {
sh(script: """${GH} pr comment ${env.CHANGE_ID} --repo ${repo_url} --body '${caseName} **FAILED** to create experiment on ${Machine} in BUILD# ${env.BUILD_NUMBER}\n with the error:\n```\n${error_output}```' """)
Expand All @@ -215,22 +215,22 @@ pipeline {
stage("Running ${caseName}") {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
script {
def pslot = sh(script: "${HOMEgfs_dev}/ci/scripts/utils/ci_utils_wrapper.sh get_pslot ${CUSTOM_WORKSPACE}/RUNTESTS ${caseName}", returnStdout: true).trim()
def pslot = sh(script: "${HOMEgfs_dev}/ci/scripts/utils/ci_utils.sh get_pslot ${CUSTOM_WORKSPACE}/RUNTESTS ${caseName}", returnStdout: true).trim()
def error_file = "${CUSTOM_WORKSPACE}/RUNTESTS/${pslot}_error.logs"
sh(script: " rm -f ${error_file}")
try {
sh(script: """
source ${HOMEgfs_dev}/ush/gw_setup.sh
${HOMEgfs_dev}/ci/scripts/run-check_ci.sh ${CUSTOM_WORKSPACE} ${pslot} 'global-workflow'
${HOMEgfs_dev}/ci/scripts/run_check_ci.sh ${CUSTOM_WORKSPACE} ${pslot} 'global-workflow'
""")
sh(script: """
source ${HOMEgfs_dev}/ush/gw_setup.sh
${HOMEgfs_dev}/ci/scripts/utils/ci_utils_wrapper.sh cleanup_experiment ${CUSTOM_WORKSPACE}/RUNTESTS/EXPDIR/${pslot}
${HOMEgfs_dev}/ci/scripts/utils/ci_utils.sh cleanup_experiment ${CUSTOM_WORKSPACE}/RUNTESTS/EXPDIR/${pslot}
""")
} catch (Exception error_experment) {
sh(script: """
source ${HOMEgfs_dev}/ush/gw_setup.sh
${HOMEgfs_dev}/ci/scripts/utils/ci_utils_wrapper.sh cancel_batch_jobs ${pslot}
${HOMEgfs_dev}/ci/scripts/utils/ci_utils.sh cancel_batch_jobs ${pslot}
""")
ws(CUSTOM_WORKSPACE) {
def error_logs = ""
Expand Down Expand Up @@ -300,9 +300,9 @@ pipeline {
done
""", returnStatus: true)
sh(script: """${GH} pr edit ${env.CHANGE_ID} --repo ${repo_url} --add-label "CI-${Machine}-${STATUS}" """, returnStatus: true)
if (fileExists("${CUSTOM_WORKSPACE}/RUNTESTS/ci-run_check.log")) {
sh(script: """echo "**CI ${STATUS}** on ${Machine} in Build# ${env.BUILD_NUMBER}<br>Built and ran in directory \\`${CUSTOM_WORKSPACE}\\`\n\\`\\`\\`\n" | cat - ${CUSTOM_WORKSPACE}/RUNTESTS/ci-run_check.log > temp && mv temp ${CUSTOM_WORKSPACE}/RUNTESTS/ci-run_check.log""", returnStatus: true)
sh(script: """${GH} pr comment ${env.CHANGE_ID} --repo ${repo_url} --body-file ${CUSTOM_WORKSPACE}/RUNTESTS/ci-run_check.log """, returnStatus: true)
if (fileExists("${CUSTOM_WORKSPACE}/RUNTESTS/run_check_ci.log")) {
sh(script: """echo "**CI ${STATUS}** on ${Machine} in Build# ${env.BUILD_NUMBER}<br>Built and ran in directory \\`${CUSTOM_WORKSPACE}\\`\n\\`\\`\\`\n" | cat - ${CUSTOM_WORKSPACE}/RUNTESTS/run_check_ci.log > temp && mv temp ${CUSTOM_WORKSPACE}/RUNTESTS/run_check_ci.log""", returnStatus: true)
sh(script: """${GH} pr comment ${env.CHANGE_ID} --repo ${repo_url} --body-file ${CUSTOM_WORKSPACE}/RUNTESTS/run_check_ci.log """, returnStatus: true)
}
if (STATUS == 'Passed') {
try {
Expand Down
16 changes: 8 additions & 8 deletions dev/ci/Jenkinsfile4AWS
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ pipeline {
def error_logs_message = ""
dir("${HOMEgfs}/sorc") {
try {
// sh(script: "${HOMEgfs}/ci/scripts/utils/ci_utils_wrapper.sh build_compute") // build the global-workflow executables
// sh(script: "${HOMEgfs}/ci/scripts/utils/ci_utils.sh build") // build the global-workflow executables
sh(script: './build_compute.sh -A ${USER} gfs gefs sfs') // build the global-workflow executables
} catch (Exception error_build) {
echo "Failed to build global-workflow: ${error_build.getMessage()}"
Expand Down Expand Up @@ -205,10 +205,10 @@ pipeline {
script {
env.RUNTESTS = "${CUSTOM_WORKSPACE}/RUNTESTS"
try {
error_output = sh(script: """
error_output = sh(script: \"\"\"
source ${HOMEgfs}/workflow/gw_setup.sh
${HOMEgfs}/ci/scripts/utils/ci_utils_wrapper.sh create_experiment ${HOMEgfs}/ci/cases/pr/${caseName}.yaml
""", returnStdout: true).trim()
${HOMEgfs}/ci/scripts/utils/ci_utils.sh create_experiment ${HOMEgfs}/ci/cases/pr/${caseName}.yaml
\"\"\", returnStdout: true).trim()
} catch (Exception error_create) {
sh(script: """${GH} pr comment ${env.CHANGE_ID} --repo ${repo_url} --body "${Case} **FAILED** to create experiment on ${Machine} in BUILD# ${env.BUILD_NUMBER}\n with the error:\n\\`\\`\\`\n${error_output}\\`\\`\\`" """)
error("Case ${caseName} failed to create experiment directory")
Expand All @@ -219,22 +219,22 @@ pipeline {
stage("Running ${caseName}") {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
script {
def pslot = sh(script: "${HOMEgfs}/ci/scripts/utils/ci_utils_wrapper.sh get_pslot ${CUSTOM_WORKSPACE}/RUNTESTS ${caseName}", returnStdout: true).trim()
def pslot = sh(script: "${HOMEgfs}/ci/scripts/utils/ci_utils.sh get_pslot ${CUSTOM_WORKSPACE}/RUNTESTS ${caseName}", returnStdout: true).trim()
def error_file = "${CUSTOM_WORKSPACE}/RUNTESTS/${pslot}_error.logs"
sh(script: " rm -f ${error_file}")
try {
sh(script: """
source ${HOMEgfs}/workflow/gw_setup.sh
${HOMEgfs}/ci/scripts/run-check_ci.sh ${CUSTOM_WORKSPACE} ${pslot} 'global-workflow'
${HOMEgfs}/ci/scripts/run_check_ci.sh ${CUSTOM_WORKSPACE} ${pslot} 'global-workflow'
""")
sh(script: """
source ${HOMEgfs}/workflow/gw_setup.sh
${HOMEgfs}/ci/scripts/utils/ci_utils_wrapper.sh cleanup_experiment ${CUSTOM_WORKSPACE}/RUNTESTS/EXPDIR/${pslot}
${HOMEgfs}/ci/scripts/utils/ci_utils.sh cleanup_experiment ${CUSTOM_WORKSPACE}/RUNTESTS/EXPDIR/${pslot}
""")
} catch (Exception error_experment) {
sh(script: """
source ${HOMEgfs}/workflow/gw_setup.sh
${HOMEgfs}/ci/scripts/utils/ci_utils_wrapper.sh cancel_batch_jobs ${pslot}
${HOMEgfs}/ci/scripts/utils/ci_utils.sh cancel_batch_jobs ${pslot}
""")
ws(CUSTOM_WORKSPACE) {
def error_logs = ""
Expand Down
42 changes: 42 additions & 0 deletions dev/ci/gitlab-ci-cases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# ==========================================================================
# Templates for Standard Test Cases
# ==========================================================================
#
# This file defines templates for setting up and running standard experiment
# test cases for the global-workflow project. These cases represent more
# comprehensive, end-to-end testing scenarios than the CTesting framework.
#
# These templates are used primarily for PR testing when GITHUB_API_TRIGGER=false.
# The actual test case matrix for each host is defined in .gitlab-ci-hosts.yml.
#
# Key templates:
# - .setup_template: Creates experiment directories based on case YAML files
# - .run_tests_template: Executes and validates the experiment workflows
#
# Test cases are defined as YAML files in the dev/ci/cases/pr directory and
# are referenced by name in the host configuration file's test matrix.

# Template for experiment setup jobs
.setup_template:
extends: .base_config
stage: create_experiments
script:
- |
export RUNTESTS=${RUNTESTS_DIR}
${GW_HOMEgfs}/dev/ci/scripts/utils/ci_utils.sh create_experiment ${GW_HOMEgfs}/dev/ci/cases/pr/${caseName}.yaml
exit $?
needs:
- build-${machine}

# Template for test execution jobs
.run_tests_template:
extends: .base_config
stage: run_tests
script:
- |
echo "Using build directory $GW_HOMEgfs (dated $BUILD_DATE)"
pslot=$(${GW_HOMEgfs}/dev/ci/scripts/utils/ci_utils.sh get_pslot ${RUNTESTS_DIR} ${caseName})
${GW_HOMEgfs}/dev/ci/scripts/run_check_ci.sh ${GW_RUN_PATH} ${pslot} global-workflow
exit $?
needs:
- setup_experiments-${machine}
Loading