Skip to content

Commit b4a4118

Browse files
dduportalKevin-CB
andauthored
chore(publish) copy released plugins to get.jenkins.io directly (jenkins-infra#884)
* chore(publish) copy released plugins to get.jenkins.io directly Signed-off-by: Damien Duportal <damien.duportal@gmail.com> * fixup: new mirrorbits private hostname Ref. https://github.com/jenkins-infra/azure/pull/1173/files --------- Signed-off-by: Damien Duportal <damien.duportal@gmail.com> Co-authored-by: Kevin-CB <kguerroudj@cloudbees.com>
1 parent bb269cd commit b4a4118

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

site/publish.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Each task named XX expects a file named 'env-XX' in this directory to be sourced by the script to retrieve settings for the task.
88
RUN_STAGES="${RUN_STAGES:-generate-site|sync-plugins|sync-uc}"
99
SYNC_UC_TASKS="${SYNC_UC_TASKS:-rsync-archives.jenkins.io|localrsync-updates.jenkins.io-content|localrsync-updates.jenkins.io-redirections|s3sync-westeurope|s3sync-eastamerica}"
10-
MIRRORBITS_HOST="${MIRRORBITS_HOST:-updates.jenkins.io.trusted.ci.jenkins.io}"
10+
MIRRORBITS_HOST="${MIRRORBITS_HOST:-updates.jenkins.io.privatelink.azurecr.io}"
1111

1212
# Split strings to arrays for feature flags setup
1313
run_stages=()
@@ -36,9 +36,16 @@ then
3636
## $download_dir folder processing
3737
# push plugins to mirrors.jenkins-ci.org
3838
chmod -R a+r "${download_dir}"
39+
# TODO: remove in favor of the local NFS mount
3940
rsync -rlptDvz --chown=mirrorbrain:www-data --size-only "${download_dir}"/plugins/ "${RSYNC_USER}@${UPDATES_SITE}":/srv/releases/jenkins/plugins
41+
# Also copy on the new local NFS (no compress, no need to chown) -
42+
# TODO: use the credentials to retrieve the mount point
43+
rsync --recursive --links --size-only \
44+
--times --perms --verbose --devices --specials \
45+
--size-only "${download_dir}"/plugins/ /data-storage-jenkins-io/get.jenkins.io/mirrorbits/plugins/
4046

4147
# Invoke a minimal mirrorsync to mirrorbits which will use the 'recent-releases.json' file as input
48+
# TODO: remove in favor of the local NFS mount
4249
ssh "${RSYNC_USER}@${UPDATES_SITE}" "cat > /tmp/update-center2-rerecent-releases.json" < "${www2_dir}"/experimental/recent-releases.json
4350
ssh "${RSYNC_USER}@${UPDATES_SITE}" "/srv/releases/sync-recent-releases.sh /tmp/update-center2-rerecent-releases.json"
4451
fi
@@ -74,7 +81,7 @@ then
7481
# Required variables that should now be set from the .env file
7582
: "${RSYNC_HOST?}" "${RSYNC_USER?}" "${RSYNC_GROUP?}" "${RSYNC_REMOTE_DIR?}" "${RSYNC_IDENTITY_NAME?}"
7683

77-
time rsync --chown="${RSYNC_USER}":"${RSYNC_GROUP}" --recursive --links --perms --times -D \
84+
time rsync --chown="${RSYNC_USER}":"${RSYNC_GROUP}" --recursive --links --perms --times --devices --specials \
7885
--rsh="ssh -i ${UPDATE_CENTER_FILESHARES_ENV_FILES}/${RSYNC_IDENTITY_NAME}" `# rsync identity file is stored with .env files` \
7986
--checksum --verbose --compress \
8087
--exclude=/updates `# populated by https://github.com/jenkins-infra/crawler` \
@@ -87,7 +94,7 @@ then
8794
# Required variables that should now be set from the .env file
8895
: "${RSYNC_REMOTE_DIR?}"
8996

90-
time rsync --recursive --links --times -D \
97+
time rsync --recursive --links --times --devices --specials \
9198
--checksum --verbose \
9299
--exclude=/updates `# populated by https://github.com/jenkins-infra/crawler` \
93100
--delete `# delete old sites` \

0 commit comments

Comments
 (0)