cvbarros/terraform-provider-teamcity

Enhance build configuration step to support conditions

Opened this issue · 0 comments

Enhance the resource build configuration to support:

  • execution mode
  • multiple execution conditions.

From now on, the execution mode and conditions for the build configuration step can be defined in following way:

resource "teamcity_project" "project" {
  name = "My Project"
}

resource "teamcity_build_config" "build" {
  name        = "BuildRelease"
  description = "Build 'My Project'"
  project_id  = teamcity_project.project.id

  settings {
    build_number_format = "1.2.%build.counter%"
  }

  step {
    type = "cmd_line"
    name = "build_script"
    file = "./build.sh"
    args = "default_target --verbose"
    mode = "execute_if_success"
    condition {
        parameter_name = "teamcity.build.branch"
        operator = "DOES_NOT_EQUAL"
        value = "release"
    }
    condition {
        parameter_name = "teamcity.build.id"
        operator = "EQUALS"
        value = "123"
    }
  }
}