From 64743f430b9132b1af17cbd9d73832a362702de4 Mon Sep 17 00:00:00 2001 From: Derry Hamilton Date: Wed, 7 Dec 2022 11:00:29 +0000 Subject: [PATCH] Update build host and postgres libs Bumping the postgres libs showed that the upstream build images were EOL, so we're now running a more modern version of Java and have migrated the build to ubuntu LTS --- build_util/build_rpm | 12 ------------ build_util/build_rpms_in_docker | 6 ------ docker/multistage/Dockerfile | 16 +++++----------- pom.xml | 2 +- uJETL.spec | 33 --------------------------------- 5 files changed, 6 insertions(+), 63 deletions(-) delete mode 100755 build_util/build_rpm delete mode 100755 build_util/build_rpms_in_docker delete mode 100644 uJETL.spec diff --git a/build_util/build_rpm b/build_util/build_rpm deleted file mode 100755 index 769915f..0000000 --- a/build_util/build_rpm +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -set -e - -cd /root -cp -Rv build build2 -cd build2 - -SPEC=$(ls *.spec) -VER=$(grep Version $SPEC | awk '{print $2}') -tar cvf $HOME/rpmbuild/SOURCES/uJETL-${VER}.tar.gz --show-transformed --transform="s/^\./uJETL-${VER}/" . -rpmbuild -ba $SPEC -cp /root/rpmbuild/RPMS/x86_64/* /root/build/ diff --git a/build_util/build_rpms_in_docker b/build_util/build_rpms_in_docker deleted file mode 100755 index acc6fee..0000000 --- a/build_util/build_rpms_in_docker +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -set -e - -docker build --rm -t local/c7-buildhost docker/build - -docker run -it --rm -v `pwd`:/root/build local/c7-buildhost /root/build/build_util/build_rpm diff --git a/docker/multistage/Dockerfile b/docker/multistage/Dockerfile index 355f1c7..dfc23a9 100644 --- a/docker/multistage/Dockerfile +++ b/docker/multistage/Dockerfile @@ -1,14 +1,8 @@ -FROM centos:centos8 as builder -RUN yum -y install epel-release java-11-openjdk-devel -RUN yum -y groupinstall 'Development Tools' -RUN yum -y install git maven -RUN alternatives --set javac /usr/lib/jvm/java-11-openjdk-11.*/bin/javac -RUN alternatives --set java /usr/lib/jvm/java-11-openjdk-11.*/bin/java -RUN git clone --single-branch --branch master https://github.com/rasilon/ujetl.git -RUN cd ujetl && JAVA_HOME=/usr/lib/jvm/java-11 mvn -e package - - - +FROM ubuntu:22.04 as builder +RUN apt-get update && apt-get -y upgrade +RUN apt-get -y install openjdk-19-jdk-headless maven git +RUN git clone --single-branch --branch main https://github.com/rasilon/ujetl.git +RUN cd ujetl && mvn -e package FROM openjdk:11 as runner LABEL maintainer="Derry Hamilton " diff --git a/pom.xml b/pom.xml index 7fdfb89..1ed75f7 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma com.rasilon.ujetl CopyingApp jar - 2.3.3 + 2.4.3 uJETL https://github.com/rasilon/ujetl diff --git a/uJETL.spec b/uJETL.spec deleted file mode 100644 index d64abdf..0000000 --- a/uJETL.spec +++ /dev/null @@ -1,33 +0,0 @@ -Summary: Java app to facilitate moving data between databases. -Name: uJETL -Version: 2.3.3 -Release: 1 -Group: Applications/Database -License: All rights reserved. -Source: uJETL-%{version}.tar.gz -URL: https://github.com/rasilon/ujetl.git -Distribution: derryh -Vendor: derryh -Packager: Derry Hamilton -#BuildRoot: . - -%description -A very small ETL app - -%prep -%setup - -%build -#mvn -Dmaven.test.skip=true clean package -true - -%install -mkdir -p $RPM_BUILD_ROOT/usr/share/ujetl/lib $RPM_BUILD_ROOT/etc/ujetl $RPM_BUILD_ROOT/usr/bin -cp target/CopyingApp-*-jar-with-dependencies.jar $RPM_BUILD_ROOT/usr/share/ujetl/lib/CopyingApp.jar -cp install_extra/run_copying_job $RPM_BUILD_ROOT/usr/bin -cp install_extra/copying_defaults_log4j.xml $RPM_BUILD_ROOT/etc/ujetl - -%files -/usr/share/ujetl/lib/CopyingApp.jar -/usr/bin/run_copying_job -/etc/ujetl/copying_defaults_log4j.xml