Skip to content
Snippets Groups Projects
Commit 6bb4d882 authored by Bhushan Rade's avatar Bhushan Rade
Browse files

automatic deployment ibm fix

parent 7d23bdae
No related branches found
No related tags found
2 merge requests!229Merge branch 'dependency-upgrade' into 'master',!200automatic deployment ibm fix
Pipeline #113730 failed
......@@ -99,15 +99,11 @@ public class PartitionServiceImpl implements IPartitionService {
PartitionInfo pi;
PartitionDoc partitionDoc = new PartitionDoc(partitionId, partitionInfo);
try {
HttpResponse response = runPipeline(partitionId);
if(response.getResponseCode() != HttpStatus.SC_ACCEPTED || response.getResponseCode() != HttpStatus.SC_CREATED) {
log.error("Response Recieved : "+response.getResponseCode()+"Error occured while triggering pipeline for record-changed-topic-listener [tenant-specific] deployment");
}
db.save(partitionDoc);
pi = partitionInfo;
} catch (DocumentConflictException e) {
log.error("Partition already exists");
throw new AppException(e.getStatusCode(), "Conflict", "partition already exists", e);
log.error("{} Partition already exists", partitionId);
throw new AppException(e.getStatusCode(), "Conflict", "partition already exists");
} catch (Exception e) {
log.info("Partition creation failed ");
e.printStackTrace();
......@@ -118,6 +114,15 @@ public class PartitionServiceImpl implements IPartitionService {
partitionServiceCache.put(partitionId, pi);
partitionListCache.clearAll();
}
if(partitionId.startsWith("integrationtest") || partitionId.startsWith("common")) {
log.info("this partiton is created through integration test, skipping pipeline trigger");
return pi;
}
HttpResponse response = runPipeline(partitionId);
if(response.getResponseCode() != HttpStatus.SC_ACCEPTED || response.getResponseCode() != HttpStatus.SC_CREATED) {
log.error("Response Recieved : "+response.getResponseCode()+"Error occured while triggering pipeline for record-changed-topic-listener [tenant-specific] deployment");
}
return pi;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment