How to stop triggering build automatically for every commit

I have a pipeline jobs imported into another pipeline.
Here success and failure is imported from another piepline.

Now for every commit I make a pipeline is being triggered.
How do I stop this.

I want success or failure to trigger only if artifactory_dryrun3 or artifactory_dryrun4 is triggered

artifactory_dryrun3:
  stage: run
  image: 
  script:
  rules:
    - if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TAG == "artifactory_dryrun3"

artifactory_dryrun4:
  stage: run
  image: 
  script:
  rules:
    - if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TAG == "artifactory_dryrun3"

success:
  stage: notification
  needs:
    - job: artifactory_dryrun4
      artifacts: true
    - job: artifactory_dryrun3
      artifacts: true  
  extends: .notify_success

failure:
  stage: notification
  needs:
    - job: artifactory_dryrun4
      artifacts: true
    - job: artifactory_dryrun3
      artifacts: true  
  extends: .notify_failure

Is this a build for every commit, or a build for every Merge Request?
If this is the case, the following link may be of help.

Hi there,

I believe you could use rules, but on workflow level → it controls if the whole pipeline is created or not.

If you want to trigger the whole pipeline only on schedule, then I’d extract that part into the workflow > rules at the top of the file:

workflow:
  rules:
    - if: $CI_PIPELINE_SOURCE == "schedule"

# the rest of the yaml...

This way pipeline will be created only on schedule, and specific jobs depending on further rules.

However, you will still have the issue with the success / failure jobs: with needs, they need both jobs in order to run (AND, not OR). So, unfortunately, I believe you will have to split them in two (one for dryrun3 and one for dryrun4).