Skip to content

Commit d5f1826

Browse files
arsenalzprohanKanojia
authored andcommitted
ocp build/logs permission
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]>
1 parent 766d336 commit d5f1826

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Usage:
2222
```
2323
### 1.18-SNAPSHOT
2424
* Fix #1125: Support WebFlux SpringBoot projects when it comes to generate probes for actuators
25+
* Fix #2844: `oc:build` on openshift use `pods/log` to retrieve logs from build
2526

2627
### 1.17.0 (2024-08-13)
2728
* Fix #494: Support for Micronaut Framework Native Images

jkube-kit/config/service/src/main/java/org/eclipse/jkube/kit/config/service/openshift/OpenshiftBuildService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ private void waitForOpenShiftBuildToComplete(OpenShiftClient client, Build build
466466
// Don't query for logs directly, Watch over the build pod:
467467
waitUntilPodIsReady(buildName + "-build", 120, log);
468468
log.info("Waiting for build " + buildName + " to complete...");
469-
try (LogWatch logWatch = client.pods().inNamespace(applicableOpenShiftNamespace).withName(buildName + "-build").watchLog()) {
469+
try (LogWatch logWatch = client.builds().inNamespace(applicableOpenShiftNamespace).withName(buildName).watchLog()) {
470470
KubernetesHelper.printLogsAsync(logWatch, line -> log.info("[[s]]%s", line))
471471
.whenComplete((v, t) -> {
472472
if (t != null) {

jkube-kit/config/service/src/test/java/org/eclipse/jkube/kit/config/service/openshift/OpenshiftBuildServiceIntegrationTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,7 @@ private WebServerEventCollector prepareMockServer(
592592
if (!imageStreamExists) {
593593
mockServer.expect().get().withPath("/apis/image.openshift.io/v1/namespaces/ns1/imagestreams/" + resourceName).andReturn(404, "").once();
594594
}
595+
mockServer.expect().get().withPath("/api/v1/namespaces/ns1/pods?labelSelector=openshift.io%2Fbuild.name").andReply(collector.record("build-config-check").andReturn(200, bc)).always();
595596
mockServer.expect().get().withPath("/apis/image.openshift.io/v1/namespaces/ns1/imagestreams/" + resourceName).andReturn(200, imageStream).always();
596597

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

0 commit comments

Comments
 (0)