Skip to content

bahmutov/commit-message-install-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

commit-message-install-example CircleCI

See https://github.com/cypress-io/commit-message-install

See circle.yml which uses CircleCI early halt feature to stop the job if there is no commit message JSON

# install tool locally
- run: npm install @cypress/commit-message-install
- run: |
    if ! $(npm bin)/has-message; then
        echo Stopping early, no commit message
        circleci-agent step halt
    else
        echo All good, found commit message JSON
    fi
# install tool globally using Yarn
- run: yarn global @cypress/commit-message-install
- run: |
    if ! has-message; then
        echo Stopping early, no commit message
        circleci-agent step halt
    else
        echo All good, found commit message JSON
    fi

Note

When you halt a job it is considered successfully finished. Thus in a workflow, the jobs that follow will start running. If you really want to halt everything, make this utility into a command and halt each job.

About

Example halting CircleCI when there is no commit message information

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages