Codeship Scripts Codeship Status for codeship/scripts

A public collection of useful scripts for use on Codeship and similar tools.

E.g. scripts to install specific versions of software not included by default on the build VMs. Deployment scripts for external services to customize to your needs, configure caching or trigger notifications. And other scripts if you want to have them included ;)

Using the scripts

Each script includes a comment at the beginning detailing how to configure and use the script in your builds. Those comments look for example like

# Add at least the following environment variables to your project configuration
# (otherwise the defaults below will be used).
# * FIREFOX_VERSION
#
# Include in your builds via
# \curl -sSL https://raw.githubusercontent.com/codeship/scripts/master/packages/firefox.sh | bash -s

It is important that you follow those instructions and not simply copy / paste the scripts into your Codeship project configuration.

Most scripts include set -e to make the script fail as soon as a subcommand returns a non-zero exit code (which indicates failure).

This is fine if you call the script as documented above (via the curl command). But it will have side effects if you copy the commands into your settings on codeship.com as any command that fails after the set -e) will terminate your build. You'll get a SYSTEM build status, but no further error message or log output. You probably don't want this :)

Please see the post at https://community.codeship.com/t/npm-test-a-b-c-where-b-throws-but-result-shows-ok/61/3 for more information on how set -e works and why this causes issues if you include it in your setup or test commands.

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.



Codeship Scripts Codeship Status for codeship/scripts

公开收集代码和类似工具使用的有用脚本。

例如。用于安装构建VM上默认不包含的特定版本软件的脚本。外部服务的部署脚本可根据需要进行自定义,配置缓存或触发通知。和其他脚本,如果你想让它们包括;)

使用脚本

每个脚本在开头都包括一个注释,详细说明如何在构建中配置和使用脚本。那些评论像

一样
# Add at least the following environment variables to your project configuration
# (otherwise the defaults below will be used).
# * FIREFOX_VERSION
#
# Include in your builds via
# \curl -sSL https://raw.githubusercontent.com/codeship/scripts/master/packages/firefox.sh | bash -s

重要的是,请遵循这些说明,而不是简单地将脚本复制/粘贴到代码项目配置中。

大多数脚本包括 set -e ,只要子命令返回非零退出代码(表示失败),脚本就会失败。

如果您调用上面所述的脚本(通过 curl 命令),这是很好的。但是如果将命令复制到 codeship.com 上的设置中,那么将会产生副作用,因为在 set -e < / code>)将终止你的构建。你将得到一个 SYSTEM 构建状态,但没有进一步的错误消息或日志输出。你可能不想要这样:)

请参阅的帖子https://community.codeship.com/t/npm-test-abc-where-b-throws-but-result-shows-ok/61/3 有关 set -e的更多信息的工作原理,为什么如果您将其包含在您的设置或测试命令中,则会导致问题

行为准则

请注意,该项目是通过贡献者行为准则发布的。通过参与这个项目,您同意遵守其条款。




相关问题推荐