gpt4 book ai didi

travis-ci - 如何重现 travis-ci 构建环境以进行调试

转载 作者:行者123 更新时间:2023-12-03 05:35:58 25 4
gpt4 key购买 nike

我在 travis-ci 上看到构建失败,我无法在本地计算机上重现该错误。是否有关于设置与 travis-ci Linux 构建环境相同的虚拟机的说明?我很高兴 travis-ci 已经揭示了一个新的错误,但不太高兴通过发送添加调试代码的提交来调试它。

最佳答案

对于基于容器的构建,现在有 instructions on how to setup a docker image locally .

不幸的是,相当多的步骤仍然是手动的。以下是启动并运行它所需的命令:

# change the image according to the language chosen in .travis.yml
$ docker run -it -u travis quay.io/travisci/travis-jvm /bin/bash

# now that you are in the docker image, switch to the travis user
sudo su - travis

# Install a recent ruby (default is 1.9.3)
rvm install 2.3.0
rvm use 2.3.0

# Install travis-build to generate a .sh out of .travis.yml
cd builds
git clone https://github.com/travis-ci/travis-build.git
cd travis-build
gem install travis
travis # to create ~/.travis
ln -s `pwd` ~/.travis/travis-build
bundle install

# Create project dir, assuming your project is `me/project` on GitHub
cd ~/builds
mkdir me
cd me
git clone https://github.com/me/project.git
cd project
# change to the branch or commit you want to investigate
travis compile > ci.sh
# You most likely will need to edit ci.sh as it ignores matrix and env
bash ci.sh

关于travis-ci - 如何重现 travis-ci 构建环境以进行调试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29753560/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com