简体   繁体   English

Thoughtworks GO - 更改Artefact文件权限

[英]Thoughtworks GO - Changing Artefact File Permissions

I'm using thoughworks go for a build pipeline as shown below: 我正在使用ifworks去构建管道,如下所示:

在此输入图像描述

The "Test" stage fetches artefacts from the build stage and runs each of it's jobs in parallel (unit tests, integration test, acceptance tests, package) on different ages. “测试”阶段从构建阶段获取人工制品,并在不同年龄段并行运行每个工作(单元测试,集成测试,验收测试,包)。 However, each of those jobs is a shell script. 但是,每个作业都是一个shell脚本。

When those tasks are run on a different agent they are failing because permission is denied. 当这些任务在不同的代理上运行时,它们会因为权限被拒绝而失败。 Each job is a shell script, and when I ssh into the agent I can see it does not have executable permissions as shown below: 每个作业都是一个shell脚本,当我进入代理程序时,我可以看到它没有可执行权限,如下所示:

drwxrwxr-x 2 go go 4096 Mar  4 09:48 .
drwxrwxr-x 8 go go 4096 Mar  4 09:48 ..
-rw-rw-r-- 1 go go  408 Mar  4 09:48 aa_tests.sh
-rw-rw-r-- 1 go go  443 Mar  4 09:48 Dockerfile
-rw-rw-r-- 1 go go  121 Mar  4 09:48 run.sh

However, in the git repository they have executable permission and they seem to execute fine on the build agent that clones the git repository. 但是,在git存储库中,它们具有可执行权限,并且它们似乎在克隆git存储库的构建代理上执行正常。

I solved the problem by executing the script with bash. 我通过使用bash执行脚本解决了这个问题。 Eg "bash sriptname.sh" as the command for the task. 例如“bash sriptname.sh”作为任务的命令。

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

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