CI: main:* jobs incorrectly appear on develop branch pipelines

Problem

After the default branch was changed from main to develop, the main:* deploy and stop jobs incorrectly appear on develop branch pipelines.

This happens because these jobs use $CI_DEFAULT_BRANCH in their rules:

rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH

Since $CI_DEFAULT_BRANCH now evaluates to develop, the condition matches on develop pipelines, causing both main:* and develop:* job sets to appear.

Evidence

Pipeline https://gitlab.syncad.com/hive/denser/-/pipelines/146494 shows 8 main:* jobs appearing on the develop branch, causing it to show as "blocked" waiting for manual action on jobs that shouldn't exist for that branch.

Affected Jobs

  • main:deploy-blog-mainnet
  • main:deploy-wallet-mainnet
  • main:deploy-blog-mirrornet
  • main:deploy-wallet-mirrornet
  • main:stop-blog-mainnet
  • main:stop-wallet-mainnet
  • main:stop-blog-mirrornet
  • main:stop-wallet-mirrornet

Solution

Replace $CI_DEFAULT_BRANCH with hardcoded "main" in the rules for all main:* jobs.