Browse Source

CI: build libpEpAdapter ourselves

libpEpAdapter does not build an image with every version of pEpEngine we
may need, so we will use the pEpEngine docker image, and build the
libpEpAdapter version we need as part of our CI job.
pull/6/head
Devan Carpenter 1 year ago
parent
commit
79aa46ce11
Signed by: dvn GPG Key ID: E1707CFFD7B85A02
2 changed files with 46 additions and 6 deletions
  1. +26
    -3
      scripts/debian10/java8.pEpJNIAdapter.debian10.Dockerfile
  2. +20
    -3
      scripts/debian10/pEpJNIAdapter.debian10.Dockerfile

+ 26
- 3
scripts/debian10/java8.pEpJNIAdapter.debian10.Dockerfile View File

@ -1,13 +1,36 @@
ARG DOCKER_REGISTRY_HOST
ARG CURRENT_DISTRO
ARG LIBPEPADAPTER_VERSION
ARG PEPENGINE_VERSION
FROM ${DOCKER_REGISTRY_HOST}/pep-${CURRENT_DISTRO}-libpepadapter:${LIBPEPADAPTER_VERSION}_engine-${PEPENGINE_VERSION}
FROM ${DOCKER_REGISTRY_HOST}/pep-${CURRENT_DISTRO}-engine:${PEPENGINE_VERSION}
ENV BUILDROOT /build
ENV INSTPREFIX /install
ENV OUTDIR /out
ARG LIBPEPADAPTER_VERSION
ARG CURRENT_DISTRO
## Build and install libpEpAdapter
### Setup working directory
RUN git clone --depth=1 \
https://gitea.pep.foundation/pEp.foundation/libpEpAdapter.git \
-b ${LIBPEPADAPTER_VERSION} \
${BUILDROOT}/libpEpAdapter
WORKDIR ${BUILDROOT}/libpEpAdapter
### Build libpEpAdapter
RUN sh ./scripts/${CURRENT_DISTRO}/build_libpEpAdapter.sh && \
rm -rf ${BUILDROOT}/*
### Install system dependencies
USER root
RUN apt-get update -yqq && \
apt-get install -yqq default-jdk-headless
USER pep-builder
## Build and install pEpJNIAdapter
### Install Java 8
USER root
RUN apt-get update -yqq && \
@ -31,7 +54,7 @@ WORKDIR ${BUILDROOT}/pEpJNIAdapter
ARG PEPJNIADAPTER_VERSION
ARG CURRENT_DISTRO
### Build libpEpAdapter
### Build pEpJNIAdapter
RUN sh ./scripts/${CURRENT_DISTRO}/build_pEpJNIAdapter.sh && \
install -m 644 -t ${INSTPREFIX}/lib dist/libpEpJNI.a && \
install -m 755 -t ${INSTPREFIX}/lib dist/libpEpJNI.so && \


+ 20
- 3
scripts/debian10/pEpJNIAdapter.debian10.Dockerfile View File

@ -1,19 +1,36 @@
ARG DOCKER_REGISTRY_HOST
ARG CURRENT_DISTRO
ARG LIBPEPADAPTER_VERSION
ARG PEPENGINE_VERSION
FROM ${DOCKER_REGISTRY_HOST}/pep-${CURRENT_DISTRO}-libpepadapter:${LIBPEPADAPTER_VERSION}_engine-${PEPENGINE_VERSION}
FROM ${DOCKER_REGISTRY_HOST}/pep-${CURRENT_DISTRO}-engine:${PEPENGINE_VERSION}
ENV BUILDROOT /build
ENV INSTPREFIX /install
ENV OUTDIR /out
ARG LIBPEPADAPTER_VERSION
ARG CURRENT_DISTRO
## Build and install libpEpAdapter
### Setup working directory
RUN git clone --depth=1 \
https://gitea.pep.foundation/pEp.foundation/libpEpAdapter.git \
-b ${LIBPEPADAPTER_VERSION} \
${BUILDROOT}/libpEpAdapter
WORKDIR ${BUILDROOT}/libpEpAdapter
### Build libpEpAdapter
RUN sh ./scripts/${CURRENT_DISTRO}/build_libpEpAdapter.sh && \
rm -rf ${BUILDROOT}/*
### Install system dependencies
USER root
RUN apt-get update -yqq && \
apt-get install -yqq default-jdk-headless
USER pep-builder
## Build and install pEpJNIAdapter
### Setup working directory
RUN mkdir ${BUILDROOT}/pEpJNIAdapter
COPY . ${BUILDROOT}/pEpJNIAdapter
@ -25,7 +42,7 @@ WORKDIR ${BUILDROOT}/pEpJNIAdapter
ARG PEPJNIADAPTER_VERSION
ARG CURRENT_DISTRO
### Build libpEpAdapter
### Build pEpJNIAdapter
RUN sh ./scripts/${CURRENT_DISTRO}/build_pEpJNIAdapter.sh && \
install -m 644 -t ${INSTPREFIX}/lib dist/libpEpJNI.a && \
install -m 755 -t ${INSTPREFIX}/lib dist/libpEpJNI.so && \


Loading…
Cancel
Save