[Anthill-pro] Step Pre-Condition Scripts - Step doesn't stop

Eric Minick etm at urbancode.com
Thu Oct 23 23:21:26 CDT 2008


Try something more like this one:

https://bugs.urbancode.com/browse/AHPSCRIPTS-65

// All previous steps are successful and the build type is official
Logic.and(
  StepStatus.allPriorIn(new JobStatusEnum[] { JobStatusEnum.SUCCESS, 
JobStatusEnum.SUCCESS_WARN }),
  Property.is("buildType", "official")
);

Or in Emerson's case where existance is all we're shooting for:

// All previous steps are successful and the build type is official
Logic.and(
  StepStatus.allPriorIn(new JobStatusEnum[] { JobStatusEnum.SUCCESS, 
JobStatusEnum.SUCCESS_WARN }),
  Property.exists("tagToReleaseFrom")
);

-- Eric

Heather Wells wrote:
> Hi Emerson,
>
> Did you ever get this working?  I'm trying to do the same thing.
>
> Thanks,
>
> Heather
>
> On Aug 28, 2008, at 3:15 AM, emerson cargnin wrote:
>
>> Hi
>>
>> I have a script that runs the svn clean up step or not, depending if
>> it is a CI workflow or it is a labeled build workflow.  I'm testing
>> the if I have the "tagToReleaseFrom", a property that exists only in
>> "build from a tag" kind of workflow.
>>
>> That's the script I have.
>>
>> String tag=PropertyLookup.getValue("tagToReleaseFrom");
>> if (tag!=null && tag.trim().length() > 0) {
>> Fail.never();
>> } else {
>> Fail.always();
>> }
>>
>>
>> But even for CI builds that don't have that property this step is
>> being executed :( It seems the Fail.never doesn't get executed... How
>> can I debug it???
>>
>> Regards
>> Emerson
>> _______________________________________________
>> Anthill-pro mailing list
>> Anthill-pro at lists.urbancode.com
>> http://lists.urbancode.com/mailman/listinfo/anthill-pro
>
> _______________________________________________
> Anthill-pro mailing list
> Anthill-pro at lists.urbancode.com
> http://lists.urbancode.com/mailman/listinfo/anthill-pro


More information about the Anthill-pro mailing list