feat: Clean up root directory and create docs folder

This commit is contained in:
2025-09-04 14:34:49 -05:00
parent d50a58e934
commit 79d3475c74
7 changed files with 80 additions and 0 deletions

80
docs/JENKINS-FINDINGS.md Normal file
View File

@@ -0,0 +1,80 @@
# Jenkins Cloudron Package - Findings and Research
## Phase 1, Step 1: Review Existing Jenkins Package - Findings:
The directory `CloudronPackages/Jenkins/` contains the following files and directories:
* `casc_templates/` (directory)
* `CloudronManifest.json`
* `Dockerfile`
* `JenkinsBulldNotes.md` (Note: There's a typo in the filename, "BulldNotes" instead of "BuildNotes". This will be corrected later.)
* `nginx.conf`
* `start.sh`
* `supervisor.conf`
This confirms that a partial Jenkins package already exists, providing a good starting point.
## Phase 1, Step 2: Research Jenkins Requirements - Findings from Existing Files and Initial Research:
### `CloudronManifest.json`:
* `id`: `io.jenkins.cloudron`
* `title`: `Jenkins`
* `author`: `Cloudron Packager`
* `description`: `Jenkins is an open source automation server which enables developers to reliably build, test, and deploy their software.`
* `tagline`: `The leading open source automation server`
* `version`: `1.0.0` (This is likely outdated, Jenkins has much higher versions and should be updated to reflect the actual Jenkins version installed).
* `healthCheckPath`: `/login` (This is a good starting point).
* `httpPort`: `8080` (Standard Jenkins port).
* `manifestVersion`: `2`
* `website`: `https://jenkins.io/`
* `contactEmail`: `support@cloudron.io`
* `icon`: `file://logo.png` (The `logo.png` file is not present in the `CloudronPackages/Jenkins/` directory and will need to be added).
* `dockerImage`: `cloudron/jenkins` (This is the image name *this* package will produce, not the base image).
* `memoryLimit`: `2048000000` (2GB, seems reasonable for a start).
* `addons`: `localstorage` (for `/app/data`).
* `optionalAddons`: `ldap`, `oauth` (suggests integration with Cloudron's authentication).
* `tags`: `ci`, `cd`, `devops`, `automation`
* `postInstallMessage`: Provides instructions for initial admin password.
* `minBoxVersion`: `5.4.0`.
* `documentationUrl`: `https://jenkins.io/doc/`
### `Dockerfile`:
* `FROM cloudron/base:4.2.0` (Good, standard Cloudron base image).
* Installs `openjdk-17-jdk` (Jenkins requires Java. Need to confirm if this is the recommended Java version for the latest stable Jenkins).
* Adds Jenkins repository key and repository (`https://pkg.jenkins.io/debian-stable`).
* Installs `jenkins` package.
* Installs specific Jenkins plugins (`ldap.hpi`, `oic-auth.hpi`, `configuration-as-code.hpi`, `credentials.hpi`) by curling them from `updates.jenkins.io`. (It might be better to use the Jenkins CLI to install plugins during the build process, which can handle dependencies and ensure compatibility).
* Copies `casc_templates/` to `/tmp/data/casc_configs/`.
* Sets up `/app/data` and `/tmp/data/jenkins_home`.
* Copies `start.sh`, `nginx.conf`, `supervisor.conf`.
* `usermod -a -G jenkins cloudron && chown -R cloudron:cloudron /tmp/data` (This is crucial for permissions).
* `WORKDIR /app/data`.
* `CMD ["/app/code/start.sh"]`.
### `start.sh`:
* Sets `JENKINS_HOME=/app/data/jenkins_home`.
* Initializes `JENKINS_HOME` by copying from `/tmp/data/jenkins_home` and plugins from `/tmp/data/plugins`.
* Sets permissions with `chown -R cloudron:cloudron "${JENKINS_HOME}"`.
* Sets `JENKINS_OPTS` and `JAVA_OPTS` to disable setup wizard.
* Uses `CLOUDRON_OAUTH_CLIENT_ID` and `CLOUDRON_LDAP_SERVER` to determine which JCasC (`casc_templates`) configuration to use (`oauth.yaml`, `ldap.yaml`, or `default.yaml`).
* Configures `JENKINS_URL` using `CLOUDRON_APP_ORIGIN`.
* `exec /usr/bin/supervisord --nodaemon -c /etc/supervisor/supervisord.conf` (Jenkins is managed by Supervisor, along with Nginx).
### `JenkinsBulldNotes.md`:
* Confirms the file structure and purpose of each file.
* Provides build and test instructions using `cloudron build` and `cloudron install`.
* Details authentication configuration via JCasC and Cloudron addons.
* Outlines testing steps (basic functionality, authentication, persistence).
* Mentions `jenkins_home` is persisted in `/app/data/jenkins_home`.
* Notes initial admin password is `adminpass` (this is likely set in `default.yaml` in `casc_templates`).
## Overall Assessment:
The existing Jenkins package is quite comprehensive and seems to follow Cloudron conventions well. It includes support for different authentication methods via JCasC, which is a good practice. The use of `supervisor` to manage Jenkins and Nginx is also standard for Cloudron packages.
## Key areas for further research/consideration:
* **Jenkins Version**: The `Dockerfile` installs Jenkins from `pkg.jenkins.io/debian-stable`. This will install the latest stable version available in that repository. The `CloudronManifest.json` has `version: "1.0.0"`, which is a placeholder and should be updated to reflect the actual Jenkins version installed.
* **Java Version**: The Dockerfile installs `openjdk-17-jdk`. I should confirm if this is the recommended Java version for the latest stable Jenkins.
* **Plugins**: The Dockerfile curls specific plugin versions. It might be better to use the Jenkins CLI to install plugins during the build process, which can handle dependencies and ensure compatibility.
* **`logo.png`**: The `CloudronManifest.json` references `icon: "file://logo.png"`, but `logo.png` is not present in the `CloudronPackages/Jenkins/` directory. I will need to add a suitable logo.
* **`JenkinsBulldNotes.md` Typo**: I will correct the typo in the filename to `JenkinsBuildNotes.md`.