Atlassian Plugin SDK installation with apt-get is broken

Hello! Please let me know if this is the wrong category for this post.

We use some in-house plugins for our Jira Data Center instance, and we run the builds for them inside Docker. The Dockerfile whose contents are below, has worked for a while, but suddenly stopped in the last few weeks. It’s failing when it calls apt-get install --yes atlassian-plugin-sdk. Did Atlassian stop publishing a package at https://packages.atlassian.com/atlassian-sdk-deb?

I don’t see any documentation that mentions installation with apt-get, only this Install the Atlassian SDK on a Linux or Mac system page, which says to install by downloading and extracting an archive. Is that now the only supported installation method for Linux?

If that is the only supported method now, I have two more questions

  1. How should I modify the Dockerfile to install via TGZ extraction? Extract to /opt/atlassian-plugin-sdk and add that to PATH?
  2. Is there any way to see what versions are available? The apt-get installation method would always get the latest SDK to build against, but the current installation instructions include a predetermined version number.
FROM adoptopenjdk/openjdk8
 
copy . /opt/throwaway

RUN apt-get update \
    && apt-get install wget \
    && apt-get install -y gnupg

RUN echo "deb https://packages.atlassian.com/atlassian-sdk-deb stable contrib" >>/etc/apt/sources.list \
    && wget https://packages.atlassian.com/api/gpg/key/public  \
    && apt-key add public \
    && apt-get update \
    && apt-get install --yes atlassian-plugin-sdk \
    && mkdir /opt/atlas \
    && cd /opt/atlas

RUN cd /opt/throwaway && \
    atlas-mvn package && \
    cd / && rm -rf /opt/throwaway

I opened a ticket with the support team (PSSRV-138786), who suggested I ask the question here.

1 Like

I’m unclear about why support kicked this back to the public forum, but as I understand it, Atlassian has stopped releasing DEB versions of the plugin SDK (something about no longer being in possession of the signing keys?) although they are still releasing the TGZ.

This means that you’ll have to get the tarball (probably from here) and extract it yourself.

The annoying thing about the tarball is that it doesn’t have execute permissions for the binaries set properly for all users, so you’ll probably have to run a chmod a+x $SDK_LOCATION/bin/* $SDK_LOCATION/maven/bin/* after you extract it.

3 Likes

Thanks so much, @scott.dudley! I got it to work with this Dockerfile instead now based on your response (it turns out the permissions look to be fine for Docker, since everything runs within the container as root).

FROM adoptopenjdk/openjdk8

# Download and extract SDK tarball
RUN cd /tmp \
    && TAR_PATH=$(curl -L https://marketplace.atlassian.com/download/plugins/atlassian-plugin-sdk-tgz -OJ -sw '%{filename_effective}') \
    && tar -xvzf ${TAR_PATH} -C /opt \
    && rm $TAR_PATH \
    && SDK_DIR=`ls -d /opt/atlassian-plugin-sdk*` \
    && mv $SDK_DIR /opt/atlassian-plugin-sdk

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

COPY . /opt/throwaway

RUN cd /opt/throwaway && \
    atlas-mvn package && \
    cd / && rm -rf /opt/throwaway