Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-30391

Unable to run 2 builds of same job with CloudFormation plugin

      If CloudFormation plugin configured there is only one build of this job can run.
      If more of them launched concurrently, next job will wait with the following message in the console log:
      AWS Cloud Formation is waiting for a checkpoint on <jobname> #<build id>

          [JENKINS-30391] Unable to run 2 builds of same job with CloudFormation plugin

          lsb want added a comment - - edited

          I got similar problem:
          The different is needless to configured there is only one build of this job can run.

          My situation is that one job launch two job instance concurrently and job configurate Tear down Amazon CloudFormation in Post-build Actions. I have use a environment variable as a part of Stack name.

          The first done job can't tear down itself own Stack immediately. The following message in the console log:
          AWS Cloud Formation is waiting for a checkpoint on <jobname> #<build id>

          This job can tear down unit other job tear down itself own Stack.

          lsb want added a comment - - edited I got similar problem: The different is needless to configured there is only one build of this job can run. My situation is that one job launch two job instance concurrently and job configurate Tear down Amazon CloudFormation in Post-build Actions. I have use a environment variable as a part of Stack name. The first done job can't tear down itself own Stack immediately. The following message in the console log: AWS Cloud Formation is waiting for a checkpoint on <jobname> #<build id> This job can tear down unit other job tear down itself own Stack.

          lsb want added a comment -

          I think this pull request would fix this issue https://github.com/jenkinsci/jenkins-cloudformation-plugin/pull/24

          lsb want added a comment - I think this pull request would fix this issue https://github.com/jenkinsci/jenkins-cloudformation-plugin/pull/24

          Nathan Good added a comment -

          I'm not certain the pull request logically makes sense. Since you can't have two CloudFormation stacks with the same name, it doesn't make sense to allow two builds at the same time. The changes in the PR don't seem to follow this logic but instead seem like a short-cut to resolve a bigger issue. I'd like to understand the real cause of the problem better.

          Nathan Good added a comment - I'm not certain the pull request logically makes sense. Since you can't have two CloudFormation stacks with the same name, it doesn't make sense to allow two builds at the same time. The changes in the PR don't seem to follow this logic but instead seem like a short-cut to resolve a bigger issue. I'd like to understand the real cause of the problem better.

          lsb want added a comment -

          nathanagood
          I am have two CloudFormation stacks with the same name. them have different name. because I use a variable as CloudFormation stacks's name . For example "CF_stack_${BUILD_NAME}"

          lsb want added a comment - nathanagood I am have two CloudFormation stacks with the same name. them have different name. because I use a variable as CloudFormation stacks's name . For example "CF_stack_${BUILD_NAME}"

          Pedro Graber added a comment -

          nathanagood We are having the same issue. Our job is intended to deploy two different applications. We are using a Parameter in the name of the stack for that. We intended to use the same job for all of our applications that share the same template, but as of now, we can only deploy one at a time.

          The CF stack has further logic to give the applications different configuration, but it is useful as we can reuse all the shared components which is the majority of the template.

          People will usually deploy these applications at the same time when they come into the office in the morning around the same time and as of now, the second group has to wait longer to start using the application.

          Thanks for the help!

          Pedro Graber added a comment - nathanagood We are having the same issue. Our job is intended to deploy two different applications. We are using a Parameter in the name of the stack for that. We intended to use the same job for all of our applications that share the same template, but as of now, we can only deploy one at a time. The CF stack has further logic to give the applications different configuration, but it is useful as we can reuse all the shared components which is the majority of the template. People will usually deploy these applications at the same time when they come into the office in the morning around the same time and as of now, the second group has to wait longer to start using the application. Thanks for the help!

            nathanagood Nathan Good
            navado Robert Navado
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: