From c0f3a5138b166e9de0acbff0c1f85cc1f162ceab Mon Sep 17 00:00:00 2001 From: Sayali Gaikawad Date: Wed, 10 Apr 2024 16:31:56 -0700 Subject: [PATCH] Fix context variable name and workflow syntax Signed-off-by: Sayali Gaikawad --- .github/workflows/nightly-playground-deploy.yml | 2 +- .github/workflows/nightly-playground-trigger.yml | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly-playground-deploy.yml b/.github/workflows/nightly-playground-deploy.yml index 29867d6..c90a2cc 100644 --- a/.github/workflows/nightly-playground-deploy.yml +++ b/.github/workflows/nightly-playground-deploy.yml @@ -85,7 +85,7 @@ jobs: run: | npm install playground_id=`echo ${{inputs.dist_version}} | cut -d. -f1`x - npm run cdk deploy "infraStack*" -- -c playgroundId=$playground_id -c distVersion=${{inputs.dist_version}} -c distributionUrl=${{needs.set-os-osd-urls.outputs.OPENSEARCH_URL}} -c dashboardsUrl=${{needs.set-os-osd-urls.outputs.OPENSEARCH_DASHBOARDS_URL}} -c dashboardPassword=${{ SECRETS.DASHBOARDS_PASSWORD }} -c adminPassword=${{ SECRETS.OPENSEARCH_PASSWORD }} --require-approval never --outputs-file output.json + npm run cdk deploy "infraStack*" -- -c playGroundId=$playground_id -c distVersion=${{inputs.dist_version}} -c distributionUrl=${{needs.set-os-osd-urls.outputs.OPENSEARCH_URL}} -c dashboardsUrl=${{needs.set-os-osd-urls.outputs.OPENSEARCH_DASHBOARDS_URL}} -c dashboardPassword=${{ SECRETS.DASHBOARDS_PASSWORD }} -c adminPassword=${{ SECRETS.OPENSEARCH_PASSWORD }} --require-approval never --outputs-file output.json yq e '.. | select(has("loadbalancerurl")) | .loadbalancerurl' output.json echo "ENDPOINT=$(aws cloudformation --region us-west-2 describe-stacks --stack-name infraStack-$playground_id --query 'Stacks[0].Outputs[0].OutputValue' --output text)" >> "$GITHUB_OUTPUT" diff --git a/.github/workflows/nightly-playground-trigger.yml b/.github/workflows/nightly-playground-trigger.yml index 70535f4..4964131 100644 --- a/.github/workflows/nightly-playground-trigger.yml +++ b/.github/workflows/nightly-playground-trigger.yml @@ -11,10 +11,14 @@ jobs: matrix: dist_version: ['2.13.0', '3.0.0'] uses: opensearch-project/opensearch-devops/.github/workflows/nightly-playground-deploy.yml@main + secrets: inherit with: dist_version: ${{ matrix.dist_version }} update-ngnix-config: + permissions: + id-token: write + contents: read runs-on: ubuntu-latest needs: deploy-nightly-playground steps: @@ -33,4 +37,4 @@ jobs: working-directory: nightly-playground run: | npm install - npm run cdk deploy "ngnixBased*" -- -c playgroundId=3x -c distVersion="3.0.0" -c distributionUrl="someUrl" -c dashboardsUrl="someUrl" -c dashboardPassword="somePassword" -c adminPassword="somePassword" -c endpoint2x=${{needs.deploy-nightly-playground.outputs.endpoint_2x}} -c endpoint3x=${{needs.deploy-nightly-playground.outputs.endpoint_3x}} --require-approval never \ No newline at end of file + npm run cdk deploy "ngnixBased*" -- -c playGroundId=3x -c distVersion="3.0.0" -c distributionUrl="someUrl" -c dashboardsUrl="someUrl" -c dashboardPassword="somePassword" -c adminPassword="somePassword" -c endpoint2x=${{needs.deploy-nightly-playground.outputs.endpoint_2x}} -c endpoint3x=${{needs.deploy-nightly-playground.outputs.endpoint_3x}} --require-approval never \ No newline at end of file