From 661039420ff12f27e33e977f3d6a741e5d2b9345 Mon Sep 17 00:00:00 2001 From: Dmitry Gurevich <99176494+gurevichdmitry@users.noreply.github.com> Date: Thu, 7 Nov 2024 12:31:51 +0200 Subject: [PATCH] add env vars --- .github/actions/cdr/action.yml | 4 ++-- .github/actions/elk-stack/action.yml | 2 +- .github/workflows/test-environment.yml | 14 ++++++++++++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/actions/cdr/action.yml b/.github/actions/cdr/action.yml index 477274c57c..087cc5c718 100644 --- a/.github/actions/cdr/action.yml +++ b/.github/actions/cdr/action.yml @@ -268,7 +268,7 @@ runs: - name: Deploy AWS Asset Inventory agent if: ${{ !cancelled() && steps.asset-inventory-version-check.outputs.asset_inventory_supported == 'true' }} working-directory: deploy/test-environments/cdr - shell: bash + shell: bash env: EC2_ASSET_INV_KEY: ${{ steps.generate-data.outputs.ec2-asset-inv-key }} ASSET_INV_PUBLIC_IP: ${{ steps.generate-data.outputs.asset-inv-public-ip }} @@ -282,7 +282,7 @@ runs: id: upload-state-cdr if: always() working-directory: deploy/test-environments - shell: bash + shell: bash env: S3_BUCKET: ${{ inputs.env-s3-bucket }} CLOUDTRAIL_KEY: ${{ steps.generate-data.outputs.aws-ec2-cloudtrail-key }} diff --git a/.github/actions/elk-stack/action.yml b/.github/actions/elk-stack/action.yml index aa90101c4c..0f9b864732 100644 --- a/.github/actions/elk-stack/action.yml +++ b/.github/actions/elk-stack/action.yml @@ -123,4 +123,4 @@ runs: S3_BUCKET: ${{ inputs.env-s3-bucket }} shell: bash run: | - ./manage_infrastructure.sh "elk-stack" "upload-state" \ No newline at end of file + ./manage_infrastructure.sh "elk-stack" "upload-state" diff --git a/.github/workflows/test-environment.yml b/.github/workflows/test-environment.yml index 2f6fb89af3..8bce97ab1a 100644 --- a/.github/workflows/test-environment.yml +++ b/.github/workflows/test-environment.yml @@ -294,10 +294,20 @@ jobs: python3 ../../.ci/scripts/create_env_config.py aws s3 cp "./env_config.json" "${S3_BUCKET}/env_config.json" + - name: Update Stack Vars + env: + STACK_ES_USER: ${{ steps.elk-stack.outputs.es-user }} + STACK_ES_PASSWORD: ${{ steps.elk-stack.outputs.es-password }} + STACK_KIBANA_URL: ${{ steps.elk-stack.outputs.kibana-url }} + STACK_ES_URL: ${{ steps.elk-stack.outputs.es-url }} + run: | + echo "ES_USER=$STACK_ES_USER" >> $GITHUB_ENV + echo "ES_PASSWORD=$STACK_ES_PASSWORD" >> $GITHUB_ENV + echo "KIBANA_URL=$STACK_KIBANA_URL" >> $GITHUB_ENV + echo "ES_URL=$STACK_ES_URL" >> $GITHUB_ENV + - name: Summary if: success() - env: - KIBANA_URL: ${{ steps.elk-stack.outputs.kibana-url }} run: | summary="Kibana URL: $KIBANA_URL" bucket_name="$S3_BASE_BUCKET"