Search in sources :

Example 1 with DestinationRef

use of com.google.copybara.DestinationEffect.DestinationRef in project copybara by google.

the class Mirror method run.

@Override
public void run(Path workdir, @Nullable String sourceRef) throws RepoException, IOException, ValidationException {
    mirrorOptions.mirror(origin, destination, refspec, prune);
    // More fine grain events based on the references created/updated/deleted:
    generalOptions.eventMonitor().onChangeMigrationFinished(new ChangeMigrationFinishedEvent(ImmutableList.of(new DestinationEffect(Type.UPDATED, "Refspecs " + refspec + " mirrored successfully", // references
    ImmutableList.of(), new DestinationRef(getOriginDestinationRef(destination), "mirror", /*url=*/
    null), ImmutableList.of()))));
}
Also used : DestinationRef(com.google.copybara.DestinationEffect.DestinationRef) ChangeMigrationFinishedEvent(com.google.copybara.monitor.EventMonitor.ChangeMigrationFinishedEvent) DestinationEffect(com.google.copybara.DestinationEffect)

Aggregations

DestinationEffect (com.google.copybara.DestinationEffect)1 DestinationRef (com.google.copybara.DestinationEffect.DestinationRef)1 ChangeMigrationFinishedEvent (com.google.copybara.monitor.EventMonitor.ChangeMigrationFinishedEvent)1