Empty build pipeline parameters on push

Recently, our team has moved the CI from Gitlab CI to Circle. In Gitlab we filter the job by branch, but after configuring the integration with our Gitlab repositories we are noticing that workflows aren’t running as expected and we can’t use neither unless or when filter on our workflows due to empty values in parameter << pipeline.git.branch >>.

Here it is our CI configuration:

workflows:
  # ...
  main:
    unless:
      or:
        - equal: [main, << pipeline.git.branch >>]
        - equal: [develop, << pipeline.git.branch >>]
    # ...
  deploy-staging:
    when:
      equal: [develop, << pipeline.git.branch >>]  

We add a test job to see the output of pipeline values during the running of push events using the following configuration:

  echo-params:
    docker:
      - image: cimg/base:stable
    steps:
      - run: |
          echo 'tag="<< pipeline.git.tag >>"'
          echo 'branch="<< pipeline.git.branch >>"'
          echo 'branch-alternative="{ .Branch }"'
          echo 'revision="<< pipeline.git.revision >>"'
          echo 'base_revision="<< pipeline.git.base_revision >>"'
          echo 'trigger_source="<< pipeline.trigger_source >>"'

Although, none of the corresponding values was being set with expected value:

We’ve just realize that parameters vary for Gitlab SaaS integration. More information here: GitLab SaaS integration - CircleCI

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.