<pre style='margin:0'>
Christopher Nielsen (mascguy) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/2b6ca057c59efdd220ddd5c4fe845b36905db271">https://github.com/macports/macports-ports/commit/2b6ca057c59efdd220ddd5c4fe845b36905db271</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 2b6ca057c59 jenkins: new port (#19812)
</span>2b6ca057c59 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 2b6ca057c59efdd220ddd5c4fe845b36905db271
</span>Author: slashapp <slashapp@gmail.com>
AuthorDate: Mon Aug 14 19:44:33 2023 +0800
<span style='display:block; white-space:pre;color:#404040;'> jenkins: new port (#19812)
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Co-authored-by: Christopher Nielsen <mascguy@github.com>
</span>---
devel/jenkins/Portfile | 136 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 136 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/jenkins/Portfile b/devel/jenkins/Portfile
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..4484aae41ba
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/jenkins/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,136 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortSystem 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup java 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+name jenkins
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+version 2.401.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+categories devel java
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+maintainers {gmail.com:slashapp @slashapp} openmaintainer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+homepage https://jenkins.io
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+description The leading open source automation server,\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Jenkins provides hundreds of plugins to support building,\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ deploying and automating any project.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+long_description ${description}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+platforms {darwin any}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+supported_archs noarch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+license MIT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+master_sites https://get.jenkins.io/war-stable/${version}/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set jenkins_war ${name}.war
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+distfiles ${jenkins_war}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums rmd160 0a762953129148086beced9450a364467a136b40 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 a798a0c5481a8ffb0320d9121f6cf49dc575c369028daae17a4dd398b69e000d \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 98398119
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+java.version 11+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+java.fallback openjdk11
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+use_configure no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+extract {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+build {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+test {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set jenkins_plist org.macports.${name}.plist
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set jenkins_exec_dir ${prefix}/libexec/${name}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set jenkins_home_dir ${prefix}/var/lib/${name}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set jenkins_log_dir ${prefix}/var/log/${name}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set jenkins_run_dir ${prefix}/var/run/${name}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set jenkins_exec ${jenkins_exec_dir}/${jenkins_war}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set jenkins_log ${jenkins_log_dir}/${name}.log
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set jenkins_pid ${jenkins_run_dir}/${name}.pid
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set jenkins_host 127.0.0.1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set jenkins_port 8080
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set jenkins_user jenkins
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set jenkins_group jenkins
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set jenkins_dir_list [list \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${jenkins_exec_dir} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${jenkins_home_dir} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${jenkins_log_dir} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${jenkins_run_dir} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set jenkins_exec_list [list \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${distpath}/${jenkins_war}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+foreach d ${jenkins_dir_list} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ destroot.keepdirs-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${destroot}${d}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+destroot {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach d ${jenkins_dir_list} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -d -m 0755 -g ${jenkins_group} -o ${jenkins_user} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${destroot}${d}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach f ${jenkins_exec_list} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -m 0644 -g ${jenkins_group} -o ${jenkins_user} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${f} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${destroot}${jenkins_exec_dir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+post-deactivate {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Cleanup all Jenkins-created files, which are significant
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach d ${jenkins_dir_list} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { [file exists ${d}] } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_info "post-deactivate: dir exists, deleting: ${d}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ delete -force ${d}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_info "post-deactivate: dir doesn't exist, skipping delete: ${d}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+add_users ${jenkins_user} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ group=${jenkins_group} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ home=${jenkins_home_dir} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ shell=/bin/sh \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ realname=Jenkins
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+startupitem.create yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Enable additional logging, for diagnostic purposes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+startupitem.logevents yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+startupitem.user ${jenkins_user}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+startupitem.group ${jenkins_group}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Note: To avoid breakage when a Java port is updated/removed, use 'java_home' to select at runtime
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+startupitem.init "export JAVA_HOME=\$(/usr/libexec/java_home --failfast --version ${java.version})"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+startupitem.start \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "\${JAVA_HOME}/bin/java \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -Duser.home=${jenkins_home_dir} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -jar ${jenkins_exec} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --httpListenAddress=${jenkins_host} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --httpPort=${jenkins_port}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+startupitem.stop \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "kill \$(cat ${jenkins_pid})"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+startupitem.logfile \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${jenkins_log}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+startupitem.pidfile \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ manual ${jenkins_pid}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+notes-append "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+To configure the Jenkins service, edit parameters as follows:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - Read document at https://jenkins.io/doc/book/installing/initial-settings/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - \$ sudo vi /Library/LaunchDaemons/${jenkins_plist}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Once the service is enabled, Jenkins will:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - Listen by default on: http://localhost:8080
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+The default Administrator password, created after port first loaded, will be available here:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - \$ sudo cat ${jenkins_home_dir}/.jenkins/secrets/initialAdminPassword
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+livecheck.url "https://www.jenkins.io/download/"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+livecheck.regex {war-stable/([0-9.]+)/jenkins}
</span></pre><pre style='margin:0'>
</pre>