Simple plipeline: MYSQL and Connection container

Hi all!

I’m new to Drone and based on the documentation I’ve been trying to make a simple pipeline where I start an Instance of MYSQL, and then a simple test container opens a connection to MYSQL and exits. My problem is that the MYSQL container starts up, but the test container doesn’t.

Please take a look at my .drone.yml: can you find something wrong? Thanks!

//JMS

pipeline:
  integration-test:
    image: "attxproject/dockerize-drone-test:dev"
    commands:
      - "dockerize -wait tcp://mysql:3306 -timeout 240s"

services:
  mysql:
    image: "attxproject/unified-views-mariadb:stable-1.2"
    environment:
      - MYSQL_ROOT_PASSWORD=iamroot!
    ports:
        - "3306:3306"

Add sleep to wait the database to be ready.

- sleep 180
- "dockerize -wait tcp://mysql:3306 -timeout 240s"

Thanks! That works :sunglasses:

To share something back to the community, I’ve implemented the following Drone pipeline.

pipeline:
  integration-test:
    image: "attxproject/dockerize-drone-test:dev"
    commands:
      - "dockerize -wait tcp://mysql:3306 -timeout 240s"
      - "dockerize -wait http://fuseki:3030 -timeout 60s"
      - "dockerize -wait http://graphmanager:4302/health -timeout 60s"
      - "dockerize -wait http://uvprov:4301/health -timeout 60s"
      - "dockerize -wait http://provservice:7030/health -timeout 60s"

services:
  mysql:
    image: "attxproject/unified-views-mariadb:stable-1.2"
    environment:
       - MYSQL_ROOT_PASSWORD=iamroot!
  fuseki:
    image: "attxproject/attx-fuseki:dev"
    environment:
      - ADMIN_PASSWORD=pw123
  graphmanager:
    image: "attxproject/gm-api:dev"
  uvprov:
    image: "attxproject/uv-prov:dev"
  provservice:
    image: "attxproject/provenance-service:dev"