8000 gitlab-ci: run csp tests via labels in MR · NVIDIA/aistore@04c6fe1 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 04c6fe1

Browse files
committed
gitlab-ci: run csp tests via labels in MR
Signed-off-by: Ryan Koo <rbk65@cornell.edu>
1 parent 070f1c1 commit 04c6fe1

File tree

1 file changed

+65
-9
lines changed

1 file changed

+65
-9
lines changed

.gitlab-ci.yml

Lines changed: 65 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ include:
6262
allow_failure: true
6363
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" || $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web"'
6464

65+
.skip_scheduled_rules: &skip_scheduled_rules
66+
rules:
67+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == "main"'
68+
when: manual
69+
allow_failure: true
70+
6571
.test_short_template: &test_short_def
6672
stage: test-short
6773
tags:
@@ -78,12 +84,9 @@ include:
7884
stage: test-short
7985
tags:
8086
- $RUNNER_TAG
81-
timeout: 35m
82-
rules:
83-
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == "main"'
84-
when: manual
85-
allow_failure: true
87+
timeout: 45m
8688
<<: *gather_logs_def
89+
<<: *skip_scheduled_rules
8790

8891

8992
.test_short_optional_template: &test_short_optional_def
@@ -117,10 +120,7 @@ include:
117120
- $RUNNER_TAG
118121
# NOTE: when changing, make sure to update $SCRIPTS_DIR/bootstrap.sh and GitLab /settings/ci_cd
119122
timeout: 4h
120-
rules:
121-
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == "main"'
122-
when: manual
123-
allow_failure: true
123+
<<: *skip_scheduled_rules
124124
<<: *gather_logs_def
125125

126126
# Rule Anchors
@@ -441,6 +441,13 @@ test:short:aws:
441441
<<: *test_short_skip_scheduled_def
442442
variables:
443443
BUCKET: "aws://ais-cicd"
444+
rules:
445+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_LABELS =~ /.*skip-ci.*/'
446+
when: manual
447+
allow_failure: true
448+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_LABELS =~ /.*aws.*/'
449+
when: on_success
450+
- !reference [.test_short_skip_scheduled_template, rules]
444451
script:
445452
- ${SCRIPTS_DIR}/clean_deploy.sh --target-cnt $NUM_TARGET --proxy-cnt $NUM_PROXY --mountpath-cnt $FS_CNT --aws
446453
- make test-short
@@ -449,6 +456,13 @@ test:short:gcp:
449456
<<: *test_short_skip_scheduled_def
450457
variables:
451458
BUCKET: "gs://ais-ci"
459+
rules:
460+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_LABELS =~ /.*skip-ci.*/'
461+
when: manual
462+
allow_failure: true
463+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_LABELS =~ /.*gcp.*/'
464+
when: on_success
465+
- !reference [.test_short_skip_scheduled_template, rules]
452466
script:
453467
- ${SCRIPTS_DIR}/clean_deploy.sh --target-cnt $NUM_TARGET --proxy-cnt $NUM_PROXY --mountpath-cnt $FS_CNT --gcp
454468
- make test-short
@@ -457,6 +471,13 @@ test:short:azure:
457471
<<: *test_short_skip_scheduled_def
458472
variables:
459473
BUCKET: "az://ais-ci"
474+
rules:
475+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_LABELS =~ /.*skip-ci.*/'
476+
when: manual
477+
allow_failure: true
478+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_LABELS =~ /.*azure.*/'
479+
when: on_success
480+
- !reference [.test_short_skip_scheduled_template, rules]
460481
script:
461482
- ${SCRIPTS_DIR}/clean_deploy.sh --target-cnt $NUM_TARGET --proxy-cnt $NUM_PROXY --mountpath-cnt $FS_CNT --azure
462483
- make test-short
@@ -465,6 +486,13 @@ test:short:oci:
465486
<<: *test_short_skip_scheduled_def
466487
variables:
467488
BUCKET: "oc://ais-ci"
489+
rules:
490+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_LABELS =~ /.*skip-ci.*/'
491+
when: manual
492+
allow_failure: true
493+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_LABELS =~ /.*oci.*/'
494+
when: on_success
495+
- !reference [.test_short_skip_scheduled_template, rules]
468496
script:
469497
- . ais/test/oci/mp_tuning.env && ${SCRIPTS_DIR}/clean_deploy.sh --target-cnt $NUM_TARGET --proxy-cnt $NUM_PROXY --mountpath-cnt $FS_CNT --oci
470498
- . ais/test/oci/mp_tuning.env && make test-short
@@ -481,6 +509,13 @@ test:long:aws:
481509
<<: *test_long_def
482510
variables:
483511
BUCKET: "aws://ais-cicd"
512+
rules:
513+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_LABELS =~ /.*skip-ci.*/'
514+
when: manual
515+
allow_failure: true
516+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_LABELS =~ /.*aws.*/'
517+
when: on_success
518+
- !reference [.test_long_skip_scheduled_template, rules]
484519
script:
485520
- ${SCRIPTS_DIR}/clean_deploy.sh --target-cnt $NUM_TARGET --proxy-cnt $NUM_PROXY --mountpath-cnt $FS_CNT --aws --ht
486521
- make test-long
@@ -489,6 +524,13 @@ test:long:gcp:
489524
<<: *test_long_def
490525
variables:
491526
BUCKET: "gs://ais-ci"
527+
rules:
528+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_LABELS =~ /.*skip-ci.*/'
529+
when: manual
530+
allow_failure: true
531+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_LABELS =~ /.*gcp.*/'
532+
when: on_success
533+
- !reference [.test_long_skip_scheduled_template, rules]
492534
script:
493535
- ${SCRIPTS_DIR}/clean_deploy.sh --target-cnt $NUM_TARGET --proxy-cnt $NUM_PROXY --mountpath-cnt $FS_CNT --gcp --ht
494536
- make test-long
@@ -497,6 +539,13 @@ test:long:azure:
497539
<<: *test_long_def
498540
variables:
499541
BUCKET: "az://ais-ci"
542+
rules:
543+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_LABELS =~ /.*skip-ci.*/'
544+
when: manual
545+
allow_failure: true
546+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_LABELS =~ /.*azure.*/'
547+
when: on_success
548+
- !reference [.test_long_skip_scheduled_template, rules]
500549
script:
501550
- ${SCRIPTS_DIR}/clean_deploy.sh --target-cnt $NUM_TARGET --proxy-cnt $NUM_PROXY --mountpath-cnt $FS_CNT --azure --ht
502551
- make test-long
@@ -505,6 +554,13 @@ test:long:oci:
505554
<<: *test_long_def
506555
variables:
507556
BUCKET: "oc://ais-ci"
557+
rules:
558+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_LABELS =~ /.*skip-ci.*/'
559+
when: manual
560+
allow_failure: true
561+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_LABELS =~ /.*oci.*/'
562+
when: on_success
563+
- !reference [.test_long_skip_scheduled_template, rules]
508564
script:
509565
- . ais/test/oci/mp_tuning.env && ${SCRIPTS_DIR}/clean_deploy.sh --target-cnt $NUM_TARGET --proxy-cnt $NUM_PROXY --mountpath-cnt $FS_CNT --oci --ht
510566
- . ais/test/oci/mp_tuning.env && make test-long

0 commit comments

Comments
 (0)
0