added triggeredBy for rollouts and autoassignment (#1017)
* added triggeredBy for rollouts and autoassignment Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com> * use createdBy as fallback for triggeredBy in AutoAssignChecker Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com> * removed 'NOT NULL' from db migration scripts for JpaTargetFilterQuery Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com> * fixed tests Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com> * fixed review findings Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com> * inlined redundant method in JpaDeploymentManagement Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com> * added tests + renamed property to 'initiatedBy' Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com> * fixed review findings Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>
This commit is contained in:
@@ -76,13 +76,14 @@ public interface DeploymentManagement {
|
||||
*
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY_AND_UPDATE_TARGET)
|
||||
List<DistributionSetAssignmentResult> assignDistributionSets(
|
||||
@Valid @NotEmpty List<DeploymentRequest> deploymentRequests);
|
||||
List<DistributionSetAssignmentResult> assignDistributionSets(@Valid @NotEmpty List<DeploymentRequest> deploymentRequests);
|
||||
|
||||
/**
|
||||
* Assigns {@link DistributionSet}s to {@link Target}s according to the
|
||||
* {@link DeploymentRequest}.
|
||||
*
|
||||
* @param initiatedBy
|
||||
* the username of the user who initiated the assignment
|
||||
* @param deploymentRequests
|
||||
* information about all target-ds-assignments that shall be made
|
||||
* @param actionMessage
|
||||
@@ -107,7 +108,7 @@ public interface DeploymentManagement {
|
||||
*
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY_AND_UPDATE_TARGET)
|
||||
List<DistributionSetAssignmentResult> assignDistributionSets(
|
||||
List<DistributionSetAssignmentResult> assignDistributionSets(String initiatedBy,
|
||||
@Valid @NotEmpty List<DeploymentRequest> deploymentRequests, String actionMessage);
|
||||
|
||||
/**
|
||||
|
||||
@@ -130,6 +130,11 @@ public interface Action extends TenantAwareBaseEntity {
|
||||
*/
|
||||
String getExternalRef();
|
||||
|
||||
/**
|
||||
* @return the username that initiated this action (directly or indirectly)
|
||||
*/
|
||||
String getInitiatedBy();
|
||||
|
||||
/**
|
||||
* checks if the {@link #getForcedTime()} is hit by the given
|
||||
* {@code hitTimeMillis}, by means if the given milliseconds are greater
|
||||
|
||||
@@ -77,4 +77,8 @@ public interface TargetFilterQuery extends TenantAwareBaseEntity {
|
||||
*/
|
||||
Optional<Integer> getAutoAssignWeight();
|
||||
|
||||
/**
|
||||
* @return the user that triggered the auto assignment
|
||||
*/
|
||||
String getAutoAssignInitiatedBy();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user