Can't get Gitlab-CI to start building builds

I’m really having difficulty here trying to setup Gitlab CI to produce anything for me. I’ve read the guides here:
[https://about.gitlab.com/2016/10/12/automated-debian-package-build-with-gitlab-ci/] (https://about.gitlab.com/2016/10/12/automated-debian-package-build-with-gitlab-ci/)
and here:
https://docs.gitlab.com/ce/ci/quick_start/

And seem to have followed every step, but every time I push a commit, I get no builds. Here is my .gitlab-ci.yml file:

# Is performed before the scripts in the stages step
before_script:  
  - source /etc/profile
  - bash ci/docker_install.sh > /dev/null
# Defines stages which are to be executed
stages:  
  - build
# Stage "build"
run-build:  
  stage: build
  script:
    - apt-get install -y libncurses5-dev libglib2.0-dev libgeoip-dev libtokyocabinet-dev zlib1g-dev libncursesw5-dev libbz2-dev
    - autoreconf -fvi
    - dpkg-buildpackage -us -uc
    - mkdir build
    - mv ../*.deb build/
 # This stage is only executed for new tags
  only:
    - tags
  # The files which are to be made available in GitLab
  artifacts:
    paths:
      - build/*

I have two runners:

and they both seem to communicate just fine with gitlab CE. I’m on the latest release, 8.16.4. The only thing I haven’t tried yet is pushing directly to my master branch, but from what I’ve read, it shouldn’t matter what branch I push to. Can anyone tell me what I’m doing wrong? I can work out the gitlab-ci.yml file later, for now I’d be happy with just seeing it ATTEMPT to build something.

I notice you’ve got it set to only run the build for new tags, the line says “only: tags”
Have you tried removing that so it builds automatically for every branch/tag rather than just commits which are tagged?
Also, can you run builds manually via the Pipelines => Run Pipeline button?

The full documentation for the YAML file is here:
https://docs.gitlab.com/ce/ci/yaml/#only-and-except
(It’s the page I visit most on the Gitlab docs).

Apart from that I don’t see anything obviously wrong in your configuration, I even ran it through the Gitlab CI Lint tool and it passed the tests.

I had tried removing the tags section to get it to build, I’ve also tried manually tagging new commits to see if the tags would work, but it didn’t. Also I Don’t seem to have a pipelines section, see my project UI (I’m the owner):

So it seems that there’s something up with CI, even though the yaml is shown for the projected as a CI-configuration tab…I’m wondering if maybe my gitlab.rb needs something? I’m going to go see if I missed something with setting up continuous integration…

If Pipelines aren’t showing up then that’s definitely a problem.

As you suggested, it could be a system-wide setting:
http://docs.gitlab.com/ee/ci/enable_or_disable_ci.html#site-wide-administrator-setting
(I’m using Gitlab.com so I’m not familiar with the gitlab.rb file)

It could also be disabled on that one project (via Project Settings => Edit Project):


If this says “Pipelines: Disabled” that could explain it.

Looks like you’re close to a solution here! :slight_smile:

yupppp… That was it. massive fail on my end. Thanks!

Changing this to “Team Members” shows the pipelines/build menu now.

1 Like