Travis CI build trigger with only specific commit message
1 answer
question you mentioned about deploying the travis build. So the condition on:
only determines whether the assembly is deployed or not. Regardless of this setting, other build steps are performed on each commit / pull request.
Instead, you can add [ci-skip]
or [skip-ci]
in commit messages to force the skip .
You can also use the TRAVIS_COMMIT_MESSAGE
env variable in all your follow steps to determine if a step should be executed or skipped, for example
script: if [[ $TRAVIS_COMMIT_MESSAGE == *"trigger build"* ]]; then mvn install ; fi ;
+3
source to share