Answer the question
In order to leave comments, you need to log in
Why is gitlab-runner unstable?
Hello!
Decided to play CI
noticed such a strange thing, builds do not always pass.
More precisely, I can not understand the principle, then the assembly is performed, then not.
Moreover, there are no errors in the console, and the console itself on gitlab does not always display processes.
Here is my .gitlab-ci
stages:
- build
- deploy
build:
image: docker:latest
stage: build
before_script:
- docker login -u $GITLAB_USER_LOGIN -p $REGISTRY_TOKEN $CI_REGISTRY
script:
- docker build -t $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME:nginx_app.$CI_PIPELINE_ID ./docker/nginx/app/
- docker build -t $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME:nginx_open.$CI_PIPELINE_ID ./docker/nginx/open/
- docker build -t $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME:app.$CI_PIPELINE_ID ./docker/php/
- docker push $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME:nginx_app.$CI_PIPELINE_ID
- docker push $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME:nginx_open.$CI_PIPELINE_ID
- docker push $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME:app.$CI_PIPELINE_ID
only:
- develop
deploy:
stage: deploy
image: docker/compose:1.27.4
variables:
DOCKER_HOST: tcp://84.202.161.194:2376
before_script:
- docker login -u $GITLAB_USER_LOGIN -p $REGISTRY_TOKEN $CI_REGISTRY
script:
- docker-compose -f docker-compose-ci.yml up -d
- docker-compose -f docker-compose-ci.yml exec app composer i --no-progress --no-suggest --no-interaction --quiet --no-scripts
only:
- develop
sudo gitlab-runner install --user user --config /etc/gitlab-runner/config.toml
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question