Interface TagSCMHead


  • public interface TagSCMHead
    Mixin interface to identify SCMHead instances that correspond to a semi-immutable tag. Tags cannot be changed once created, but it may be possible to delete a tag and recreate a new tag with the same name as a previous tag.
    Since:
    2.0
    • Method Detail

      • getTimestamp

        long getTimestamp()
        Returns the timestamp of the tag. The timestamp is important because when iterating a newly configured SCMSource the consumer may not want to process old tags and instead may prefer to process tags created after some specific date.

        For example, if a consumer creates a job for every SCMHead it may not be a good idea to trigger builds of old tags (especially if the build were to result in a deployment to production). However when newly created tags are discovered on subsequent searches (or when reported by the events subsystem), it may be the intent of the user to have that tag result in a build (eg allowing the creation of a tag to trigger a release)

        NOTE: Implementers are strongly recommended to use the time that the tag was created as the timestamp. Where this is not possible, then implementers should use the maximum last modified timestamp of the contents of the tag.

        Returns:
        the timestamp, directly comparable to System.currentTimeMillis().