Remove secret values

This commit is contained in:
zontreck 2024-09-13 01:21:03 -07:00
parent 917713c312
commit a4c6f91e47
8 changed files with 239 additions and 16 deletions

View file

@ -1,19 +1,16 @@
FROM git.zontreck.com/ariascreations/buildenvironments:appimage
COPY ./agent.secret /agent.secret
ENV PUB NAN
ENV AGENT NAN
ENV GRADLEPROP NAN
ENV PRIVKEY NAN
ENV PUBKEY NAN
WORKDIR /
RUN curl -sO https://ci.zontreck.com/jnlpJars/agent.jar
ADD pub.secret /
RUN cat /pub.secret | dart pub token add https://git.zontreck.com/api/packages/AriasCreations/pub
WORKDIR /root/.ssh
ADD ./id_rsa ./id_rsa
ADD ./id_rsa.pub ./id_rsa.pub
RUN chmod 0600 id_rsa
WORKDIR /root/.gradle
ADD ./gradle.properties ./
WORKDIR /
ADD ./entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT [ "java", "-Dfile.encoding=UTF-8", "-Dsun.jnu.encoding=UTF-8", "-jar", "/agent.jar", "-url", "https://ci.zontreck.com", "-secret", "@/agent.secret", "-name", "Linux", "-workDir", "/builder" ]
ENTRYPOINT [ "/bin/bash", "/entrypoint.sh" ]

View file

@ -0,0 +1,13 @@
#!/bin/bash
echo $PUB | dart pub token add https://git.zontreck.com/api/packages/AriasCreations/pub
mkdir -pv ~/.gradle
echo $GRADLEPROP | base64 -d > ~/.gradle/gradle.properties
mkdir -pv ~/.ssh
echo "$PRIVKEY" | base64 -d > ~/.ssh/id_rsa
echo "$PUBKEY" | base64 -d > ~/.ssh/id_rsa.pub
chmod 0600 ~/.ssh/id_rsa
java -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -jar /agent.jar -url "https://ci.zontreck.com" -secret "$AGENT" -name "Linux" -workDir "/builder"