Skip to content

Commit 4a185f8

Browse files
committed
Add git ssh to release script
1 parent 3710e8d commit 4a185f8

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ FROM openjdk:8-jdk-alpine
33
ENV VERSION=
44
ENV NEXT_VERSION=
55
ENV GPG_PASSPHRASE=
6-
ENV GIT_USERNAME=
7-
ENV GIT_SECRET=
86
ARG GIT_EMAIL=
97
ARG FULL_NAME=
108

@@ -17,11 +15,12 @@ ENV MAVEN_OPTS="-XX:+TieredCompilation -XX:TieredStopAtLevel=1"
1715

1816
VOLUME /gpg
1917
VOLUME /maven
18+
VOLUME /ssh
2019

2120
COPY maven-release.sh /maven-release.sh
2221

2322
# Install Maven, Git and gpg
24-
RUN apk add --no-cache curl tar bash git gnupg
23+
RUN apk add --no-cache curl tar bash git gnupg openssh
2524
RUN mkdir -p /usr/share/maven && \
2625
curl -fsSL http://apache.osuosl.org/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz | tar -xzC /usr/share/maven --strip-components=1 && \
2726
ln -s /usr/share/maven/bin/mvn /usr/bin/mvn

maven-release.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ echo "Set private key..."
77
cp -vr /gpg ~/.gnupg
88
echo "pinentry-mode loopback" > ~/.gnupg/gpg.conf
99
cp -vpr /maven ~/.m2
10+
cp -vr /ssh ~/.ssh
1011

1112
echo "Cloning convertapi-java..."
12-
git clone https://${GIT_USERNAME}:${GIT_SECRET}@github.com/ConvertAPI/convertapi-java.git
13+
ssh-keyscan github.com >> ~/.ssh/known_hosts
14+
git clone git@github.com:ConvertAPI/convertapi-java.git
1315
cd convertapi-java
1416

1517
echo "Switching to the release branch..."

0 commit comments

Comments
 (0)