Block other commit to branch

We are deploying Kubernetes infra structure using CircleCI. If job is running on same branch next job have to wait for pervious job to be completed how do I implement that in CircleCI.

Secondly when someone commit in master should be completed his workflow without starting queued job. What is happening that if my allotted job are running and someone commit new job status will be queued when master branch completed a workflow its started the queue of new job instead of completing workflow of pervious job.

We have an orb available that can queue your jobs for you. You can find some examples on the orb page: https://circleci.com/orbs/registry/orb/eddiewebb/queue