diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d536117..41cd858 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,6 +11,37 @@ default: tags: - build +# ============================================================================ +# MANUAL TRIGGER: Run Full Test Matrix On Demand +# ============================================================================ +# Click the play button in GitLab UI to run the full 42-language matrix +# without needing to create a tag. Useful for load testing & pool churn. +manual-matrix-run: + stage: test + script: + - echo "Generating full test matrix..." + - bash scripts/generate-matrix.sh --force-all + - echo "Matrix generated, triggering child pipeline..." + artifacts: + paths: + - test-matrix.yml + expire_in: 1 hour + rules: + - when: manual + allow_failure: true + +manual-matrix-trigger: + stage: test + needs: + - manual-matrix-run + trigger: + include: + - artifact: test-matrix.yml + job: manual-matrix-run + strategy: depend + rules: + - when: on_success + # CI variables UNSANDBOX_PUBLIC_KEY, UNSANDBOX_SECRET_KEY, DEPLOY_KEY # are configured in GitLab Settings > CI/CD > Variables diff --git a/scripts/generate-matrix.sh b/scripts/generate-matrix.sh index ed829a3..4bace11 100755 --- a/scripts/generate-matrix.sh +++ b/scripts/generate-matrix.sh @@ -5,10 +5,15 @@ set -e # CRITICAL: Tags ALWAYS run full test matrix, no matter what +# Also support --force-all flag or FORCE_FULL_MATRIX env var for manual triggers if [ -n "$CI_COMMIT_TAG" ]; then echo "Tag detected ($CI_COMMIT_TAG) - forcing full test matrix" TEST_ALL="true" CHANGED_LANGS="" +elif [ "$1" = "--force-all" ] || [ "$FORCE_FULL_MATRIX" = "true" ]; then + echo "Manual trigger - forcing full test matrix" + TEST_ALL="true" + CHANGED_LANGS="" else # Read changes from detect-changes output CHANGES=$(cat changes.json)