1

I'm using Buddy Works CI/CD. My use case is that I want to run auto evaluation via CI every time there is a push of changing a evaluation data file. I have tried a lot but fail. My current approach is fetch the commit and check for file name. But do we have a option that trigger on file change?

- pipeline: evaluate
  name: Evaluate Model on Dataset Change
  refs:
  - refs/heads/main
  events:
  - type: PUSH
    refs:
    - refs/heads/main
  fail_on_prepare_env_warning: true
  actions:
  - action: evaluate_model
    type: BUILD
    docker_image_name: library/python
    docker_image_tag: 3.13
    execute_commands:
    - echo "Forcing full detection of changed dataset files..."
    - ""
    - "# Ensure full history so diff works"
    - git fetch origin main --unshallow || git fetch origin main
    - ""
    - "# Extract the last two commits on the remote main"
    - LAST_TWO=$(git rev-list origin/main -n 2)
    - AFTER=$(echo "$LAST_TWO" | sed -n 1p)
    - BEFORE=$(echo "$LAST_TWO" | sed -n 2p)
    - ""
    - "echo \"Before: $BEFORE\""
    - "echo \"After:  $AFTER\""
    - ""
    - CHANGED_FILES=$(git diff --name-only "$BEFORE" "$AFTER" || true)
    - ""
    - echo "Changed files detected:"
    - echo "$CHANGED_FILES"
    - ""
    - if ! echo "$CHANGED_FILES" | grep -q '^dataset/'; then
    - '  echo "No dataset changes detected — skipping evaluation."'
    - exit 0
    - fi
    - ""
    - echo "Dataset changed → running evaluation..."
    - pip install -r requirements.txt
    - export PYTHONPATH=.
    - 'python scripts/run_evaluation.py    '
    - ""
    shell: BASH

1 Answer 1

1

I did it!

They support this by adding property:

  trigger_conditions:
    - trigger_condition: ON_CHANGE_AT_PATH
      trigger_condition_paths:
        - dataset/data.json
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.