Closed codefromthecrypt closed 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
Will report back after a couple experiments:
luckily there was something broke in our README https://github.com/openzipkin/brave-cassandra/pull/41
Merging this commit still deployed a snapshot, which it should have as it effected something besides README
PR based tests worked as expected. watching master now.. https://travis-ci.com/github/openzipkin/brave-cassandra/builds/199565466
glitch on that one, only the test stage was terminated, not the deploy. https://github.com/openzipkin/brave-cassandra/pull/42 should fix it.
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.
https://travis-ci.com/github/openzipkin/brave-cassandra/builds/199571293 is going for release
release all good. calling this one done
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.