1

I'm trying to use Gitlab.com shared runner, and I have added my gitlab-ci.yml file into my repo. My project is configured to use Shared Runners (in Settings âž” CI/CD), but the pipeline page does not show any job when I push commits.

I tried to follow official docs, and none of the previous stackoverflow answers are helping. This is the contents of my gitlab-ci.yml

.nodejs_runners:
  variables:
    NODE_ENV: 'development'
  cache:
    key: $CI_COMMIT_REF_NAME
    paths:
      - /**/node_modules
  before_script:
    - yarn --frozen-lockfile --non-interactive --silent
  image: node:12
  tags:
    - docker

stages:
  - test

build-frontend:
  extends:
    - .nodejs_runners
  when: always
  stage: test
  script:
    - NODE_ENV="production" yarn build
    - tar -zcvf frontend-$CI_COMMIT_SHA.tar.gz .next
  artifacts:
    paths:
      - frontend-$CI_COMMIT_SHA.tar.gz

My repo is public and you can view it here

Thilak Rao
  • 1,841
  • 2
  • 19
  • 26

1 Answers1

2

See https://docs.gitlab.com/ee/ci/yaml/

GitLab CI/CD pipelines are configured using a YAML file called .gitlab-ci.yml within each project.

Your .gitlab-ci.yml is called gitlab-ci.yml, which is why GitLab can't find it.

Rename gitlab-ci.yml to .gitlab-ci.yml and GitLab will pick it up.

Aleksey Tsalolikhin
  • 1,518
  • 7
  • 14