繁体   English   中英

Azure 管道 AWS Powershell 脚本任务

[英]Azure Pipeline AWS Powershell script task

我想在我的 AWS Elastic Beanstalk 中使用 powershell 来安装一些 windows 功能(即 web 套接字)。

我找到了这个https://docs.aws.amazon.com/vsts/latest/userguide/awspowershell-module-script.html但我不知道,我找不到与此等效的任务。 目前在我的管道中,我有这个

      - 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'

但是这个运行在 bash shell 脚本上。 powershell 脚本的等效任务是什么?

Azure 管道 AWS Powershell 脚本任务

您正在寻找的应该是扩展AWS Toolkit for Azure DevOps

Amazon S3、AWS Elastic Beanstalk、AWS CodeDeploy、AWS Lambda 和 AWS CloudFormation 等的任务,以及在 Windows PowerShell 模块和 AWS CLI 模块的 AWS 工具中运行命令

安装此扩展后,我们可以添加任务 AWS Tools for Windows PowerShell 脚本:

在此处输入图像描述

- 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

希望这可以帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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