From 9cee90e2c8df2cb8a5126fc097b35b820af7d004 Mon Sep 17 00:00:00 2001 From: bsquillari Date: Tue, 31 Oct 2023 14:41:07 +0000 Subject: [PATCH] Fix observability job in pipeline Co-authored-by: shadad --- .gitlab-ci.yml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d08138b..9afff87 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -44,13 +44,6 @@ preparation: - echo "KIBANA_PROD_IMAGE_NAME=${IMAGE_BASE}/kibana:prod-${BUILD_ID}" >> context.env - echo "LOGSTASH_PROD_IMAGE_NAME=${IMAGE_BASE}/logstash:prod-${BUILD_ID}" >> context.env - - echo "ELK_SETUP_PROD_IMAGE_NAME=${IMAGE_BASE}/elk-setup:prod-${BUILD_ID}" >> context.env - - echo "ELK_PROD_IMAGE_NAME=${IMAGE_BASE}/elasticsearch:prod-${BUILD_ID}" >> context.env - - echo "HEARTBEAT_PROD_IMAGE_NAME=${IMAGE_BASE}/heartbeat:prod-${BUILD_ID}" >> context.env - - echo "CURATOR_PROD_IMAGE_NAME=${IMAGE_BASE}/curator:prod-${BUILD_ID}" >> context.env - - echo "KIBANA_PROD_IMAGE_NAME=${IMAGE_BASE}/kibana:prod-${BUILD_ID}" >> context.env - - echo "LOGSTASH_PROD_IMAGE_NAME=${IMAGE_BASE}/logstash:prod-${BUILD_ID}" >> context.env - - echo "DOCKER_HUB_SCREEN_CLIENT_IMAGE=$DOCKER_HUB_USER/screens-client:${BUILD_ID}" >> context.env - echo "DOCKER_HUB_BROWSER_CLIENT_IMAGE=$DOCKER_HUB_USER/browser-client:${BUILD_ID}" >> context.env - echo "DOCKER_HUB_GATEWAY_IMAGE=$DOCKER_HUB_USER/gateway:${BUILD_ID}" >> context.env @@ -198,6 +191,13 @@ build-and-run-elk: - docker push ${CURATOR_PROD_IMAGE_NAME} - docker push ${KIBANA_PROD_IMAGE_NAME} - docker push ${LOGSTASH_PROD_IMAGE_NAME} + + - export ELASTICSEARCH_IMAGE=${ELK_PROD_IMAGE_NAME} + - export ELK_SETUP_IMAGE=${ELK_PROD_IMAGE_NAME} + - export LOGSTASH_IMAGE=${LOGSTASH_PROD_IMAGE_NAME} + - export KIBANA_IMAGE=${KIBANA_PROD_IMAGE_NAME} + - export CURATOR_IMAGE=${CURATOR_PROD_IMAGE_NAME} + - export HEARTBEAT_IMAGE=${HEARTBEAT_PROD_IMAGE_NAME} - docker compose -f observability/docker-compose.yml --env-file $ENV_DEV_FILE --profile setup up -d - docker compose -f observability/docker-compose.yml -f observability/elk/extensions/curator/curator-compose.yml -f observability/elk/extensions/heartbeat/heartbeat-compose.yml --env-file $ENV_DEV_FILE up -d @@ -452,6 +452,13 @@ deploy-prod: - docker login -u $DOCKER_HUB_USER --password $DOCKER_HUB_PASS + - export ELASTICSEARCH_IMAGE=$DOCKER_HUB_ELK_IMAGE_NAME + - export ELK_SETUP_IMAGE=$DOCKER_HUB_ELK_SETUP_IMAGE_NAME + - export LOGSTASH_IMAGE=$DOCKER_HUB_LOGSTASH_IMAGE_NAME + - export KIBANA_IMAGE=$DOCKER_HUB_KIBANA_IMAGE_NAME + - export CURATOR_IMAGE=$DOCKER_HUB_CURATOR_IMAGE_NAME + - export HEARTBEAT_IMAGE=$DOCKER_HUB_HEARTBEAT_IMAGE_NAME + - docker compose -f observability/docker-compose.yml --env-file $ENV_DEV_FILE stop - docker compose -f observability/docker-compose.yml -f observability/elk/extensions/curator/curator-compose.yml -f observability/elk/extensions/heartbeat/heartbeat-compose.yml --env-file $ENV_DEV_FILE down - docker compose -f observability/docker-compose.yml --env-file $ENV_DEV_FILE rm -f