Warn will still automatically advance.
I was able to utilize the Set-ReleaseVariable as you suggested. Thanks!
Warn will still automatically advance.
I was able to utilize the Set-ReleaseVariable as you suggested. Thanks!
Hi John - thanks for the response. Unfortunately, forcing normal will allow the pipeline to advance to the Deploy stage, which defeats the validation of build criteria (I don't think I made that clear in my original post).
More clearly stated goal: halting a pipeline without using "fail"
more verbose-ly stated goal: we want to be able to differentiate between known issues that should halt a pipeline (i.e. validation of build criteria) and unknown errors that halt a pipeline (i.e. coding errors). Event listeners only know that a pipeline stage failed, not why it failed, so they catch every failure.
Maybe what we are looking for is the ability to control the advancement to the next pipeline stage?
Is there a way to halt a pipeline stage without using the "fail" keyword?
We have a 2 stage pipeline (Build and Deploy). During the all stages, we monitor for programming errors using Event Listeners that trigger on failed executions and send email to operations to review the error (things like variable resolution or syntax errors).
There are also several criteria we look for in the Build stage that should cause it to halt - things like missing build values, other concurrent executions, etc. If any of these criteria are met, we alert the necessary parties and use "fail" to halt the stage. However, using fail also triggers the event listener and sends an email to operations that they don't need.
The desired logic in the plan would look something like
call CheckBuildCriteria
(
validBuild => $IsValidBuild
);
if $IsValidBuild != true
{
Halt-Stage; # currently we have to use "fail" here.
}
Product: BuildMaster
Version: 6.1.5
Is there a notation for comments in plans that will prevent them from showing up in the execution log?
Product: BuildMaster
Version: 6.1.5
What other information can I provide? Right now the feature is not functional.
Side note - the "Plan" option when configuring a monitor only shows global plans, no application scoped plans.
Thanks.
I have created an SVN repository monitor, but I can't tell that it is doing anything. I want this monitor to trigger a build/deployment for a release in the application to which I associated the monitor, so when I created the monitor I entered the name of the desired plan and selected the application. Where would I see the results of the execution?
I see this in the Service Log, so it appears monitor is triggering.
Running Repository Monitor...
Fetching repository monitors and last recorded states...
Found 1 active repository monitors.
Repository Monitor completed.
When viewing the Monitor on screen, in the "States" column it says "no branches recorded".
I'm using a Resource Credential. Is it possible it isn't configured correctly, and is there a way to tell?
This is what I see in the RepositoryMonitors table
RepositoryMonitor_Id = 1
RepositoryMonitor_Name = sq_test
Application_Id = 1175
ApplicationGroup_Id = NULL
RepositoryMonitor_Configuration (shown below)
CronExpression_Text = 0 0/1 * * * ?
Active_Indicator = Y
ExecuteOn_Server_Id = NULL
Plan_Name = sq_dummy2
BranchFilter_Text = integration
<Inedo.Extensions.Subversion.RepositoryMonitors.SvnRepositoryMonitor Assembly="Subversion">
<Properties CredentialName="sq_test" />
</Inedo.Extensions.Subversion.RepositoryMonitors.SvnRepositoryMonitor>
Thanks.
Product: BuildMaster
Version: 6.1.5
In the powershell code shown below, the value for param3 is not received from the plan when the release is executed. Is this a powershell limitation, or something to do with how BuildMaster is parsing the script? If I remove $arr_param, param3 is properly handled.
When the plan is viewed in visual mode, param3 doesn't show up when I edit the test_PS_script Operation. Including a value for arr_param in the plan doesn't change the behavior (although the script does receive the passed in value for arr_param).
SCRIPTASSET - test_PS_script
Param (
$param1,
$param2,
$arr_param = @(),
$param3
)
Write-Output "param1: ${param1}"
Write-Output "param2: ${param2}"
Write-Output "arr_param.Count: $($arr_param.count)"
Write-Output "param3: ${param3}"
PLAN
PSCall test_PS_script
(
param1: val1,
param2: val2,
param3: val3
);
OUTPUT
Found script test_PS_script.ps1 in Default raft.
Using LocalAgent agent on TESTSERVER01
Importing param3...
Assigning parameter param1...
Assigning parameter param2...
param1: val1
param2: val2
arr_param.Count: 0
param3:
BuildMaster has an extension for Subversion, but I can only find repository monitors for Git. Am I missing something, or is this a design decision? If so, do you have plans for Subversion repository monitors?
Thanks.
Product: BuildMaster
Version: 6.1.4
We use Schedule Triggers for a variety of jobs - some system level (cleanup, etc) but also to run recurring deployments for a variety of development and testing purposes. They are an important part of our day to day operations.
I'd be happy to provide more information about our use-cases if it would help.
Thanks Tod. That fixes the visibility.
Our triggers are Schedule Triggers, not SCM based. What are Schedule Triggers replaced with?
We recently upgraded from BM 6.0.9 to 6.1.0 and the Release Package Triggers menu item is gone from the Basic Application Settings page. Where is it located now? Thanks.
Product: BuildMaster
Version: 6.1.0
Thanks for getting back to me. Yes, I'm posting using the application/json content type. Below is a powershell code sample that illustrates the issue.
# this creates the package.
$body = "{
applicationId: ""${APP}"",
releaseNumber: ""${RELNUM}"",
API_key: ""${APIKey}""
}"
$results = (Invoke-WebRequest -Uri "http://${Servername}:81/api/releases/packages/create" -Method Post -Body $body -ContentType "application/json" -UseBasicParsing).content | ConvertFrom-Json
$PackageNumber = $results.number
# this fails with a message of "Could not determine build ID. A build id or build number, release id/name, application id/name is required."
$body = "{
applicationId: ""${APP}"",
releaseNumber: ""${RELNUM}"",
packageNumber: ""${PackageNumber}"",
API_key: ""${APIKey}"",
toStage: ""Run""
}"
Invoke-WebRequest -Uri "http://${Servername}:81/api/releases/packages/deploy" -Method Post -Body $body -ContentType "application/json" -UseBasicParsing
# change the var name from "packageNumber" to "buildNumber" in the body and it works.
$body = "{
applicationId: ""${APP}"",
releaseNumber: ""${RELNUM}"",
buildNumber: ""${PackageNumber}"",
API_key: ""${APIKey}"",
toStage: ""Run""
}"
Invoke-WebRequest -Uri "http://${Servername}:81/api/releases/packages/deploy" -Method Post -Body $body -ContentType "application/json" -UseBasicParsing
In the notes for BM-3257 it says "Things not changed: Release & Package Deployment API". However, when I upgraded from BM 6.0.9 to 6.1.0, my implementation of /releases/packages/deploy stopped working. To get it working I needed to change the variable name in the body from "packageNumber" to "buildNumber".
I also noticed that the on-line documentation only mentions endpoints using the "build" keyword, like releases/builds/deploy. There is no mention of a packages endpoint (https://inedo.com/support/documentation/buildmaster/reference/api/release-and-package)
Were the /packages/ endpoints deprecated in a prior release?
Product: BuildMaster
Version: 6.1.0
Is there way to expand an array for logging? I've tried the following in my Plans, which results in a log entry of "(list)" or generates an error.
set @arr = @("o", "t", "t");
Log-Information @arr;
Log-Information $(@arr);
# Try/Catch
try
{
Log-Information $Eval(@arr);
}
catch
{
}
which results in
(list)
(list)
Cannot convert property "Text" value "@(o, t, t)" to String type.
Product: BuildMaster
Version: 6.0.9
When editing a plan in Text Mode I include a parameter for a Powershell script with a blank value. When switching to Visual Mode and then back to Text Mode, the parameter is removed from the plan. This causes the powershell script to fail when that parameter is required. Is it possible to turn off this behavior?
Before (in text mode):
PSCall post_jira_comment
(
Comment: SomeMessage,
Ticket: Issue-1,
BlankParam: ""
);
After switching to Visual and then back to Text Mode:
PSCall post_jira_comment
(
Comment: SomeMessage,
Ticket: Issue-1
);
Product: BuildMaster
Version: 5.8.3
I have a release template variable of type = list with "allow multiple items" = true. How do I indicate multiple initial values for this variable? For example, the list values are Dev, Integration, Stage and Production, and I want both Dev and Integration to be selected as the initial value for the variable.
Product: BuildMaster
Version: 5.8.3
Does the Release & Package Deployment API have a method to schedule a deployment?
Product: BuildMaster
Version: 5.8.3
That sounds just right. Thanks.
Related question: do the Purge Item Types have any overlap? For example, if I purge a release, does it also purge the associated release packages, execution logs and artifacts?
We have a set of releases that we re-use on a scheduled basis (several times per day). These releases are never marked as deployed, we just create a new package and release it (thus automatically rejecting the prior package). We don't need to keep the entire history for such releases, and I suspect it is bloating the BuildMaster database. Is there a way to purge the rejected package information for this type of release?
Product: BuildMaster
Version: 5.8.3
Is there a permission I can set to allow for updating of release variables (without granting full admin privileges)? I have tried "Releases - Manage" but it doesn't do it.
Product: BuildMaster
Version: 5.6.8
Would you consider adding an option to prevent the second execution, since it could have negative consequences?
We are talking about different situations. I understand that multiple targets could execute simultaneously (and that can be desirable), but those are for a single "run" of a job. I'm talking about a scenario where a second "run" is started before the first "run" is finished.
Say I click "Create Package" for a release. The release enters the Build stage (which is the first stage in this scenario). The Build stage takes 15 minutes. While it is building, I accidentally click "Create Package" again for the same release. I don't want this second click to start the build process again.
This gets even worse if the release is deploying to an environment. A second instance of the same release trying to run at the same time as a prior instance could have all sorts of negative consequences.
Thanks Tod, but shouldn't the release itself know that it has a current execution that hasn't finished? For example, what should happen if a release is currently executing and I try to create a new package via the web interface for that release? I would expect the new package to be prevented from executing since there is a currently executing instance. (Anecdotally, I believe that was the behavior prior to 5.x release)
Thanks Tod. The bug ticket sounds like it will just prevent the error. Are there plans to create an API that will actually re-deploy to a stage?
We have jobs scheduled on a recurring basis. If a job runs long, the next scheduled job will still trigger, and will interfere with the currently running job. In our setup, it is not desirable for a job to trigger if the last execution is still running. Is this the expected behavior and if so, is there a way to prevent it?
Product: BuildMaster
Version: 5.6.8
I'm trying to use the endpoint "api/releases/packages/deploy" to deploy a release to an environment that has already received the deployment (analogous to "Re-deploy to Stage" option available via the screens), but I'm getting an error
Invoke-WebRequest : 262714
1Builds_PromoteBuild
28`Violation of UNIQUE KEY constraint 'UQ__BuildPromotions'. Cannot insert duplicate key in object 'dbo.BuildPromotions'. The
duplicate key value is (84564, Stage).
Is there a different endpoint for re-deployment?
Note that in this scenario, we don't need to rebuild the package, we just need to re-release the code.
Product: BuildMaster
Version: 5.6.8
Tod - thanks for the reply. We would definitely be interested in this feature in an upcoming release. Thanks.
Is there a way to suppress the warning generated when an artifact has no folders or files in it?
The log message is "There were no files or directories captured in this artifact."
Product: BuildMaster
Version: 5.5.1
In 4.9, BuildMaster handled this automatically and queued up any executions if there was one already running for an application. Was this behavior deprecated in 5.x?
We don't use URL triggers. This behavior occurs when the jobs are run manually (by clicking "Create Package"). It also occurs when we use Schedule Triggers.
We have multiple releases configured for an application. If one release is in progress, and a second release is triggered, the second release will run and possibly interfere with the first release.
Is there a way to prevent this, so only one release can run at a time for a single application?
Product: BuildMaster
Version: 5.5.1
When I create a new Schedule Trigger it will execute immediately if the time has already passed for the day. For example, if at 5pm on Monday I create a Schedule Trigger for Daily at 7am, it will trigger shortly after I set it up (i.e. Monday around 5:01pm). Is there way to prevent this behavior? The way it works now it means I have to set up new Schedule Triggers before the execution time (i.e. before 7am in the example above) which is decidedly inconvenient.
I understand that the service reviews scheduled triggers on a periodic basis, so the triggers won't always execute at the exact time set in the schedule - this is fine if it means that a job will run at 7:01am or 7:02am instead of exactly at 7:00am, but it would be helpful if there was a threshold after which the missed jobs would not trigger until the time arrives on the next day. Even better if this threshold was configurable.
Product: BuildMaster
Version: 5.5.0
Is there a summary page in the BuildMaster web interface that displays upcoming scheduled releases? For example, if I wanted to know all the scheduled jobs that will run tonight, where could I see this information?
Product: BuildMaster
Version: 5.3.5
When I Edit the "View Application" task, the checkbox for "Configure BuildMaster" under Administration is checked. Is this a bug? Why would the View Application task grant the ability to configure buildmaster?
Product: BuildMaster
Version: 5.3.5
I'm looking to create a variable that must be populated each time a new package is created. In BM 4.9, I believe these were called Build variables. What is the equivalent in BM 5.x and how do i create them?
The variable needs to be entered each time a package is created, and should not persist between packages. Ideally the variable would be listed on the "Create <application name> Release Package" pop-up window and would allow the user to enter a value there.
This variable is associated with a particular plan, but not a deployable.
Product: BuildMaster
Version: 5.3.5
Is there a way to prevent selection of a different pipeline when a release is created using a template? The template itself is working fine, and when the template is selected while creating the release the correct pipeline is displayed, but the user is offered the option to change the pipeline, which is undesirable in this context.
Product: BuildMaster
Version: 5.3.5
Alana - yes, thanks. Templates are working for what we need.
Alana - thanks for the response.
I had created multiple stages as you suggested, and it works, but it is clunky. All the plans in this context are for the building of a release, and the stages ended up being named Build1, Build2, Build3, etc. Using multiple stages means I have to apply and maintain any stage-level settings multiple times. Conceptually they are all part of the same step - the "Build" step - so it seems to make sense to have them in the same Stage.
The reason for having the separate build plans is so we can re-use them in different pipelines that may not utilize all the plans. In BM 4.9 we were able to share action groups between different deployment plans, but using Otterscript in 5.3 prevents this. Breaking up the plans into smaller pieces lets me isolate the code I want to re-use.
When I add multiple plans to a pipeline stage, they execute concurrently. Is this the intended behavior, and are there any plans to allow for setting an execution order?
I'm using global plans and global pipelines.
Product: BuildMaster
Version: 5.3.3
Thanks for the quick response. Yes, sooner would be great. I will start using the new feature as soon as you can release it, with or without documentation.
In BuildMaster 4.9 I could use the procedure dbo.Builds_CreateBuild to trigger a build via SQL code. Running this procedure would do everything necessary to build and promote - in effect, it was the same thing as clicking "New build > Create Build" via the web interface. We used this to trigger large batches of builds programmatically.
In 5.3, that same procedure is not comprehensive and does not trigger the build. Is there a new procedure in 5.3 that has the same comprehensive effect as clicking "Create Package" via the web interface? If not, are there plans to build one, maybe something like dbo.Packages_CreatePackage?
Thanks.
Product: BuildMaster
Version: 5.3.3
Thanks Alana.
Is this the config file and key you are referring to?
c:\BuildMaster\Service\app_appSettings.config
<add key="Core.BaseWorkingDirectory" value="C:\BuildMaster_SVCTMP" />
We use ${ApplicationDirectory} extensively in our scripts. This variable always points to a folder on the C drive. Is it possible to change this to use a different drive letter?
Product: BuildMaster
Version: 4.9.2
Prior to upgrading to v4.8.6 (from 4.8.1) the Active Releases section of the System Overview page showed the most recently build active release for each of our applications. After the upgrade, it shows only older releases. What determines which releases display in this section?
Thanks.
Product: BuildMaster
Version: 4.8.6
I am attempting to run multiple builds concurrently and I am getting errors from the "Get Latest" build step:
svn: E155037: Previous operation has not finished; run 'cleanup' if it was interrupted
The errors occur when the Build is downloading files from source control.
Is it expected that when using Subversion as a source control provider, the same working folder will be used, regardless of which application is executing the build?
The working folder that is being used is C:\BuildMaster_SVCTMP\SrcRepos<repository name>_
Product: BuildMaster
Version: 4.8.1