Skip to content

Commit

Permalink
update to use java 17 and tar install
Browse files Browse the repository at this point in the history
  • Loading branch information
calebwsutton committed Oct 17, 2024
1 parent a25aebc commit a8f533a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,23 @@ LABEL maintainer="Dwolla Dev <[email protected]>"
LABEL org.label-schema.vcs-url="https://github.com/Dwolla/jenkins-agent-atlassian-sdk"

USER root
ARG SDK_VERSION="9.1.1"

RUN apt-get update && \
apt-get install -y apt-transport-https \
gnupg && \
apt-get update && \
curl -o atlassian.pub https://packages.atlassian.com/api/gpg/key/public && \
sh -c 'echo "deb [arch=amd64] https://packages.atlassian.com/atlassian-sdk-deb stable contrib" >>/etc/apt/sources.list' && \
apt-key add atlassian.pub && \
apt-get update && \
apt-get install atlassian-plugin-sdk && \
apt-get clean && \
rm atlassian.pub
COPY atlassian-plugin-sdk-${SDK_VERSION}.tar.gz /tmp

RUN tar -xvzf /tmp/atlassian-plugin-sdk-${SDK_VERSION}.tar.gz -C /opt && \
rm /tmp/atlassian-plugin-sdk-${SDK_VERSION}.tar.gz && \
mv /opt/atlassian-plugin-sdk-${SDK_VERSION}/ /opt/atlassian-plugin-sdk/

RUN chmod +x -R /opt/atlassian-plugin-sdk/
RUN export SDKMAN_DIR="${JENKINS_HOME}/.sdkman" && curl -s "https://get.sdkman.io" | bash

RUN chown -R jenkins:jenkins "${JENKINS_HOME}/.sdkman"

USER jenkins

ENV PATH="$PATH:/opt/atlassian-plugin-sdk/bin"

RUN source ~/.sdkman/bin/sdkman-init.sh && sdk install java 17.0.12-tem

ENTRYPOINT ["jenkins-agent"]
Binary file added atlassian-plugin-sdk-9.1.1.tar.gz
Binary file not shown.

0 comments on commit a8f533a

Please sign in to comment.