FAQ | This is a LIVE service | Changelog

Protobuf and OpenAPI are not running on the default branch without rule override

👓 What did you see?

When using the protobuf-generator.gitlab-ci.yml or openapi-generator.gitlab-ci.yml template (either directly or through the common-pipeline.yml, and not rules are overridden, packages are not published on the default branch.

What did you expect to see?

Packages to be published on the default branch, because of:

  PROTOBUF_GENERATOR_PUBLISH_REF_NAME: $CI_DEFAULT_BRANCH

   [...]

    - if: $CI_COMMIT_REF_NAME != $PROTOBUF_GENERATOR_PUBLISH_REF_NAME
      when: never
  # Ref name where packages should be published from. Can be overridden by specialising the rules on
  # ".openapi:publish:base".
  OPENAPI_GENERATOR_PUBLISH_REF_NAME: $CI_DEFAULT_BRANCH

  [...]

    - if: $CI_COMMIT_REF_NAME != $OPENAPI_GENERATOR_PUBLISH_REF_NAME
      when: never

💻 Where does this happen?

Any project that uses these templates.

🔬 How do I recreate this?

  1. Set up a repository, including the common pipeline template
  2. Have a openapi.yml file in the root repository (to trigger the OpenAPI generator)
  3. Run the pipeline on the CI_DEFAULT_BRANCH

📚 Any additional information?

See conversation here: uis/devops/iam/activate-account/message-schemas#3 (comment 807062)