我有:
CentOS 6最终操作系统;
亚搏体育app 11.10.4;
使用android executor
我config.toml
的一部分:
concurrent = 1
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "android-1"
如何查看concurrent = 1
让我们看看我的.gitlab-ci.yml
:
image: runmymind/docker-android-sdk:latest
variables:
GRADLE_USER_HOME: $CI_PROJECT_DIR/.gradle
cache:
key: $CI_PROJECT_NAME
paths:
- .gradle/wrapper/
- .gradle/caches/
before_script:
- echo $JAVA_HOME
- echo $ANDROID_HOME
- echo $PATH
- chmod +x ./gradlew
stages:
- check
checkStage:
stage: check
script:
- set +e
- du -sh $CI_PROJECT_DIR/.gradle/wrapper
- du -sh $CI_PROJECT_DIR/.gradle/caches
- set -e
- ./gradlew check
artifacts:
when: on_failure
paths:
- build_results
有效。但是,当我在多个分支机构中推广时,我有: 一份工作:
Running with gitlab-runner 11.10.1 (1f513601)
on android-1 cf4dbddf
Using Docker executor with image runmymind/docker-android-sdk:latest ...
Using locally found image version due to if-not-present pull policy
Using docker image sha256:05edf996f2cf3a0be9c332ca88e4ffd1698b7d59b1c5318b48491033e062e639 for runmymind/docker-android-sdk:latest ...
Running on runner-cf4dbddf-project-918-concurrent-0 via git-ci-runner...
WARNING: Possibly zombie container runner-cf4dbddf-project-918-concurrent-0-predefined-1 is disconnected from network bridge
Reinitialized existing Git repository in /builds/android/MYPROJECT/.git/
Fetching changes...
Checking out 21ff9883 as branch_for_test_it_1...
Removing .gradle/
....
OK
在我的其他工作上:
Running with gitlab-runner 11.10.1 (1f513601)
on android-runner-1 cf4dbddf
Using Docker executor with image runmymind/docker-android-sdk:latest ...
Using locally found image version due to if-not-present pull policy
Using docker image sha256:05edf996f2cf3a0be9c332ca88e4ffd1698b7d59b1c5318b48491033e062e639 for runmymind/docker-android-sdk:latest ...
Running on runner-cf4dbddf-project-918-concurrent-0 via git-ci-runner...
Reinitialized existing Git repository in /builds/android/MYPROJECT/.git/
Fetching changes...
Checking out 21ff9883 as branch_for_test_it_2...
ERROR: Job failed (system failure): Error: No such container: 9721b3efbc71ababc12da8606307bd36c56b08e6500605a3ddbc9e42855498d6 (executor_docker.go:976:0s)
我了解,每个项目只能使用一个容器(不适用于分支)。 根据我的理解,我们有两种方法可以解决此问题:
1)了解如何为每个分支创建新容器;
2)了解如何为docker executor制作gitlab-runner队列
我想问你,我们如何实现其中一种方法?对于我来说,最好使用第二种方法,因为在第一种方法中,我们将使用大量的计算机资源。但是没关系。请告诉我,我们如何解决我上面写的这些变体?