Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'app-deploy' job needs 'app-verify' job but 'app-verify' is not in any previous stage You can also test your .gitlab-ci.yml in CI Lint

Tags:

gitlab-ci

Seeing Found errors in your .gitlab-ci.yml: 'app-deploy' job needs 'app-verify' job but 'app-verify' is not in any previous stage You can also test your .gitlab-ci.yml in CI Lint

Where as both stages are defined

Cache set as below

  cache:
    key: ${CI_PIPELINE_ID}
    paths:
      - $CI_PROJECT_DIR/
      - $CI_PROJECT_DIR/$CONTEXT/

Stages defined as below, snippets

app-build:
  stage: build
  # Extending the maven-build function from maven.yaml
  extends: .maven-build
app-deploy:
  stage: deploy
  extends: .docker-publish
  cache:
    key: ${CI_PIPELINE_ID}
    paths:
      - $CI_PROJECT_DIR/
      - $CI_PROJECT_DIR/$CONTEXT/
  variables:
    DOCKERFILE: Dockerfile
    CONTEXT: app
    OUTPUT: app.war
  needs:
    - app-build
    - app-verify
  dependencies:
    - app-build
    - app-verify

How to resolve the above error.

Error should go away and no error in pipeline run.

like image 480
Asish Avatar asked Dec 07 '25 04:12

Asish


1 Answers

If both jobs app-build and app-verify have the same rules as app-deploy, then it will work.

like image 173
mtunyk Avatar answered Dec 09 '25 00:12

mtunyk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!