I haven't specified any stage in my gitlab-ci, but my gitlab job taking test stage, why its happening?

I haven’t specified any stage in my gitlab-ci, but my gitlab job is taking the test stage, why it’s happening?

  • it’s set to the test stage as shown in the job here, I want to remove that test from my job.
    image

  • using self-managed gitlab as dockerised

    • GitLab version: 16.0.5-ce.0
    • Runner version: latest
#.gitlab-ci.yml 

variables:
  IMAGE_NAME: nanajanashia/demo-app
  IMAGE_TAG: python-app-1.0

stages:
  - build
  - deploy

build_dev:
  stage: build
  image: docker:20.10.16
  services:
    - docker:20.10.16-dind
  variables:
    DOCKER_TLS_CERTDIR: "/certs"
  before_script:
    - docker login -u $REGISTRY_USER -p $REGISTRY_PASS
  script:
    - docker build -t $IMAGE_NAME:$IMAGE_TAG .
    - docker push $IMAGE_NAME:$IMAGE_TAG

@paranjay Welcome to the forum!

The docs page for stage says:

“If stage is not defined, the job uses the test stage by default.”

I’m guessing that build_dev job doesn’t have a stage defined but I don’t see the job included in the snippet you provided.

I hope this helps!

-James H, GitLab Product Manager, Analyze:Product Analytics

2 Likes