简体   繁体   中英

Azure Pipeline AWS Powershell script task

I want to use the powershell in my AWS Elastic Beanstalk to install some windows feature(ie. web sockets).

i found this https://docs.aws.amazon.com/vsts/latest/userguide/awspowershell-module-script.html but I don't know and I cant find the task equivalent for this. currently in my pipeline I have this

      - task: AmazonWebServices.aws-vsts-tools.awsshellscript.awsshellscript@1
        displayName: 'Install Web Socket Protocol'
        inputs:
          scriptSource: 'inline'
          script: 'Install-WindowsFeature -name Web-WebSockets'
          awsCredentials: 'AWS-test'
          regionName: 'ap-southeast-2'
          applicationName: 'test'
          environmentName: 'test-staging'

but this one runs on the bash shell script. What is the equivalent task for powershell script?

Azure Pipeline AWS Powershell script task

What you are looking for should be the extension AWS Toolkit for Azure DevOps :

Tasks for Amazon S3, AWS Elastic Beanstalk, AWS CodeDeploy, AWS Lambda and AWS CloudFormation and more, and running commands in the AWS Tools for Windows PowerShell module and the AWS CLI .

After installing this extension, we could add the task AWS Tools for Windows PowerShell Script:

在此处输入图像描述

- task: AmazonWebServices.aws-vsts-tools.AWSPowerShellModuleScript.AWSPowerShellModuleScript@1
  displayName: 'AWS Tools for Windows PowerShell Script: '
  inputs:
    awsCredentials: 'AWS-test'
    regionName: xxxx
    arguments: xxxx
    scriptType: inline

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM