Include only changes of last pinned Build

I've got the following configuration:
1. FullBuild <- This runs on every change and creates a release as artifact dependency
2. DeployRelease <- This uses an Artifact dependency on the last pinned FullBuild.

If I want to deploy a new Version I pin a stable Build in FullBuild and deploy this.

My Problem:
1. If I run the DeployRelease configuration, the included changes are the last changes made to the branch, although the dependency might be older (last pinned, not current)
2. DeployRelease creates a git label at the current commit, not at the pinned commit.

A workkaround would be to manually select the included changes, but there has to be a better solution (at least I hope so). How to automate that?

PS: I had a look at snapshot dependencies, but it seems there is no "last pinned" option.

Greetings
stefan Stark

added tags

2 comments
Comment actions Permalink

Hi Stefan,

You can configure Artifact (with option build from the same build chain) + Snapshot dependency. When you pin the build you can also promote it using Actions | Promote. In this case DeployRelease build will start on the same sources as were used by pinned build and using the same build artifacts.

Also you can trigger build on needed revision using REST API. Firstly you can find the number of last pinned build: http://localhost:8111/httpAuth/app/rest/builds/?locator=pinned:true, then find the change's internal modification id of this build and then trigger build on this change. Also we have a related feature request https://youtrack.jetbrains.com/issue/TW-9578, please watch/vote for it.

0
Comment actions Permalink

Hi,

Thank you for the answer, I solved the problem by using some API-Calls as you suggested. If someone else wants to know:

Find all pinned Builds in <buildType>:
/guestAuth/app/rest/builds?locator=branch:unspecified:any,pinned:true,buildType:<buildType>
Get the <BuildID> from there and get more information:
/guestAuth/app/rest/builds/id:<BuildID>
From there get lastChanges.change[0].id  as <ChangeID> as well as the branchName <branch> and start Build <buildType2>
/guestAuth/action.html?add2Queue=<buildType2>&modificationId=<ChangeID>&branchName=<branch>

Greetings
Stefan Stark

0

Please sign in to leave a comment.