runner已启动docker容器,config.toml为:
concurrent = 1
check_interval = 0
[[runners]]
name = "spring-boot-scripts"
url = "http://xxxxx.com/ci"
token = "xxxxxx"
executor = "docker"
builds_dir = "/tmp/builds"
[runners.docker]
tls_verify = false
image = "spring-boot-demo:ci"
privileged = false
disable_cache = true
volumes = ["/cache"]
[runners.cache]
Insecure = false.gitlab-ci.yml是:
image: spring-boot-demo:ci
stages:
- build
before_scipts:
- mkdir /tmp/before_scripts
- echo "============before_scripts========="
job1:
stage: build
script:
- sh /home/admin/spring-boot-demo-application/bin/entrypoint.sh
after_scipts:
- mkdir /tmp/after_scripts
- echo "============after_scripts========="gitlab的输出是这样的,构建任务必须取消才能停止:
Running with gitlab-ci-multi-runner 1.4.2 (bcc1794)
Using Docker executor with image spring-boot-demo:ci ...
Pulling docker image spring-boot-demo:ci ...
WARNING: Cannot pull the latest version of image spring-boot-demo:ci : Error: image library/spring-boot-demo:ci not found
WARNING: Locally found image will be used instead.
Running on runner-278e2660-project-114610-concurrent-0 via 6ca6af37d681...
Cloning repository...
Cloning into '/tmp/builds/spring-boot/startup-scripts'...
Checking out b58711bc as debug...现在的问题是:如果之前的脚本/脚本/之后的脚本可以在容器中执行,为什么我找不到目录/tmp/之前的脚本、/tmp/之后的脚本和作业的脚本不能在容器中工作
发布于 2016-12-17 01:25:53
找不到文件夹,因为作业未在运行。您在before_script和after_script作业中都拼写错了"script“。另外,请注意,正确的作业不是复数,并且在末尾没有“s”。
https://stackoverflow.com/questions/39139639
复制相似问题