openzipkin / brave-cassandra

Tracing instrumentation for Cassandra and the DataStax Java Driver
Apache License 2.0
12 stars 14 forks source link

Stops build early if the change only effects documentation #40

Closed codefromthecrypt closed 3 years ago

codefromthecrypt commented 3 years ago

Prevent test and SNAPSHOT deploy of a documentation-only change.

if: conditions are preferred as they obviate job creation. However, they can only use pre-defined env variables or globals that can be evaluated statically. The other way to skip is to exit early. We do that here to prevent overhead of running tests and SNAPSHOT deploys that only include Markdown (documentation) updates. Early terminating here will also prevent the subsequent deploy SNAPSHOT job.

Note: This early exit does not prevent a release tag on a doc-only commit because the if: conditions here don't match the release conditions.

codefromthecrypt commented 3 years ago

This works in theory.. after merge I'll make a README change :)

I think it will work because it is setup almost identically here https://github.com/google/EarlGrey/blob/master/.travis.yml#L68-L74

codefromthecrypt commented 3 years ago

Will report back after a couple experiments:

codefromthecrypt commented 3 years ago

luckily there was something broke in our README https://github.com/openzipkin/brave-cassandra/pull/41

codefromthecrypt commented 3 years ago

Merging this commit still deployed a snapshot, which it should have as it effected something besides README

Screen Shot 2020-11-10 at 1 05 10 PM

codefromthecrypt commented 3 years ago

PR based tests worked as expected. watching master now.. https://travis-ci.com/github/openzipkin/brave-cassandra/builds/199565466

codefromthecrypt commented 3 years ago

glitch on that one, only the test stage was terminated, not the deploy. https://github.com/openzipkin/brave-cassandra/pull/42 should fix it.

codefromthecrypt commented 3 years ago

OK verified that the master merge job exits early. you can tell by the time it takes anyway, but I clicked to make sure. next step is to run a release directly off that README-only commit to verify my sanity... as the skipping should not apply to the release job.

Screen Shot 2020-11-10 at 2 13 06 PM

codefromthecrypt commented 3 years ago

https://travis-ci.com/github/openzipkin/brave-cassandra/builds/199571293 is going for release

codefromthecrypt commented 3 years ago

release all good. calling this one done