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

Stop generating latest/ links directory in dynamic tiers #747

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions site/LAYOUT.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,3 @@ This list is current as of June 2020, but may not be complete.
* `/update-center.actual.json` in [Settings.java](https://github.com/jenkinsci/plugin-installation-manager-tool/blob/master/plugin-management-library/src/main/java/io/jenkins/tools/pluginmanager/config/Settings.java#L13)
* `/experimental/update-center.actual.json` in [Settings.java](https://github.com/jenkinsci/plugin-installation-manager-tool/blob/master/plugin-management-library/src/main/java/io/jenkins/tools/pluginmanager/config/Settings.java#L15)
* `/current/plugin-versions.json` in [Settings.java](https://github.com/jenkinsci/plugin-installation-manager-tool/blob/master/plugin-management-library/src/main/java/io/jenkins/tools/pluginmanager/config/Settings.java#L18)

### jenkinsci/docker

* LTS tiered update sites per https://github.com/jenkinsci/docker/issues/954
* Tiered `latest/` directories per https://github.com/jenkinsci/docker/issues/953
11 changes: 0 additions & 11 deletions site/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ The service this website provides is as follows:

## Multiple update sites for different version ranges

### Dynamic update site tiers

Update center metadata can contain only one version per a plugin.
Because newer versions of the same plugin may depend on newer version of Jenkins, if we just serve one update center for every Jenkins out there, older versions of Jenkins will see plugin versions that do not work with them, making it impossible to install the said plugin.
This is unfortunate because some younger versions of the plugin might have worked with that Jenkins core.
Expand All @@ -30,15 +28,6 @@ mod_rewrite rules in an `.htaccess` file are then used to redirect requests from
It will serve the newest release of each plugin that is compatible with the specified Jenkins version.
See [generate-htaccess.sh](generate-htaccess.sh) for how these rules are generated.

### Static update site tiers

Before June 2020, update site tiers were fixed:
Update sites were generated for the five most recent LTS baselines, and each update site would offer plugins compatible with the latest release of each LTS line.

These update site tiers are *deprecated*: They are currently still being generated, but `.htaccess` no longer reference them.
See e.g. https://github.com/jenkinsci/docker/issues/954


## Generating update sites

[generate.sh](generate.sh) is run by [a CI job](https://trusted.ci.jenkins.io/job/update_center/)
Expand Down
7 changes: 2 additions & 5 deletions site/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ execute --dynamic-tier-list-file tmp/tiers.json
readarray -t WEEKLY_RELEASES < <( jq --raw-output '.weeklyCores[]' tmp/tiers.json ) || { echo "Failed to determine weekly tier list" >&2 ; exit 1 ; }
readarray -t STABLE_RELEASES < <( jq --raw-output '.stableCores[]' tmp/tiers.json ) || { echo "Failed to determine stable tier list" >&2 ; exit 1 ; }

# Workaround for https://github.com/jenkinsci/docker/issues/954 -- still generate fixed tier update sites
readarray -t RELEASES < <( curl --silent --fail 'https://repo.jenkins-ci.org/api/search/versions?g=org.jenkins-ci.main&a=jenkins-core&repos=releases&v=?.*.1' | jq --raw-output '.results[].version' | head -n 5 | $SORT --version-sort ) || { echo "Failed to retrieve list of recent LTS releases" >&2 ; exit 1 ; }

# prepare the www workspace for execution
rm -rf "$WWW_ROOT_DIR"
mkdir -p "$WWW_ROOT_DIR"
Expand Down Expand Up @@ -112,12 +109,12 @@ function sanity-check {
# This supports updating Jenkins (core) once a year while getting offered compatible plugin updates.
for version in "${WEEKLY_RELEASES[@]}" ; do
# For mainline, advertising the latest core
generate --limit-plugin-core-dependency "$version" --write-latest-core --latest-links-directory "$WWW_ROOT_DIR/dynamic-$version/latest" --www-dir "$WWW_ROOT_DIR/dynamic-$version"
generate --limit-plugin-core-dependency "$version" --write-latest-core --www-dir "$WWW_ROOT_DIR/dynamic-$version"
done

for version in "${STABLE_RELEASES[@]}" ; do
# For LTS, advertising the latest LTS core
generate --limit-plugin-core-dependency "$version" --write-latest-core --latest-links-directory "$WWW_ROOT_DIR/dynamic-stable-$version/latest" --www-dir "$WWW_ROOT_DIR/dynamic-stable-$version" --only-stable-core
generate --limit-plugin-core-dependency "$version" --write-latest-core --www-dir "$WWW_ROOT_DIR/dynamic-stable-$version" --only-stable-core
done

# Experimental update center without version caps, including experimental releases.
Expand Down