Skip to content

Commit 4ad7d8b

Browse files
committed
performancecopilot#130 Introduce Release batch file which launches the Docker build/release process and automates GPG key fun
1 parent 5cd8ecf commit 4ad7d8b

File tree

3 files changed

+36
-2
lines changed

3 files changed

+36
-2
lines changed

Dockerfile

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
FROM quay.io/performancecopilot/pcp
22

33
RUN yum update -y
4-
RUN yum install -y pcp-gui java-11-openjdk maven maven-openjdk11
4+
RUN yum install -y pcp-gui git java-11-openjdk maven maven-openjdk11
5+
6+
WORKDIR /parfait
7+
8+
ENV GIT_AUTHOR_NAME=""
9+
ENV GIT_AUTHOR_EMAIL=""
510

6-
WORKDIR /parfait
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
echo "Starting PMCD"
6+
/usr/libexec/pcp/lib/pmcd start
7+
8+
echo "Importing GPGKEY"
9+
# this trick allows the GPG secret key to be imported via the command line
10+
# thank goodness for Google
11+
echo $MAVEN_GPG_PASSPHRASE | gpg --batch --yes --passphrase-fd 0 --import /root/gpgkeyexport/gpgkey.prvt.asc
12+
13+
echo "Building Parfait"
14+
mvn clean verify gpg:sign

releasing.sh

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
[ ! -f .releasing.env ] && echo ".releasing.env file not found" && exit 1
6+
source .releasing.env
7+
8+
[ ! $GIT_USERNAME ] && echo "GIT_USERNAME is not set" && exit 1
9+
[ ! $GIT_EMAIL ] && echo "GIT_EMAIL is not set" && exit 1
10+
[ ! $GPG_PASSPHRASE ] && echo "GPG_PASSPHRASE is not set" && exit 1
11+
12+
docker build . -t parfait-build
13+
docker run --rm --env GIT_USERNAME="${GIT_USERNAME}" --env GIT_EMAIL="${GIT_EMAIL}" --env MAVEN_GPG_PASSPHRASE="${GPG_PASSPHRASE}" -v `pwd`:/parfait -v ~/.m2:/root/.m2 -v ~/gpgkeyexport:/root/gpgkeyexport parfait-builder sh -c 'releasing-scripts/docker-release-build.sh'
14+
15+
16+

0 commit comments

Comments
 (0)