Skip to content
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

feat(publish.sh): use dedicated source folder for httpd service including only .htaccess files #777

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

lemeurherve
Copy link
Member

@lemeurherve lemeurherve commented Apr 25, 2024

Ref. jenkins-infra/helpdesk#2649

Blocked by jenkins-infra/pipeline-library#854

This PR allows using a dedicated volume for httpd service:

  • separated www-content & www-redirections sources created with a filtered rsync copy from www2
  • including only the .htaccess files to avoid serving any file from it
  • on its own updates-jenkins-io-httpd file share, in the same storage account as updates-jenkins-io file share used for mirrorbits service
  • cherry-picked commit from chore(publish.sh) set up httpd fallback redirection to mirrors [new UC] #776 to allow patching only content in www-redirections
    • we might need to patch all .htaccess and not only the one at the root, TBD
  • mirrorbits and R2 buckets use www-content which doesn't contain any .htaccess file as they don't need/can't use/shouldn't have access to them

It will requires some job config changes: new file share service principal credentials on trusted, and adapt some variable names of the existing one.

Will prepare something to try out in our dedicated test folder https://trusted.ci.jenkins.io:1443/job/update_center_test_lemeurherve_helpdesk2649/, I'll let you know before doing anything on trusted.ci.jenkins.io

WIP in draft to share what I'm working on, not for immediate review.

@lemeurherve lemeurherve changed the title chore(publish.sh): use dedicated www4 for httpd service including only .htacess files chore(publish.sh): use dedicated source folder for httpd service including only .htaccess files Apr 26, 2024
@lemeurherve lemeurherve changed the title chore(publish.sh): use dedicated source folder for httpd service including only .htaccess files feat(publish.sh): use dedicated source folder for httpd service including only .htaccess files May 3, 2024
site/publish.sh Outdated Show resolved Hide resolved
@dduportal dduportal self-assigned this May 3, 2024
site/publish.sh Outdated Show resolved Hide resolved
Co-authored-by: Hervé Le Meur <91831478+lemeurherve@users.noreply.github.com>
dduportal pushed a commit to jenkins-infra/azure that referenced this pull request May 10, 2024
…r env files to access file shares (#690)

This PR adds an output with a command to generate a zip containing two
env files:
- .env-content for updates-jenkins-io File Share
- .env-redirections for updates-jenkins-io-httpd File Share

This zip file has to be uploaded as zip credentials on
trusted.ci.jenkins.io for the update-center2/site/publish.sh script to
work.

Ref:
- jenkins-infra/update-center2#777
- jenkins-infra/helpdesk#2649
lemeurherve added a commit that referenced this pull request May 10, 2024
site/publish.sh Outdated Show resolved Hide resolved
site/publish.sh Outdated Show resolved Hide resolved
Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
@dduportal
Copy link
Contributor

Update: I'm working on this PR, with local runs in the permanent agent

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
@dduportal dduportal force-pushed the helpdesk2649-dedicated-www4-for-httpd branch from 18c7a91 to c17011d Compare May 24, 2024 12:46
@dduportal
Copy link
Contributor

Update:

  • Fixed the shell script and tested it in debug mode locally in the agent.trusted.ci.jenkins.io VM
    • Applied recommandations
    • Fixed calls to the get-fileshare-url (needed variables to be exported)
    • Fixed rscyn www-* dirs. generations
  • Next steps before review:
    • Fix file credential (missing values)
    • Test with a freestyle job as an E2E test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants