代码拉取完成,页面将自动刷新
同步操作将从 csphere/jenkins 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#! /bin/bash
set -e
# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
# So the initial JENKINS-HOME is set with expected content.
# Don't override, as this is just a reference setup, and use from UI
# can then change this, upgrade plugins, etc.
copy_reference_file() {
f=${1%/}
echo "$f" >> $COPY_REFERENCE_FILE_LOG
rel=${f:23}
dir=$(dirname ${f})
echo " $f -> $rel" >> $COPY_REFERENCE_FILE_LOG
if [[ ! -e /var/jenkins_home/${rel} ]]
then
echo "copy $rel to JENKINS_HOME" >> $COPY_REFERENCE_FILE_LOG
mkdir -p /var/jenkins_home/${dir:23}
cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
# pin plugins on initial copy
[[ ${rel} == plugins/*.jpi ]] && touch /var/jenkins_home/${rel}.pinned
fi;
}
export -f copy_reference_file
echo "--- Copying files at $(date)" >> $COPY_REFERENCE_FILE_LOG
find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
fi
# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
exec "$@"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。