Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

duplicate build steps #105

Open
stempher opened this issue Nov 3, 2020 · 2 comments
Open

duplicate build steps #105

stempher opened this issue Nov 3, 2020 · 2 comments
Labels
investigate Needs analysis

Comments

@stempher
Copy link

stempher commented Nov 3, 2020

When changing build steps in resourse teamcity_build_config, sometimes new steps are created and old steps are not deleted
изображение

@cvbarros
Copy link
Owner

Hi @stempher , do you have a sample (and if possible, simple) configuration to reproduce this issue?

@cvbarros cvbarros added the investigate Needs analysis label Nov 18, 2020
@stempher
Copy link
Author

stempher commented Dec 1, 2020

Hi @cvbarros, configuration example:

resource "teamcity_build_config" "build_dotnet" {
  description = "build"
  name        = "build"
  project_id  = teamcity_project.service.id

  settings {
    allow_personal_builds = true
    artifact_paths        = ["+:artifacts => artifacts"]
    build_number_format   = "%build.counter%"
    detect_hanging        = true
    status_widget         = false
  }

  step {
    name = "step1"
    type = "cmd_line"
    code = <<-EOT
      #!/bin/bash
      echo "step1"
    EOT
  }

  step {
    name = "step2"
    type = "cmd_line"
    code = <<-EOT
      #!/bin/bash
      echo "step2"
    EOT
  }

  step {
    name = "step3"
    type = "cmd_line"
    code = <<-EOT
      #!/bin/bash
      echo "step3"
    EOT
  }
}

Creates duplicate steps when a new step was added to the TF file and the build counter is not equal to the initial one.

If you execute apply twice, then the duplicate steps are deleted. It seems that at the first apply it resets the build counter and does not make changes to the steps, but creates duplicates. Possibly related to #94

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigate Needs analysis
Projects
None yet
Development

No branches or pull requests

2 participants