gpt4 book ai didi

java - Travis 每次提交都会构建两次(每次构建两个任务)

转载 作者:行者123 更新时间:2023-11-30 06:21:47 25 4
gpt4 key购买 nike

示例构建:https://travis-ci.org/sscarduzio/elasticsearch-readonlyrest-plugin/builds/322220103

请注意每次提交有 1 个构建,每个构建有 2 个相同的并行任务。这是一个问题,因为每个构建都需要很长时间!

我的.travis.yml配置:

sudo: required
dist: trusty
group: deprecated-2017Q4

language: java

sudo: required

services:
- docker

jdk:
- oraclejdk8

branches:
except:
- /^v[0-9].*es/

script: bin/build.sh

deploy:
provider: script
script: ci/ci-deploy.sh
skip_cleanup: true
on:
all_branches: true
tags: false

env:
- GH_USER_EMAIL=scarduzio+travisci@gmail.com
- GH_USER_NAME=Travis CI

before_script:
- sudo sysctl -w vm.max_map_count=262144

after_success:
- |

declare -r SSH_FILE="$HOME/.ssh/gh_identity)"

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# Decrypt the file containing the private key

openssl aes-256-cbc \
-K $encrypted_bf4db9d5783b_key -iv $encrypted_bf4db9d5783b_iv \
-in ".travis/github_deploy_key.enc" \
-out "$SSH_FILE" -d

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# Enable SSH authentication

chmod 600 "$SSH_FILE" \
&& printf "%s\n" \
"Host github.com" \
" IdentityFile $SSH_FILE" \
" LogLevel ERROR" >> ~/.ssh/config

```

最佳答案

这是由 env 配置引起的。 Travis 将此视为 build matrix 。我认为正确的方法是使用全局 key :

env:
global:
- GH_USER_EMAIL=
- GH_USER_NAME=

关于java - Travis 每次提交都会构建两次(每次构建两个任务),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47998295/

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