Add skip variables to deployment templates

Summary

Add configurable skip variables to control which jobs run in a pipeline, providing fine-grained control without requiring projects to override template rules.

New Variables

Variable Effect
QUICK_TEST Skip all production deployments and dev package deployments
SKIP_PRODUCTION_DEPLOY Skip all production deployments (npm to npmjs.org, Docker to Docker Hub)
SKIP_DEV_DEPLOY Skip dev package deployments (npm to internal GitLab registry)
SKIP_NPM_PUBLISH Skip all npm publishing jobs (both dev and production)
SKIP_DOCKER_PUBLISH Skip Docker Hub publishing jobs

Updated Templates

  • .npm_deploy_package_template - dev npm publishing to GitLab registry
  • .registry_npmjs_org_deploy_package_template - production npm publishing to npmjs.org
  • .publish_docker_image_template - production Docker publishing to Docker Hub

Benefits

  1. Projects don't need to override rules - they just use extends: and get correct behavior
  2. Single source of truth - all skip logic in one place
  3. Prevents accidental security issues - overriding rules can accidentally remove protected-tag checks (as happened in hive/hive)
  4. Flexible - can combine variables for different pipeline modes
  5. Consistent - all projects using these templates get the same behavior

Usage Example

When running a pipeline, set variables:

# Skip everything non-essential (for quick tests)
QUICK_TEST=true

# Or be more specific
SKIP_PRODUCTION_DEPLOY=true
SKIP_DEV_DEPLOY=true

Related

  • Fixes issue where hive/hive accidentally allowed production npm deploys on all branches due to rule override

Merge request reports

Loading