From abe8bb2738c1d3006df6529b63477af0606c175d Mon Sep 17 00:00:00 2001 From: inFame Date: Tue, 23 Aug 2022 17:10:12 +1000 Subject: [PATCH] Run Atlassian SDK in docker (#1038) --- CONTRIBUTING.rst | 22 +++++++++++++++++++--- Dockerfile.standalone | 17 +++++++++++++++++ Makefile | 6 ++++++ 3 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 Dockerfile.standalone diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 3463da63c..8e98814d5 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -13,10 +13,26 @@ Getting Started * Install pyenv_ * Install related atlassian product for testing through SDK_ or use the cloud instance * `apt install libkrb5-dev` -* Install Kerberos Dependency: `pip install -r requirements-dev.txt` +* Install Kerberos Dependency: + +:: + + pip install -r requirements-dev.txt + * Start up related product: - - Standalone product atlas-run-standalone_ - - For cloud product, just do registration + - Standalone product atlas-run-standalone_ + - For cloud product, just do registration + - Atlassian SDK in doker + - Build the image + :: + + make docker-atlassian-standalone + + - Run an Atlassian standalone product + :: + + docker run -i -t -p 6990:6990 atlassian-sdk:latest atlas-run-standalone --product bamboo + * Run the quality checks with `make qa` or if you have docker installed with `make docker-qa` * Send pull request diff --git a/Dockerfile.standalone b/Dockerfile.standalone new file mode 100644 index 000000000..b18fde0cf --- /dev/null +++ b/Dockerfile.standalone @@ -0,0 +1,17 @@ +FROM openjdk:11 + +ARG DEBIAN_FRONTEND=noninteractive + +# Add Atlassian SDK repo +RUN echo "deb https://packages.atlassian.com/debian/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 + +# Install Atlassian plugin SDK +RUN apt-get install -y atlassian-plugin-sdk + +# Clean +RUN apt-get clean + +WORKDIR /opt/atlassian diff --git a/Makefile b/Makefile index 412ef5c13..f95e5acfc 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ PYTHON_VERSION ?= 3.7 +ATLASSIAN_SDK ?= atlassian-sdk QA_CONTAINER ?= atlassian-python-api-qa-$(PYTHON_VERSION) TEST_OPTS ?= @@ -48,3 +49,8 @@ docker-qa-build: Dockerfile.qa requirements.txt requirements-dev.txt --tag $(QA_CONTAINER) \ --build-arg PYTHON_VERSION=$(PYTHON_VERSION) \ --file $< . + +docker-atlassian-standalone: Dockerfile.standalone + docker build \ + --tag $(ATLASSIAN_SDK) \ + --file $< .