Submit a Feature Request
For orbs-related bugs/issues, please submit them on the respective repo here: For general feedback please use continue using this form.
Update Path Filtering Orb to be configurable
Recently I learned of the circleci/path-filtering orb that uses the continuation API in a Setup Workflow. This is a really powerful set of tools, except for some reason the base-revision is not something that can be dynamically controlled. While you can set the base-revision for the path filtering orb to any valid value, including other parameters, it is not possible to dynamically create a value for the base-revision. For example, if the base-revision is set to a value of master it works fine. But if we create a pre-step that gets the base revision from Github, the value cannot be used as the base revision. Relying on the pipeline.git.base-revision as a dynamic revision is not reliable, and doesn't work the way one might hope it would. In practice this means that developers using CircleCI in my project need to manually update the base-revision whenever they are working on a different base from main / master . Can the orb be updated to accept an environment variable exported into $BASH_ENV from a pre-step, or can we have some other mechanism for dynamically controlling this parameter? Ideally I would be able to do something like this version: 2.1 setup: true orbs: path-filtering: circleci/path-filtering@0.0.2 workflows: generate-config: jobs: - path-filtering/filter: pre-steps: - run: name: Fetch Base Branch from Github command: | BASE_BRANCH=$(curl -X GET \ -H "Authorization: token $GITHUB_TOKEN" \ -H "Accept: application/vnd.github.groot-preview+json" \ -L "$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/commits/$CIRCLE_SHA1/pulls" \ | jq '.[].base.ref') echo "export BASE_BRANCH=$BASE_BRANCH" >> $BASH_ENV base-revision: $BASE_BRANCH mapping: | path/to/dir/.* build-my-job true Path Filtering orb
Realtime conditions for Orbs
Orbs are nice and all but it really is not useful if I can not call them with certain conditions. In CircleCI 2.0 I can do shell commands to have conditional logic, but it seems with reusable Orbs, I can not use any of those conditions since it is all YAML. Pls take a look at what Ansible did with its when condition and Jinja2 templating code. I was trying to do some conditions on environment vars but it seems CircleCI 2.1 is just preprocessed code that converts to 2.0 code so something like parameters: circle-pull-request: description: The URL of the associated pull request. If there are multiple associated pull requests, one URL is randomly chosen. type: string default: $CIRCLE_PULL_REQUEST circle-tag: description: The name of the git tag, if the current build is tagged. type: string default: $CIRCLE_TAG steps: - checkout - when: condition: << >> steps: - run: | echo "when << >>" - unless: condition: << >> steps: - run: | echo "unless << >>" - when: condition: << >> steps: - run: | echo "when << >>" - unless: condition: << >> steps: - run: | echo "unless << >>" Will not work at all and I will always get the When conditions. This is quite sad because If I want to do something as simple as use the Slack Orb to send a notification based upon something at runtime, I have to literally copy paste the Slack Orb code into my config (which is what CircleCI processing does anyway). CCI-I-721
Load More