0

We have gitlab ci currently setup (supposedly) to trigger a build whenever anything is pushed to remote. However, I have discovered that if someone pushes to an ssh remote (eg: [email protected]:Project.git) the build is not triggered. If they push to an https remote (eg: https://gitlab.com/Project.git), the build is triggered fine. Any thoughts as to what our problem might be? Our .gitlab-ci.yml looks like this:

stages:
  - test
  - deploy

cache:
  paths:
  - node_modules/

run_project1_tests:
  stage: test
  script:
    - set -xe
    - wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
    - echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list
    - apt-get update -yqqq
    - apt-get install -y xvfb google-chrome-stable
    - npm i -g [email protected] && npm i -g [email protected] && npm i -g [email protected]
    - cd project1
    - npm i
    - typings install && gulp check.versions && npm prune
    - Xvfb :1 -screen 0 800x600x16 &
    - export DISPLAY=:1.0
    - npm test

run_project2_tests:
  stage: test
  script:
    - npm i -g [email protected] && npm i -g [email protected] && npm i -g jasmine
    - cd project2
    - npm i
    - npm test

deploy_to_docker:
  stage: deploy
  only:
    - develop
  script:
    - chmod +x /usr/local/bin/docker-compose
    - export DOCKER_HOST="tcp://REMOTE_IP:2375"
    - docker-compose up -d --build

Thanks in advance!

1 Answer 1

1

If HTTPS works, but SSH does not, then the problem is in Gitlab, not in your .gitlab-ci.yml.

Look into logs and search for errors, run gitlab-rake gitlab:check to see whether everything is ok. It sounds like gitlab-shell (its connection to Gitlab) does not work properly.

If everything looks fine, file a bug report at https://gitlab.com/gitlab-org/gitlab-ce/issues.

Sign up to request clarification or add additional context in comments.

1 Comment

There was an issue with our Gitlab instance's upload sources which, when fixed, looks like it resolved our problem. Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.