# Creating own UpdateCenter

**URL:** <https://community.jenkins.io/t/creating-own-updatecenter/20228>\
**Category:** Infrastructure\
**Created:** [September 26, 2024, 2:06pm UTC](https://community.jenkins.io/t/creating-own-updatecenter/20228 "2024-09-26T14:06:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![luczajk](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/luczajk/32/10844_2.png) [@luczajk](https://community.jenkins.io/u/luczajk)\
**Post date:** [September 26, 2024, 2:06pm UTC](https://community.jenkins.io/t/creating-own-updatecenter/20228/1 "2024-09-26T14:06:04Z")

</div>

Hi, trying to create my own updatecenter using [GitHub - jenkins-infra/update-center2: Jenkins Update Center backend](https://github.com/jenkins-infra/update-center2). Looking at the readme I understood that I should start the work by running the generate script ( matching certificates, variables as well as artifactory repo). I attached plugins in the repository using mvn deploy which looks like the right configuration. However, when running the script, I encounter the error ./site/generate-htaccess.sh […].  
Expected at least one argument.  
The tmp/tiers.json file does not contain any values. On what basis is this file generated? Why does it remain empty?  
Is there documentation that shows actually how to create such a center? I am keen on providing plugins from my own artifactory for security reasons

I try to run generate.sh with command:

```auto
SECRET=/X/Certs ARTIFACTORY_URL="" ARTIFACTORY_API_URL="XX" ARTIFACTORY_REPOSITORY="XX" ARTIFACTORY_USERNAME="XX" ARTIFACTORY_PASSWORD="XXX" ./site/generate.sh ./wwwroot ./download --root-certificate ./certs/cert.pem --certificate ./certs/update-center.cert --key ./certs/update-center.key

```

```auto
INFO i.j.u.j.TieredUpdateSitesGenerator#update: Did not find declared core dependency version among all core releases: 2.263.4. It is used by org.jenkins-ci.plugins:docker-build-publish:1.4.0
Usage: ./site/generate-htaccess.sh [<release> ...]
Expected at least one argument.

```

---

<div class="post-metadata">

**Author:** ![poddingue](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/poddingue/32/985_2.png) [@poddingue](https://community.jenkins.io/u/poddingue)\
**Post date:** [September 30, 2024, 9:23am UTC](https://community.jenkins.io/t/creating-own-updatecenter/20228/2 "2024-09-30T09:23:32Z")

</div>

Hello and welcome to this community, @luczajk. 👋

1. Make sure that the `generate.sh` script is correctly calling `generate-htaccess.sh` with the necessary arguments.
2. The `tiers.json` file is typically generated based on the plugins and their metadata. Ensure that your Artifactory repository is correctly set up and accessible.
3. Make sure to provide the necessary arguments to the `generate-htaccess.sh` script.

Here is an example command to run the `generate.sh` script with the necessary environment variables and arguments:

```auto
SECRET=/X/Certs \
ARTIFACTORY_URL="https://your-artifactory-url" \
ARTIFACTORY_API_URL="https://your-artifactory-api-url" \
ARTIFACTORY_REPOSITORY="your-repository" \
ARTIFACTORY_USERNAME="your-username" \
ARTIFACTORY_PASSWORD="your-password" \
./site/generate.sh ./wwwroot ./download --root-certificate ./certs/cert.pem --certificate ./certs/update-center.cert --key ./certs/update-center.key

```

---

<div class="post-metadata">

**Author:** ![luczajk](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/luczajk/32/10844_2.png) [@luczajk](https://community.jenkins.io/u/luczajk)\
**Post date:** [October 11, 2024, 9:16am UTC](https://community.jenkins.io/t/creating-own-updatecenter/20228/3 "2024-10-11T09:16:16Z")

</div>

Thank you for your response, I have used this template to start script generate.sh

```auto
SECRET=X
ARTIFACTORY_URL=X
ARTIFACTORY_API_URL=X
  ARTIFACTORY_REPOSITORY=X
ARTIFACTORY_USERNAME=X ARTIFACTORY_PASSWORD=X ./site/generate.sh ./wwwroot ./download --root-certificate ./certs/cert.pem --certificate /path/tocert --key /path/to/key

```

Also I have deployed plugins on artifactory with mvn, it looks like good ledder in artifactory with all metadata. As far I can understand using generate.sh is the first step of running own UpdateCenter.

```auto
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"

# Generate htaccess file
"$( dirname "$0" )"/generate-htaccess.sh "${WEEKLY_RELEASES[@]}" "${STABLE_RELEASES[@]}" > "$WWW_ROOT_DIR/.htaccess"

```

Looking at the above code, the situation is quite strange and I can’t debug it enough why generate-httaccess.sh gets an empty argument list when a few lines earlier weekly\_releases is taken from tiers.json which indicates that this file is empty. Please let me know how artifactory should be configured so that it works properly and the tiers.json file is created.

---

<div class="post-metadata">

**Author:** ![michael-schnell](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/michael-schnell/32/22017_2.png) [@michael-schnell](https://community.jenkins.io/u/michael-schnell)\
**Post date:** [July 2, 2026, 4:44pm UTC](https://community.jenkins.io/t/creating-own-updatecenter/20228/4 "2026-07-02T16:44:37Z")

</div>

I created a Maven plugin that simplifies the process of creating an update site further:

> **[GitHub - fuinorg/jenkins-update-center-generator-maven-plugin: Jenkins Update Center Generator Maven Plugin](https://github.com/fuinorg/jenkins-update-center-generator-maven-plugin)**
>
> Jenkins Update Center Generator Maven Plugin

It is easy to use and can be integrated in you Maven builds.
