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

Not working when default branch is not master #15

Open
saurabtanej opened this issue Feb 4, 2023 · 0 comments
Open

Not working when default branch is not master #15

saurabtanej opened this issue Feb 4, 2023 · 0 comments

Comments

@saurabtanej
Copy link

Something is wrong and it's not working for me. I've tried multiple Permutations and Combinations.

I am trying to do the monorepo with when and change_in but it's not working. It triggers all the jobs for me all the time. It doesn't matter if there is a change in the directory or not. It triggers all the jobs.

Here is my yaml:

version: "v1.0"
name: Monorepo project
agent:
  machine:
    type: e1-standard-2
    os_image: ubuntu1804

blocks:
  # Run this block on changes in the web-app folder at the root of the repository
  - name: Test rainforest App
    dependencies: []
    run:
      when: "change_in('/apps/rainforest', {default_branch: 'main'}, {pipeline_file: 'ignore'})"
    task:
      jobs:
        - commands:
            - echo "$PWD"

  # Run this block on changes in the ios folder at the root of the repository
  - name: run rainforest-qa for blueprint
    dependencies: []
    run:
      when: "change_in('/apps/blueprint', {default_branch: 'main'}, {pipeline_file: 'ignore'})"
    task:
      jobs:
        - commands:
            - echo "$PWD"

  # Run this block on changes in the docs folder at the root of the repository
  - name: run rainforest-qa for login
    dependencies: []
    run:
      when: "change_in('/apps/login', {default_branch: 'main'}, {pipeline_file: 'ignore'})"
    task:
      jobs:
        - commands:
            - echo "$PWD"

  # Run this block on changes in web-app or ios folders at the root of the repository
  - name: run rainforest-qa for secure
    dependencies: []
    run:
      when: "change_in('/apps/secure', {default_branch: 'main'}, {pipeline_file: 'ignore'})"
    task:
      jobs:
        - commands:
            - echo "$PWD"

  - name: run rainforest-qa for lenders
    dependencies: []
    run:
      when: "change_in('/apps/lenders', {default_branch: 'main'}, {pipeline_file: 'ignore'})"
    task:
      jobs:
        - commands:
            - echo "$PWD"

promotions:
  - name: Deploy to production
    pipeline_file: deploy_production.yml
    auto_promote:
      when: "result = 'passed' and branch = 'saurabh-test'"
  - name: Deploy to testing
    pipeline_file: deploy_testing.yml
@saurabtanej saurabtanej changed the title Not working default branch is not master Not working when default branch is not master Feb 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant