Skip to content

Commit c00fda1

Browse files
committed
Add update-ca-trust. Remove debug
1 parent 80050b0 commit c00fda1

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

deploy/tasks/pre-build.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ spec:
8181
cpu: 10m
8282
memory: 512Mi
8383
script: |
84-
ls -lR $(workspaces.source.path)
8584
/opt/jboss/container/java/run/run-java.sh $(params.BUILD_TOOL)-prepare --java-version=$(params.JAVA_VERSION) --build-tool-version=$(params.BUILD_TOOL_VERSION) --recipe-image=$(params.RECIPE_IMAGE) --request-processor-image=$(params.JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE) --disabled-plugins=$(params.BUILD_PLUGINS) $(workspaces.source.path)/source
8685
env:
8786
- name: BUILD_SCRIPT
@@ -119,7 +118,6 @@ spec:
119118
- name: create-pre-build-image
120119
image: quay.io/redhat-appstudio/build-trusted-artifacts:latest@sha256:52f1391e6f1c472fd10bb838f64fae2ed3320c636f536014978a5ddbdfc6b3af
121120
script: |
122-
ls -lR $(workspaces.source.path)
123121
echo "Creating pre-build-image archive"
124122
create-archive --store $(params.IMAGE_URL) $(results.PRE_BUILD_IMAGE_DIGEST.path)=$(workspaces.source.path)/source
125123
env:

java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/build/preprocessor/maven/MavenPrepareCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.redhat.hacbs.container.build.preprocessor.maven;
22

3+
import static org.apache.commons.lang3.StringUtils.isNotEmpty;
4+
35
import java.io.BufferedReader;
46
import java.io.IOException;
57
import java.nio.file.FileVisitResult;
@@ -32,8 +34,6 @@
3234
import io.quarkus.logging.Log;
3335
import picocli.CommandLine;
3436

35-
import static org.apache.commons.lang3.StringUtils.isNotEmpty;
36-
3737
/**
3838
* A simple preprocessor that attempts to fix problematic maven build files.
3939
* <p>

java-components/driver/src/main/resources/pipeline.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,19 @@ spec:
4141
value: "%{JAVA_VERSION}"
4242
- name: BUILD_SCRIPT
4343
value: |
44+
update-ca-trust
45+
46+
# Go through certificates and insert them into the cacerts
47+
for cert in /etc/pki/ca-trust/source/anchors/*; do
48+
echo "inserting $cert into java cacerts"
49+
keytool -import -alias $(basename $cert)-ca \
50+
-file $cert \
51+
-keystore /etc/pki/java/cacerts \
52+
-storepass changeit --noprompt
53+
done;
54+
55+
echo "Building the project ..."
56+
4457
%{BUILD_SCRIPT}
4558
- name: MVN_REPO_DEPLOY_URL
4659
value: "%{MVN_REPO_DEPLOY_URL}"
@@ -55,7 +68,7 @@ spec:
5568
- name: ENABLE_INDY_PROXY
5669
value: "false"
5770
- name: JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE
58-
value: quay.io/ncross/hacbs-jvm-build-request-processor:latest
71+
value: "quay.io/ncross/hacbs-jvm-build-request-processor:latest"
5972
# "quay.io/redhat-user-workloads/konflux-jbs-pnc-tenant/jvm-build-service/build-request-processor:latest"
6073
# TODO: Should PNC set both limits and requests? See
6174
# https://home.robusta.dev/blog/kubernetes-memory-limit

0 commit comments

Comments
 (0)