简体   繁体   English

无法从 AzureDevops 管道运行 shell 脚本

[英]Unable to run shell script from AzureDevops pipeline

I am new to AzureDevops pipelines.我是 AzureDevops 管道的新手。 I have a simple task, I want to run a shell script which is residing in my azure git repo.我有一个简单的任务,我想运行一个驻留在我的 azure git repo 中的 shell 脚本。

    steps:
- task: Bash@3
  inputs:
    targetType: 'inline' # Optional. Options: filePath, inline
    #filePath: ./TestProject
    #arguments: # Optional

- script: 
    pwd
    set +x token.sh
    sh token.sh

Build is getting successful but I don't see it has picked the sh file:构建正在成功,但我没有看到它选择了 sh 文件:

Generating script.


10(node:3269) Warning: Use Cipheriv for counter mode of aes-256-ctr


11(node:3269) Warning: Use Cipheriv for counter mode of aes-256-ctr


12(node:3269) Warning: Use Cipheriv for counter mode of aes-256-ctr


13Script contents:


14pwd set +x token.sh sh token.sh


15(node:3269) Warning: Use Cipheriv for counter mode of aes-256-ctr


16========================== Starting Command Output ===========================


17(node:3269) Warning: Use Cipheriv for counter mode of aes-256-ctr


18(node:3269) Warning: Use Cipheriv for counter mode of aes-256-ctr


19(node:3269) Warning: Use Cipheriv for counter mode of aes-256-ctr


20/bin/bash --noprofile --norc /home/vsts/work/_temp/33bdee3d-19de-47b6-8eab-01124cb0a0ed.sh


21/home/vsts/work/1/s


22Finishing: CmdLine

Build is successful but there is no log for sh execution.构建成功但是没有执行sh的日志。

I tested it in three tasks(Command line ,Shell Exec ,Bash ) with a simple .sh file sample , every thing work well in these tasks , sh file executes normally.我用一个简单的.sh文件示例在三个任务(命令行、Shell Exec、Bash)中对其进行了测试,在这些任务中每件事都运行良好,sh 文件正常执行。

在此处输入图片说明 在此处输入图片说明

So can you share the token.sh sample file for further investigation?那么您可以共享token.sh示例文件以供进一步调查吗? If there is any personal privacy information, please protect it.如果有任何个人隐私信息,请予以保护。

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

相关问题 无法通过管道从 azure repo 触发 shell 脚本 - Unable to trigger shell script from azure repo through pipeline "无法在 Terraform 中运行 shell 脚本" - Unable to run shell script in Terraform 尝试从 Azure DevOps 管道运行 Power Shell 脚本以连接到 Azure Windows 2016 vm - Trying to run Power Shell script from Azure DevOps pipeline to connect to Azure Windows 2016 vm 无法使用命令行脚本将 warfile 从代理文件夹复制到 AzureDevops 中的 Tomcat 文件夹 - Unable to copy warfile from agent folder to Tomcat folder in AzureDevops using command line script NUnit azuredevops 管道 - NUnit azuredevops pipeline “只读模式”中的 azure function - 来自 zip 的 AzureDevops 管道部署 - azure function in 'read only mode' - AzureDevops pipeline deployment from zip 更改 AzureDevOps 触发器不起作用(从构建到构建管道) - Changing the AzureDevOps trigger doesn't work (from build to build pipeline) 如何将参数从 azure 管道传递到 shell 脚本? - How to pass parameters from azure pipeline to shell script? AzureDevOps 管道 CICD 未找到对象 - AzureDevOps Pipeline CICD No Objects Found 以管理员身份运行 Azure Pipeline 和 powershell 脚本中的 .exe 文件 - Run As administrator for .exe file from Azure Pipeline and powershell script
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM