Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add parameter to enable branch level filtering #11

Closed
eddiewebb opened this issue May 17, 2019 · 1 comment
Closed

Add parameter to enable branch level filtering #11

eddiewebb opened this issue May 17, 2019 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@eddiewebb
Copy link

Use case is a job that pushes to multiple registries, but selection is based on branch.

Using multiple jobs and branch filtering is not applicable since it requires docker image to be passed which is slow and expensive.

Since config just calls orb, bash logic cant be used. This should essentally add that bash logic to the install commands.

@eddiewebb eddiewebb added enhancement New feature or request good first issue Good for newcomers labels May 17, 2019
@eddiewebb
Copy link
Author

Instead of making this a concern of every orb, I have asked Product team for considerations and there is some step-level filtering and other potential changes to make this a universal pattern in the future.

For now @iynere pointed out this great command in our build-tools orb.

orbs:
  build-tools: circleci/build-tools@2.2.0
jobs:
  my_job:
    machine:
      image: circleci/classic:latest
    steps:
    - build-tools/run-filtered:
       only-branch: master
       steps:
        - aws/install
        - aws/configure
        - aws/push
    - run: echo "This step always runs"

      

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant