Skip to content

Cobliteam/circleci-orb-wait-for

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

wait-for things in CircleCI

CircleCI Orb commands to wait for anything testable with a Bourne shell command

Usefull when you need to wait for background dependencies to be ready before next job steps.

version: 2.1
orbs:
wait-for: cobli/wait-for@x.x.x
jobs:
build:
    docker:
    - image: builder-image:tag
    steps:
    - checkout
    - run:
        name: Some stuff
        command: ./some_command
    - wait-for/sh-command:
        #checks if a file exists ...
        sh_command: "[ ! -f /tmp/foo.txt ]"
        #... each 10 seconds ...
        seconds_between_retries: 10
        #... for 60 seconds
        timeout: 60
    - run:
        name: Build
        command: ./build_command

Needs timeout GNU command in CircleCI machine or base container.

Beside sh-command, this Orb contains some higher level commands to be used to wait for others containers/backgroud services:

  • wait-for/port: waits for a port to be open. Needs netcat (present in all important linux distribution)
  • wait-for/kafka: waits for a Kafka service to be ready. Needs netcat
  • wait-for/redis: waits for a Redis service to be ready. Needs netcat
  • wait-for/cassandra: waits for a Cassandra database to be ready. Needs netcat
  • wait-for/localstack-s3: waits for a Localstack S3 service to be ready. Needs curl

See examples

About

CircleCI Orb to wait for shell commands/ports/services

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published