Commit 6c8b011b authored by Noel Alonso's avatar Noel Alonso
Browse files

Mejora estructura del yml

parent dd6965d4
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -99,9 +99,9 @@ stages:
          -d redmic \
          -U ${POSTGRES_USER} \
          -c 'select 1' > /dev/null 2>&1 || [ $RETRIES -eq 0 ];
      do \
          RETRIES=$((RETRIES-=1)); \
          echo "Waiting for postgres server, ${RETRIES} remaining attempts..."; \
      do
          RETRIES=$((RETRIES-=1));
          echo "Waiting for postgres server, ${RETRIES} remaining attempts...";
          sleep 1;
      done;
      docker exec postgres psql -h localhost \
@@ -178,15 +178,15 @@ stages:
      HEALTH_CHECK_URL="${ELASTIC_HOSTS}:${ELASTIC_PORT}/_cat/health?h=status";
      RESPONSE="";

      until [ "$$RESPONSE" = 'green' ];
      do \
        RESPONSE=$((curl --silent -u "${ELASTIC_USER}:${ELASTIC_USER_PASS}" "${HEALTH_CHECK_URL}")); \
        echo "Waiting for elasticsearch server (${HEALTH_CHECK_URL} -> ${RESPONSE}), remaining attempts..."; \
      until [ "$$RESPONSE" = 'green' ]
      do
        RESPONSE=$(curl --silent -u "${ELASTIC_USER}:${ELASTIC_USER_PASS}" "${HEALTH_CHECK_URL}");
        echo "Waiting for elasticsearch server (${HEALTH_CHECK_URL} -> ${RESPONSE}), remaining attempts...";
        sleep 5;
      done;

    - >
      docker login ${GITLAB_REGISTRY_HOST} -u ${CI_DEPLOY_USER} -p ${CI_DEPLOY_PASSWORD};

      docker run -d --rm --name schema-es \
        --network test \
        -e ELASTIC_USER \