-1

My Jenkins pipeline is

pipeline {
    agent any
    stages {
        stage('deploy') {
            steps {
                build(job: 'jobA')
                build(job: 'jobB')
            }
        }
    }
}

I want to run jobB when jobA is done. However jobA is a deploy/release job:

  1. it builds a docker image and
  2. it deploys that docker image as a post build action.

So jobA = 1_build_docker + 2_deploy_docker (as a post build action)

Problem: How can I start jobB when 2_deploy_docker is done? With my current pipeline, jobB starts when 1_build_docker is done

Thomas
  • 8,306
  • 8
  • 53
  • 92

1 Answers1

0

Move 2 from post build action onto a stage.

Holleoman
  • 261
  • 1
  • 7
  • the issue is that `1_build_docker` will pass in parameters to `2_deploy_docker` and the whole pipeline doesn't know about those – Thomas Mar 14 '23 at 00:41