Skip to content

Commit

Permalink
release 1.0.28
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenchristopher-zip committed Sep 28, 2022
1 parent 45e2ea2 commit 1a08baf
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 14 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spinnakerBundle {
pluginId = "zip.deployboard"
description = "Customization for Zip deploys"
provider = "https://github.com/Greenbax/zip-spinnaker-deployboard"
version = "1.0.27"
version = "1.0.28"
}

subprojects {
Expand Down
8 changes: 4 additions & 4 deletions plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"provider": "https://github.com/Greenbax/zip-spinnaker-deployboard",
"releases": [
{
"version": "1.0.27",
"date": "2022-09-28T04:49:34.006752Z",
"version": "1.0.28",
"date": "2022-09-28T05:06:46.693938Z",
"requires": "gate>=0.0.0,orca>=0.0.0,deck>=0.0.0",
"sha512sum": "2f23dd8aec990de4d5bfdb400b60ad934963d544c8e36523c51d617a6dc143d4b08c9a8d13a8366690d8a24b97a1dd9357954a31e149d692d82f72a4435cf74d",
"sha512sum": "c0f30eb743c57956617a6adbed46e8f0f1bf20515592e3cef08c410ba030d069ee16c00ef4b047a55d14393be9aae70d60efb421a96cc54498a37239930b0e55",
"state": "",
"url": "https://github.com/Greenbax/zip-spinnaker-deployboard/releases/download/v1.0.27/zip-spinnaker-deployboard.zip"
"url": "https://github.com/Greenbax/zip-spinnaker-deployboard/releases/download/v1.0.28/zip-spinnaker-deployboard.zip"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,21 +98,31 @@ public HttpResponse handle(HttpRequest httpRequest) {
}

BranchStatus branchStatus = this.queryBranchStatus(branch);
String filterExpression = "contains(author,:query) or contains(msg,:query)";
ValueMap valueMap = new ValueMap()
.withString(":branch_name", branch)
.withString(":sort_key", lastSortKeySeen)
.withString(":query", query);
if (!branchStatus.getDeployed().equals("")) {
filterExpression += " or contains(dockerTag,:deployed_tag)";
valueMap.withString(":deployed_tag", branchStatus.getDeployed().replaceFirst(this.dockerPrefix, ""));
}
if (!branchStatus.getDeploying().equals("")) {
filterExpression += " or contains(dockerTag,:deploying_tag)";
valueMap.withString(":deploying_tag", branchStatus.getDeploying().replaceFirst(this.dockerPrefix, ""));
}
if (!branchStatus.getLastDeployed().equals("")) {
filterExpression += " or contains(dockerTag,:last_deployed_tag)";
valueMap.withString(":last_deployed_tag", branchStatus.getLastDeployed().replaceFirst(this.dockerPrefix, ""));
}

QuerySpec spec = new QuerySpec().withScanIndexForward(false)
.withKeyConditionExpression("branch = :branch_name and #sort_key_name < :sort_key")
.withFilterExpression("contains(author,:query) or contains(msg,:query) or contains(dockerTag,:deployed_tag) or contains(dockerTag,:deploying_tag) or contains(dockerTag,:last_deployed_tag)")
.withFilterExpression(filterExpression)
.withNameMap(new NameMap()
.with("#sort_key_name", "build#ts#author#sha")
)
.withValueMap(new ValueMap()
.withString(":branch_name", branch)
.withString(":sort_key", lastSortKeySeen)
.withString(":query", query)
.withString(":deployed_tag", branchStatus.getDeployed().replaceFirst(this.dockerPrefix, ""))
.withString(":deploying_tag", branchStatus.getDeploying().replaceFirst(this.dockerPrefix, ""))
.withString(":last_deployed_tag", branchStatus.getLastDeployed().replaceFirst(this.dockerPrefix, ""))
)
.withValueMap(valueMap)
.withMaxPageSize(100);

AmazonDynamoDB client = AmazonDynamoDBClientBuilder.standard().withRegion(Regions.US_EAST_2).withCredentials(WebIdentityTokenCredentialsProvider.create()).build();
Expand Down

0 comments on commit 1a08baf

Please sign in to comment.