From fa88e29e4ea8af424e253a51079ca4f4a62ffaa8 Mon Sep 17 00:00:00 2001 From: Kristo Copani Date: Sat, 30 Nov 2024 04:52:12 +0200 Subject: [PATCH] Initial --- ct/jenkins.sh | 53 ++++++++------------------------------ install/jenkins-install.sh | 34 +++++++----------------- json/jenkins.json | 34 ++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 66 deletions(-) create mode 100644 json/jenkins.json diff --git a/ct/jenkins.sh b/ct/jenkins.sh index 955a2845..1db23b2d 100644 --- a/ct/jenkins.sh +++ b/ct/jenkins.sh @@ -9,21 +9,20 @@ source <(curl -s https://raw.githubusercontent.com/quantumryuu/ProxmoxVE/build/m function header_info { clear cat <<"EOF" - ____ ________ ______ __ - / _/___ _________ / _/ __ \/ ____/___/ / - / // __ \/ ___/ __ \ / // /_/ / / / __ / - _/ // / / (__ ) /_/ // // _, _/ /___/ /_/ / -/___/_/ /_/____/ .___/___/_/ |_|\____/\__,_/ - /_/ - + __ __ _ + / /__ ____ / /__(_)___ _____ + __ / / _ \/ __ \/ //_/ / __ \/ ___/ +/ /_/ / __/ / / / ,< / / / / (__ ) +\____/\___/_/ /_/_/|_/_/_/ /_/____/ + EOF } header_info echo -e "Loading..." -APP="InspIRCd" -var_disk="2" -var_cpu="1" -var_ram="512" +APP="Jenkins" +var_disk="4" +var_cpu="2" +var_ram="1024" var_os="debian" var_version="12" variables @@ -57,36 +56,6 @@ function update_script() { header_info check_container_storage check_container_resources - - if [[ ! -f /lib/systemd/system/inspircd.service ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - RELEASE=$(curl -s https://api.github.com/repos/inspircd/inspircd/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') - if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then - msg_info "Stopping Service" - systemctl stop inspircd - msg_ok "Stopped Service" - - msg_info "Updating ${APP} to v${RELEASE}" - cd /opt - wget -q https://github.com/inspircd/inspircd/releases/download/v${RELEASE}/inspircd_${RELEASE}.deb12u1_amd64.deb - apt-get install "./inspircd_${RELEASE}.deb12u1_amd64.deb" -y &>/dev/nul - echo "${RELEASE}" >"/opt/${APP}_version.txt" - msg_ok "Updated ${APP} to v${RELEASE}" - - msg_info "Starting Service" - systemctl start inspircd - msg_ok "Started Service" - - msg_info "Cleaning up" - rm -rf /opt/inspircd_${RELEASE}.deb12u1_amd64.deb - msg_ok "Cleaned" - msg_ok "Updated Successfully" - else - msg_ok "No update required. ${APP} is already at v${RELEASE}." - fi - exit } start @@ -95,4 +64,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:3000${CL} \n" + ${BL}http://${IP}:8080${CL} \n" \ No newline at end of file diff --git a/install/jenkins-install.sh b/install/jenkins-install.sh index dede9390..9ae38699 100644 --- a/install/jenkins-install.sh +++ b/install/jenkins-install.sh @@ -17,38 +17,24 @@ msg_info "Installing Dependencies" $STD apt-get install -y \ curl \ mc \ - sudo + sudo \ + fontconfig \ + openjdk-17-jre msg_ok "Installed Dependencies" -msg_info "Installing InspIRCd" -RELEASE=$(curl -s https://api.github.com/repos/REPO/REPO/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -cd /opt -wget -q https://github.com/REPO/REPO/releases/download/v${RELEASE}/inspircd_${RELEASE}.deb12u1_amd64.deb -$STD apt-get install "./inspircd_${RELEASE}.deb12u1_amd64.deb" -y &>/dev/null -cat </etc/inspircd/inspircd.conf - - - - - - -EOF - -echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" +msg_info "Installing Jenkins" +wget -qO /usr/share/keyrings/jenkins-keyring.asc https://pkg.jenkins.io/debian/jenkins.io-2023.key +echo "deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc]" https://pkg.jenkins.io/debian binary/ >/etc/apt/sources.list.d/jenkins.list +$STD apt-get update +$STD apt-get install jenkins +echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" #Will not be updatable so probably I should remove this line? msg_ok "Installed InspIRCd" motd_ssh customize msg_info "Cleaning up" -rm -rf /opt/inspircd_${RELEASE}.deb12u1_amd64.deb $STD apt-get -y autoremove $STD apt-get -y autoclean -msg_ok "Cleaned" +msg_ok "Cleaned" \ No newline at end of file diff --git a/json/jenkins.json b/json/jenkins.json new file mode 100644 index 00000000..b4549e4e --- /dev/null +++ b/json/jenkins.json @@ -0,0 +1,34 @@ +{ + "name": "Jenkins", + "slug": "jenkins", + "categories": [ + 3 + ], + "date_created": "2024-11-30", + "type": "ct", + "updateable": false, + "privileged": false, + "interface_port": 8080, + "documentation": "https://www.jenkins.io/doc/", + "website": "https://www.jenkins.io/", + "logo": "https://www.jenkins.io/images/logos/jenkins/jenkins.svg", + "description": "Jenkins provides hundreds of plugins to support building, deploying and automating any project. ", + "install_methods": [ + { + "type": "default", + "script": "/ct/jenkins.sh", + "resources": { + "cpu": 2, + "ram": 1024, + "hdd": 4, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] + } \ No newline at end of file