2
votes

Platform: Teamcity 8.1.4

We have a pipeline with stages that have several snapshot dependencies on other smaller builds. Our problem is that if any of these smaller builds fail then the pipeline that depends on these smaller builds chokes up and doesn't run until it is resolved.

This is certainly expected behaviour: we don't want breaking changes in the smaller pipelines to reach further down our main pipeline. However in our main pipeline we would rather use the Last Successful Build from each of the smaller pipelines instead of the Most Recent Build so the main pipeline isn't blocked and we can allow new successful changes to filter through from the other smaller pipes.

I've noticed that we can depend on the Last Successful Build if it was an Artifact Dependency instead of a Snapshot Dependency and they look on the surface to be very similar.

Questions

  • Are there downsides to using Artifact Dependencies instead of Snapshot Dependencies?
  • We need to pass through things like the Build Number and certain environment variables from the smaller pipelines to the main one - can we do this using Artifact Dependencies?
1

1 Answers

1
votes
  1. There are no downsides to using artefact dependencies. You woudl just need to fetch some artefacts. I ussualy fetch the build.finish.properties of the parent build

  2. You can easily pass around all parameters (like build number , env variables etc) to artefact dependencies

You can use this syntax in the targets to get teamcity build finish properties ".teamcity/properties/build.finish.properties.gz"