-
Notifications
You must be signed in to change notification settings - Fork 27
feat(packaging) stop generating RPM repository on remote VM + introduces staging #777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bc74931 to
c861b2e
Compare
…archives.jenkins.io` (#7273) Related to jenkins-infra/helpdesk#4774 (comment) This PR requires jenkins-infra/charts-secrets@773e785 to be applied by a kubernetes-management job in infra.ci.jenkins.io to ensure the secret is written in the release.ci.jenkins.io controller container. The PR jenkins-infra/release#777 introduces a direct copy (with `rsync`) of binaries from release.ci.jenkins.io packaging Linux agent to archives.jenkins.io. As such, a SSH credential is needed, which is introduced by the current PR as a top-level credential in the JCasC setup for release.ci.jenkins.io. See https://github.com/jenkins-infra/release/pull/777/files#diff-29d0485a091dfb585170e6716985cca942ceae5e403f0e84af4fb1b28642e9feR509
| # TODO: Remove the copy to archive in remote script and generate symlinks here | ||
| ssh "${PKGSERVER_SSH_OPTS[@]}" "${PKGSERVER}" /srv/releases/sync.sh | ||
| . `# source` \ | ||
| [email protected]:/srv/releases `# destination # TODO: get hostname and path from env` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
737f9fa to
77e2829
Compare
…ervers used by the packaging pipeline (#7274) Needed by jenkins-infra/release#777 as removing the SSH options used to avoid SSH host keys in jenkinsci/packaging#540 are breaking the packaging pipeline. Requires jenkins-infra/charts-secrets@d7ef7e7 Applied and verified manually (see https://github.com/jenkins-infra/release/pull/777/files#diff-ad30548cc54e46cac25ca9233185676eb831aaef7403bc828ac706ae80237671R59)
| SSH_HOSTKEY_ARCHIVES_JENKINS_IO = credentials('ssh-hostkey-archives.jenkins.io') | ||
| SSH_HOSTKEY_PKG_ORIGIN_JENKINS_IO = credentials('ssh-hostkey-pkg.origin.jenkins.io') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
69499fb to
d8dcf8e
Compare
7a96b8a to
8ae177b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look very good to me.
I think that we will always have a .ssh directory on the agent with correct permissions, so the mkdir -p is probably not needed. However, if we're retaining it, then I think we might want to set the permissions on the directory when we create it. It is not required, just an optional item for consideration. I incorrectly thought that ssh checked the permissions of the .ssh directory, but when I modified the directory permissions on Ubuntu Linux 22.04, there was no warning or error message.
The other comment is purely stylistic and can be ignored without any issue.
…ocal agent Signed-off-by: Damien Duportal <[email protected]>
8440b57 to
595df25
Compare
595df25 to
e1e9867
Compare
dduportal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- jenkinsci/packaging#540 has been merged
- Feedback applied (+ a nitpick on my side)
- The "test" commit has been deleted
We can proceed to merge, before the incoming 2.539 release!
feat(packaging) stop generating RPM repository on remote VM + introduces staging (cherry picked from commit 5f20e41)
feat(packaging) stop generating RPM repository on remote VM + introduces staging (cherry picked from commit 5f20e41)
Related to jenkins-infra/helpdesk#4774 (comment)
Must be merged at the same time as jenkinsci/packaging#540
createrepo(Ubuntu 18.04) bycreaterepo_c(Ubuntu 22.04 / 24.04)generateSite()functions take care of all site generation in all packagesuploadPackage()function in jenkinsci/packaging generates thelatestlinksskipAlreadyPublishedfunctions in all publication scripts in jenkinsci/packaging to ensure we always override the generated packages. It's disabled for Debian and RPM nowadays.rsynccalls have the correct flags in all publication scripts in jenkinsci/packaging: preserving timestamps, archive mode (to ensure links and special unix file are preserved along with permissions, and include recursive folders)Important notes on the "promotePackage" stage (which is the former
syncMirrorbut renamed to materialize its full intent):archives.jenkins.iofirst to ensure the fallback is set. It is a fix to avoid published packages in get.jenkins.io which answers HTTP/404 until archives.jenkins.io or any mirror got the files (30 min max)pkg.origin.jenkins.io does not utilize the "staging" directory on the remote VM (/var/www/pkg.jenkins.io.staging`) anymore. Instead it deploys generated files to the remote production webserver. 2 consequences:sync.shscript anymore on the remote machine. But we'll have to keep it on the VM until we have both LTS and weekly packages with these changes.pkg.origin.jenkins.iowill be moved to Azure soonpkg.origin.jenkins.ioalso introduces the copy to the file system for the futurepkg.origin.jenkinsin Azure so we can start comparingTesting performed in https://release.ci.jenkins.io/job/core/job/package/job/helpdesk-4774 up to the
rsynccommands indry-run+ pointing to the custom branch in jenkinsci/packaging.You can test the generated packages on https://staging.pkg.origin.jenkins.io (which serves binaries from https://staging.get.jenkins.io) with VPN enabled.
=> Will have to remove d8dcf8e before merging.