js” as the pipeline configuration.

Accurate, factual information from observations
Post Reply
poxoja9630
Posts: 10
Joined: Sun Dec 22, 2024 5:33 am

js” as the pipeline configuration.

Post by poxoja9630 »

A new file azure-pipeline.yml will be created. Replace the contents of this file with the following code: YAML Copy the code jobs: - job: infrastructure pool: vmImage: 'ubuntu-16.04' steps: - task: Npm@1 inputs: command: install workingDir: "./" - task: Pulumi@1 condition: or(eq(variables['Build.Reason'], 'IndividualCI'), eq(variables['Build.Reason'], 'Manual')) inputs: command: 'up' cwd: './' stack: 'dev' args: '--yes' - script: | echo "##vso[task.setvariable variable=resourceGroupName;isOutput=true]$(pulumi stack output resourceGroupName)" echo "##vso[task.setvariable variable=storageAccountName;isOutput=true]$(pulumi stack output storageAccountName)" echo "##vso[task.setvariable variable=containerName;isOutput=true]$(pulumi stack output containerName)" displayName: 'Set stack outputs as variables' name: 'pulumi' Let's look at the tasks defined in these files: First, they use the task Npm to install all the dependencies defined in package.

json The second task is to use the Pulumi task extension to run the philippines whatsapp number command up. This is the equivalent of the command twilio infra:deploy used in our previous deployment examples. In this command, we also specify the following: stack : here you define the name we gave to the environment at the beginning of this article condition : this is the condition that will trigger the execution of this pipeline. We run this step especially when we commit something to the main branch ( IndividualCI) or when we trigger the job manually ( Manual) Define variables Now we need to define some variables that will be used by the pipeline.


Image

In the top right corner, click on “Variables” and add the following variables. Make sure to select “Keep this value secret” before saving the variable. PULUMI_ACCESS_TOKEN : token you created in Pulumi dashboard TWILIO_ACCOUNT_SID : SID of the Twilio account you want to deploy your resources to (make sure this account does not contain any resources created via the same file) TWILIO_AUTH_TOKEN : authentication token of the Twilio account specified above Run your pipeline Now that you have defined the steps and configured the environment variables, you can run your pipeline. Click “Save and run” in the top right corner of the page.
Post Reply