1

Before a developer delivers any code to a change set is it possible to ensure the developer runs a private build and if the build fails the developer will be unable to deliver the change set to the stream. Something similar to how if there are compilation errors a code change cannot be delivered ?

blue-sky
  • 51,962
  • 152
  • 427
  • 752

1 Answers1

2

In ClearCase, you could had a pre-op hook to enforce some policy at the start of a deliver

It is possible to add hooks in the Team Configuration / Operation Behavior / Source Control / Deliver (client) section.
But I wouldn't recommend that approach.

I would rather use the Automated Builds described in the "Multiple-Stream Development" article.
That would be a "Post-build Deliver" step to the build definition.

You can even auto-deliver any changeset that has successfully build from the "build" Stream to another Stream.

The article "How to keep your streams flowing smoothly in Rational Team Concert 3.0.1" has more on that approach.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks, 'Post Build Deliver' seems to 'automatically deliver components to a stream based on the build status'. But this is at the component level, not at the stream level. How will this method prevent a developer from delivering a change set to a stream if the code (within the change set) does not compile. Seperately, I think the article link 'How to keep your streams flowing smoothly in Rational Team Concert 3.0.1' should be - 'jazz.net/library/article/649' – blue-sky Apr 18 '12 at 16:01
  • @user470184 I have fixed the link. The point I was making is, in a semi-decentralized model, to **not prevent the developer to deliver**, but to take advantage of the stream to trigger there any checks you want to enforce (in a dedicated repo workspace, by a dedicate 'build' user'). And then to deliver (again) what have successfully passed the tests to another stream (which is only for "valid" content). So the checks wouldn't be at the developer level, but at a stream level, in a "continuous integration" sort of way. – VonC Apr 18 '12 at 16:06
  • So the developer would be delivering to a 'temporary' stream and if the change set does not break the build, then this 'temporary' stream could deliver the change set to the 'valid content' stream automatically ? Would it not be better to have this at the developer level, so any breakages are caught early on prior to any change sets being delivered ? Seems to me that ensuring a private build is run and compiles prior to delivering a change set is a natural use case ? – blue-sky Apr 18 '12 at 16:20
  • 1
    @user470184 you can replicate that on the developer level, but without guarantee that it passes because the code is good or because some weird side-effect due to an unclean environment on the developer workstation. Even if you have basic "compilation-test" on the developer side, replicating said process in a dedicated environment is generally considered safer and part of best practices. – VonC Apr 18 '12 at 21:28