From cb2bf84544f9bbb66434aa4ab2bc3d1090831da9 Mon Sep 17 00:00:00 2001 From: Jordan Walster Date: Fri, 8 May 2026 01:37:23 +0100 Subject: [PATCH] feat: add dockerfile and plugins --- Dockerfile | 22 ++++++++++++++++++++++ plugins.txt | 2 ++ 2 files changed, 24 insertions(+) create mode 100644 Dockerfile create mode 100644 plugins.txt diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..11f101a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM jenkins/jenkins:lts-jdk21 +ENV JAVA_OPTS=-'Djenkins.install.runSetupWizard=false -Djava.awt.headless=true' + +ENV JENKINS_CI_YAML='/opt/ci.yaml' +ENV JENKINS_PLUGIN_DIRECTORY='/usr/share/jenkins/ref/plugins' +ENV JENKINS_PLUGIN_TXT_LOCATION='/usr/share/jenkins' +ENV OUTPUT_DIR='/opt' + +# Switch to root user to install required packages +USER root +RUN apt update && apt install jq python3 python3-pip -y --no-install-recommends +RUN pip3 install pyyaml --break-system-packages + +RUN apt purge python3 python3-pip -y + +COPY ./plugins.txt $JENKINS_PLUGIN_TXT_LOCATION/plugins.txt + +# Switch back to user jenkins +USER jenkins + +# Run the jenkins-plugin-cli to import the previously exported list of plugins +RUN jenkins-plugin-cli -f $JENKINS_PLUGIN_TXT_LOCATION/plugins.txt diff --git a/plugins.txt b/plugins.txt new file mode 100644 index 0000000..5e20a2d --- /dev/null +++ b/plugins.txt @@ -0,0 +1,2 @@ +dark-theme:latest +oidc-provider:latest