Skip to content

Commit

Permalink
fix(openshift): retrieve builder pod logs from builds() DSL entrypoint
Browse files Browse the repository at this point in the history
remove unused comments, add improve OpenshiftBuildServiceIntegrationTest tests

Signed-off-by: Oleksandr Krutko <[email protected]>

revert to initial version of file quickstarts/maven/spring-boot/pom.xml

Signed-off-by: Oleksandr Krutko <[email protected]>
  • Loading branch information
arsenalzp authored Aug 30, 2024
1 parent 766d336 commit 422a754
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Usage:
```
### 1.18-SNAPSHOT
* Fix #1125: Support WebFlux SpringBoot projects when it comes to generate probes for actuators
* Fix #2844: `oc:build` on openshift use `pods/log` to retrieve logs from build

### 1.17.0 (2024-08-13)
* Fix #494: Support for Micronaut Framework Native Images
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ private void waitForOpenShiftBuildToComplete(OpenShiftClient client, Build build
// Don't query for logs directly, Watch over the build pod:
waitUntilPodIsReady(buildName + "-build", 120, log);
log.info("Waiting for build " + buildName + " to complete...");
try (LogWatch logWatch = client.pods().inNamespace(applicableOpenShiftNamespace).withName(buildName + "-build").watchLog()) {
try (LogWatch logWatch = client.builds().inNamespace(applicableOpenShiftNamespace).withName(buildName).watchLog()) {
KubernetesHelper.printLogsAsync(logWatch, line -> log.info("[[s]]%s", line))
.whenComplete((v, t) -> {
if (t != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,7 @@ private WebServerEventCollector prepareMockServer(
if (!imageStreamExists) {
mockServer.expect().get().withPath("/apis/image.openshift.io/v1/namespaces/ns1/imagestreams/" + resourceName).andReturn(404, "").once();
}
mockServer.expect().get().withPath("/api/v1/namespaces/ns1/pods?labelSelector=openshift.io%2Fbuild.name").andReply(collector.record("build-config-check").andReturn(200, bc)).always();
mockServer.expect().get().withPath("/apis/image.openshift.io/v1/namespaces/ns1/imagestreams/" + resourceName).andReturn(200, imageStream).always();

mockServer.expect().post().withPath("/apis/image.openshift.io/v1/namespaces/ns1/imagestreams").andReturn(201, imageStream).once();
Expand Down

0 comments on commit 422a754

Please sign in to comment.