I am trying to do a ./gradlew build in drone using the base image openjdk:8-jdk-alpine. But my java needs to connect to a https source to get some files and it fails while doing this since the base image doesn't have the certificates incorporated.
Is there a way to overcome this? Can we add certificates into drone pipeline or can I try creating an entirely new base jdk image with my certificates incorporated? Below is a snippet of my drone.yml file
pipeline:
test-build:
when:
event: pull_request
image: openjdk:8-jdk-alpine
commands:
- apk --update add bash libstdc++
- ./gradlew clean build test
Error message:
[ant:xjc] [ERROR] sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target