How run build job only if i run deployment job manually

Hello everyone,

I’m creating a CI for a web API. It has 2 stages actually.

  • build
  • deploy

Here’s the pipeline schema
image

I would like to only run “build_api” job if I manually run job “deploy_api_dev”. I would like the “build_api” job to be run before “deploy_api_dev” of course :slight_smile:, then “deploy_api_dev” is started after "build_api

I don’t find any solution by reading Gitlab Documentation. Is it possible to do that ? Do you know how to do such thing ?

Hi @MiniBN welcome to the forum!

I think what you probably want to do, is to make the build_api job the manual one, and then have the deploy_api... jobs only run if build_api has succeeded.

Does that help?