From 3f93a40a536b1cb147ee8e46d3d882cc7afd50ac Mon Sep 17 00:00:00 2001 From: Jonathan Oliver Date: Wed, 19 Sep 2018 16:21:23 -0600 Subject: [PATCH] Scratch work. --- Dockerfile | 54 +++++++++++++++++++++++++---------------- docker-compose.yml | 2 +- lib/.gnupg/trustdb.gpg | Bin 1200 -> 1240 bytes lib/settings.xml | 23 ++++++++++++++++++ pom.xml | 12 +++------ 5 files changed, 60 insertions(+), 31 deletions(-) create mode 100644 lib/settings.xml diff --git a/Dockerfile b/Dockerfile index 1f2dd3c..165f22d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,25 +3,37 @@ FROM maven:3.5.4-jdk-8-alpine COPY . /code WORKDIR /code -RUN apk add -u make git gnupg \ - && wget -O - "https://github.com/smartystreets/version-tools/releases/download/0.0.6/release.tar.gz" | tar -xz -C /usr/local/bin/ \ - && cp -r lib/.gnupg ~/.gnupg - ARG OSSRH_PASSWORD -RUN sed -i -r "s%%\ - \ - ossrh\ - smartystreets\ - ${OSSRH_PASSWORD}\ - %g" /usr/share/maven/conf/settings.xml -RUN sed -i -r "s%%\ - \ - ossrh\ - \ - true\ - \ - \ - gpg\ - DBDF05C4\ - \ - %g" /usr/share/maven/conf/settings.xml +ARG JAVA_GPG_PASSPHRASE + +RUN true \ + && apk add -u make git gnupg \ + && wget -O - "https://github.com/smartystreets/version-tools/releases/download/0.0.6/release.tar.gz" | tar -xz -C /usr/local/bin/ \ + && mkdir -p ~/.m2 && cp lib/settings.xml ~/.m2/ \ + && sed -i -r "s/PASSWORD/${OSSRH_PASSWORD}/g" ~/.m2/settings.xml \ + && sed -i -r "s/PASSPHRASE/${JAVA_GPG_PASSPHRASE}/g" ~/.m2/settings.xml \ + && true + +# && mkdir -p ~/.gnupg \ +# && chmod 700 ~/.gnupg +# && echo "allow-loopback-pinentry" > ~/.gnupg/gpg-agent.conf +# && cp -r lib/.gnupg ~/ \ +# GPG_OPTS='--pinentry-mode loopback' \ +# ARG OSSRH_PASSWORD +# RUN sed -i -r "s%%\ +# \ +# ossrh\ +# smartystreets\ +# ${OSSRH_PASSWORD}\ +# %g" /usr/share/maven/conf/settings.xml +# RUN sed -i -r "s%%\ +# \ +# ossrh\ +# \ +# true\ +# \ +# \ +# gpg\ +# DBDF05C4\ +# \ +# %g" /usr/share/maven/conf/settings.xml diff --git a/docker-compose.yml b/docker-compose.yml index 7b8828b..a8eb19a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,9 +5,9 @@ services: context: . args: - OSSRH_PASSWORD + - JAVA_GPG_PASSPHRASE volumes: - .:/code environment: - SMARTY_AUTH_ID - SMARTY_AUTH_TOKEN - - JAVA_GPG_PASSPHRASE diff --git a/lib/.gnupg/trustdb.gpg b/lib/.gnupg/trustdb.gpg index 4b8175919f7d0394bbcb8798d7194449791c98bc..171d3f3519cba2ade1c17e7d7bea8cc23f89bb06 100644 GIT binary patch delta 81 zcmdnMd4p4gF})z2nVFH5k%@sJdeP>e3=9m669t7gs$XJel$$6hHZfp<1`osS`>aRi Z?zPw{*7SR_I%lQG=Q$T&vH_K%0synD6_o%0 delta 34 qcmcb?xq(xFF})z2nVFH5k%@sJdeP>e6Ai^Ts$XKBm>@neU;zN6T?(-P diff --git a/lib/settings.xml b/lib/settings.xml new file mode 100644 index 0000000..d73c75d --- /dev/null +++ b/lib/settings.xml @@ -0,0 +1,23 @@ + + + + + ossrh + smartystreets + PASSWORD + + + + + gpg + + true + + + gpg2 + DBDF05C4 + PASSPHRASE + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index e2abeca..a3e9dc5 100644 --- a/pom.xml +++ b/pom.xml @@ -113,15 +113,9 @@ org.apache.maven.plugins maven-gpg-plugin 1.5 - - - sign-artifacts - verify - - sign - - - + + true + org.sonatype.plugins