@@ -145,6 +145,8 @@ jobs:
145
145
runs-on : ubuntu-latest
146
146
environment : QA
147
147
needs : [Build, Testing]
148
+ env :
149
+ cosmoskey : ::add-mask::${{ steps.arm_deployment.outputs.cosmosDBkey }}
148
150
steps :
149
151
- name : Repository checkout
150
152
uses : actions/checkout@v4
@@ -181,7 +183,7 @@ jobs:
181
183
async function createSP() {
182
184
const { CosmosClient } = require("@azure/cosmos");
183
185
const endpoint = "${{ steps.arm_deployment.outputs.cosmosDBendpoint }}";
184
- const key = "::add-mask:: ${{ steps.arm_deployment.outputs.cosmosDBkey }}";
186
+ const key = "${{ env.cosmoskey }} ";
185
187
const client = new CosmosClient({ endpoint, key });
186
188
const { database } = await client.databases.createIfNotExists({ id: 'SampleDatabase' });
187
189
const { container } = await database.containers.createIfNotExists({ id: 'WebAppContext' });
@@ -212,7 +214,7 @@ jobs:
212
214
async function createTrigger() {
213
215
const { CosmosClient } = require("@azure/cosmos");
214
216
const endpoint = "${{ steps.arm_deployment.outputs.cosmosDBendpoint }}";
215
- const key = "::add-mask:: ${{ steps.arm_deployment.outputs.cosmosDBkey }}";
217
+ const key = "${{ env.cosmoskey }}";
216
218
const client = new CosmosClient({ endpoint, key });
217
219
const { database } = await client.databases.createIfNotExists({ id: 'SampleDatabase' });
218
220
const { container } = await database.containers.createIfNotExists({ id: 'WebAppContext' });
@@ -258,6 +260,8 @@ jobs:
258
260
runs-on : ubuntu-latest
259
261
environment : Production
260
262
needs : QA
263
+ env :
264
+ cosmoskey : ::add-mask::${{ steps.arm_deployment.outputs.cosmosDBkey }}
261
265
steps :
262
266
- name : Repository checkout
263
267
uses : actions/checkout@v4
@@ -294,7 +298,7 @@ jobs:
294
298
async function createSP() {
295
299
const { CosmosClient } = require("@azure/cosmos");
296
300
const endpoint = "${{ steps.arm_deployment.outputs.cosmosDBendpoint }}";
297
- const key = "::add-mask:: ${{ steps.arm_deployment.outputs.cosmosDBkey }}";
301
+ const key = "${{ env.cosmoskey }}";
298
302
const client = new CosmosClient({ endpoint, key });
299
303
const { database } = await client.databases.createIfNotExists({ id: 'SampleDatabase' });
300
304
const { container } = await database.containers.createIfNotExists({ id: 'WebAppContext' });
@@ -321,8 +325,8 @@ jobs:
321
325
async function createTrigger() {
322
326
const { CosmosClient } = require("@azure/cosmos");
323
327
const endpoint = "${{ steps.arm_deployment.outputs.cosmosDBendpoint }}";
324
- const key = "::add-mask:: ${{ steps.arm_deployment.outputs.cosmosDBkey }}";
325
- const client = new CosmosClient({ endpoint, key });
328
+ const key = "${{ env.cosmoskey }}";
329
+ const client = new CosmosClient({ endpoint, key });
326
330
const { database } = await client.databases.createIfNotExists({ id: 'SampleDatabase' });
327
331
const { container } = await database.containers.createIfNotExists({ id: 'WebAppContext' });
328
332
const { sampleTrigger } = require('./Triggers/SampleTrigger.js')
@@ -351,4 +355,4 @@ jobs:
351
355
uses : azure/webapps-deploy@v2
352
356
with :
353
357
app-name : ${{ steps.arm_deployment.outputs.webappname }}
354
- package : SampleApp
358
+ package : SampleApp
0 commit comments