0
주자를 작동 고정 표시기 컨테이너를 시작했다는 config.toml
은 다음과 같은Gitlab-CI 멀티 주자 시작 고정 표시기 컨테이너, 스크립트가 지금
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의 출력, 그리고 :
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
입니다 취소 될 때까지 건물 작업을 중지 할 수 없습니다.
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...
지금 ques/tmp/before_scripts,/tmp/after_scripts 디렉토리를 찾을 수없고 작업 스크립트가 컨테이너에서 작동하지 않는 이유는 무엇입니까?
1. 스크립트는 컨테이너 내부에서 실행됩니다. 2. 당신은 당신이보기를 기대하는 것과 작동하지 않는 것에 대해 좀 더 구체적으로 알아볼 필요가 있습니다. Gitlab은 빌드 작업의 결과를 보여 주므로 일반적으로 상황을 명확하게 볼 수 있습니다. – Matthew
답장을 보내 주셔서 감사합니다. 이 스크립트가 컨테이너 내부에서 실행되는 경우 왜 컨테이너에서/tmp/before_scripts 디렉토리를 찾을 수 없으며 entrypoint.sh가 exec가 아니었을 수 있습니다. – eliot
다음과 같은 건물 작업 결과 : 'gitlab-ci-multi-runner 1.4.2 (bcc1794)로 실행 이미지 spring-boot-demo가있는 Docker 실행 프로그램 사용 : ci ... 풀 이미지 도킹 이미지 spring-boot-demo : ci : 오류 : image library/spring-boot-demo : ci 찾을 수 없음 경고 : 로컬로 찾은 이미지가 대신 사용됩니다. 6ca6af37d681을 통해 runner-278e2660-project-114610-concurrent-0에서 실행 중 ... 복제 저장소 ... '/ tmp/builds/spring-boot/startup-scripts'에 복제 ... 으로 b58711bc 체크 아웃 디버그 ... ' – eliot