Browse Source

CI: add job using Java 8

We want to support Java 8 (LTS) so this adds a job using this JDK.
JNI-128
Devan Carpenter 2 years ago
parent
commit
2d44af3581
Signed by: dvn GPG Key ID: E1707CFFD7B85A02
5 changed files with 78 additions and 2 deletions
  1. +1
    -1
      .gitlab-ci-files/common-prepare.yml
  2. +20
    -0
      .gitlab-ci.yml
  3. +17
    -0
      scripts/debian10/Makefile
  4. +1
    -1
      scripts/debian10/build_pEpJNIAdapter.sh
  5. +39
    -0
      scripts/debian10/java8.pEpJNIAdapter.debian10.Dockerfile

+ 1
- 1
.gitlab-ci-files/common-prepare.yml View File

@ -19,4 +19,4 @@
script:
- docker login -u ${DOCKER_REGISTRY_USER} -p ${DOCKER_REGISTRY_PASS} ${DOCKER_REGISTRY_HOST}
- cd scripts/${CI_DISTRO_TARGET}
- make
- make ${MAKE_TARGET}

+ 20
- 0
.gitlab-ci.yml View File

@ -24,3 +24,23 @@ debian10:tagged-build:
TAGGED_BUILD: "true"
rules:
- if: '$CI_COMMIT_TAG =~ /^Release_[0-9]+\.[0-9]+\.[0-9]+$/'
debian10-java8:build:
extends: .make_in_docker
stage: build
variables:
CI_DISTRO_TARGET: "debian10"
MAKE_TARGET: "java8"
DEBIAN_FRONTEND: "noninteractive"
rules:
- if: '$CI_COMMIT_TAG !~ /^Release_[0-9]+\.[0-9]+\.[0-9]+$/'
debian10-java8:tagged-build:
extends: .make_in_docker
stage: build
variables:
CI_DISTRO_TARGET: "debian10"
MAKE_TARGET: "java8"
DEBIAN_FRONTEND: "noninteractive"
rules:
- if: '$CI_COMMIT_TAG =~ /^Release_[0-9]+\.[0-9]+\.[0-9]+$/'

+ 17
- 0
scripts/debian10/Makefile View File

@ -29,3 +29,20 @@ all:
docker push $(IMAGE_NAME):$(PEPJNIADAPTER_VERSION)
docker push $(IMAGE_NAME):$(PEPJNIADAPTER_VERSION)_libpepadapter-$(LIBPEPADAPTER_VERSION)_engine-$(PEPENGINE_VERSION)
docker push $(IMAGE_NAME):latest
java8:
-docker pull $(IMAGE_NAME)-java8:latest
cd ../../ && docker build --build-arg CURRENT_DISTRO=$(CURRENT_DISTRO) \
--build-arg DOCKER_REGISTRY_HOST=${DOCKER_REGISTRY_HOST} \
--build-arg PEPJNIADAPTER_VERSION=$(PEPJNIADAPTER_VERSION) \
--build-arg LIBPEPADAPTER_VERSION=$(LIBPEPADAPTER_VERSION) \
--build-arg PEPENGINE_VERSION=$(PEPENGINE_VERSION) \
--build-arg SEQUOIA_VERSION=$(SEQUOIA_VERSION) \
--cache-from $(IMAGE_NAME):latest \
--tag=$(IMAGE_NAME)-java8:$(PEPJNIADAPTER_VERSION) \
--tag=$(IMAGE_NAME)-java8:$(PEPJNIADAPTER_VERSION)_libpepadapter-$(LIBPEPADAPTER_VERSION)_engine-$(PEPENGINE_VERSION) \
--tag=$(IMAGE_NAME)-java8:latest \
-f scripts/${CURRENT_DISTRO}/java8.$(DOCKERFILE) .
docker push $(IMAGE_NAME)-java8:$(PEPJNIADAPTER_VERSION)
docker push $(IMAGE_NAME)-java8:$(PEPJNIADAPTER_VERSION)_libpepadapter-$(LIBPEPADAPTER_VERSION)_engine-$(PEPENGINE_VERSION)
docker push $(IMAGE_NAME)-java8:latest

+ 1
- 1
scripts/debian10/build_pEpJNIAdapter.sh View File

@ -4,7 +4,7 @@ set -exo
export LC_ALL=en_US.UTF-8 && \
# JAVA_HOME (only for the pEpJNIAdapter)
export JAVA_HOME=$(dirname $(dirname $(readlink -f /usr/bin/javac)));
export JAVA_HOME=$(dirname $(dirname $(readlink -f $(which javac))));
echo "$JAVA_HOME"
cat >local.conf <<__LOCAL__


+ 39
- 0
scripts/debian10/java8.pEpJNIAdapter.debian10.Dockerfile View File

@ -0,0 +1,39 @@
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}
ENV BUILDROOT /build
ENV INSTPREFIX /install
ENV OUTDIR /out
### Install Java 8
USER root
RUN apt-get update -yqq && \
apt-get install -yqq apt-transport-https ca-certificates wget dirmngr gnupg2 software-properties-common && \
wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | apt-key add - && \
add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ && \
apt-get update -yqq && \
apt-get install -yqq adoptopenjdk-8-hotspot && \
rm -rf /var/lib/apt/lists/*
USER pep-builder
### Setup working directory
RUN mkdir ${BUILDROOT}/pEpJNIAdapter
COPY . ${BUILDROOT}/pEpJNIAdapter
USER root
RUN chown -R pep-builder:pep-builder ${BUILDROOT}/pEpJNIAdapter
USER pep-builder
WORKDIR ${BUILDROOT}/pEpJNIAdapter
ARG PEPJNIADAPTER_VERSION
ARG CURRENT_DISTRO
### Build libpEpAdapter
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 && \
install -m 644 -t ${INSTPREFIX}/lib dist/pEp.jar && \
rm -rf ${BUILDROOT}/*

Loading…
Cancel
Save