From 0dfc72ee6e53832fab5686c96e2c75198469f4e0 Mon Sep 17 00:00:00 2001 From: rti Date: Wed, 9 Oct 2024 13:40:08 +0200 Subject: [PATCH 1/6] chore: prepare first nx releases (#782) * chore(nx): do not generate github releases for now * chore: Release wdqs-frontend 1.0.1 * chore(nx): configure types for changelog * chore: Release wikibase 3.0.1 * chore: Release wdqs 1.0.1 * chore: Release wdqs-proxy 1.0.1 * chore: Release elasticsearch 1.0.1 * chore: Release quickstatements 1.0.1 * chore: Release deploy 3.1.0 * fix: lint * fix: do not print authors in changelogs * feat: add all conventional commit types mentioned in spec * fix: configure github actions git to match wikibase-suite-bot * chore: adjust versions and changelogs * fix: date * fix: version --------- Co-authored-by: Loren Johnson --- .github/workflows/create_release.yml | 4 ++-- build/elasticsearch/CHANGELOG.md | 5 +++++ build/elasticsearch/package.json | 2 +- build/quickstatements/CHANGELOG.md | 5 +++++ build/quickstatements/package.json | 2 +- build/wdqs-frontend/CHANGELOG.md | 9 +++++++++ build/wdqs-frontend/package.json | 2 +- build/wdqs-proxy/CHANGELOG.md | 5 +++++ build/wdqs-proxy/package.json | 2 +- build/wdqs/CHANGELOG.md | 7 +++++++ build/wdqs/package.json | 2 +- build/wikibase/CHANGELOG.md | 11 +++++++++++ build/wikibase/package.json | 2 +- deploy/CHANGELOG.md | 17 +++++++++++++++++ deploy/package.json | 2 +- nx.json | 25 ++++++++++++++++++++++++- 16 files changed, 92 insertions(+), 10 deletions(-) create mode 100644 build/elasticsearch/CHANGELOG.md create mode 100644 build/quickstatements/CHANGELOG.md create mode 100644 build/wdqs-frontend/CHANGELOG.md create mode 100644 build/wdqs-proxy/CHANGELOG.md create mode 100644 build/wdqs/CHANGELOG.md create mode 100644 build/wikibase/CHANGELOG.md create mode 100644 deploy/CHANGELOG.md diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 8c05ddb6a..1655b7c19 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -53,8 +53,8 @@ jobs: set -e # abort on error set -x # show commands - git config --global user.name 'wikibase suite github actions bot' - git config --global user.email 'wikibase-suite-github-actions-bot@users.noreply.github.com' + git config --global user.name 'wikibase-suite-bot' + git config --global user.email 'wikibase-suite-engineers@wikimedia.de' if [ "${{ inputs.dry_run }}" == "true" ]; then DRY_RUN_FLAG="--dry-run" diff --git a/build/elasticsearch/CHANGELOG.md b/build/elasticsearch/CHANGELOG.md new file mode 100644 index 000000000..0e189b6b1 --- /dev/null +++ b/build/elasticsearch/CHANGELOG.md @@ -0,0 +1,5 @@ +## **elasticsearch@1.0.1** (2024-10-09) + +### 📖 Documentation + +- Switch from `.example.com` to `.example` diff --git a/build/elasticsearch/package.json b/build/elasticsearch/package.json index 0fbd46466..01bc9cabf 100644 --- a/build/elasticsearch/package.json +++ b/build/elasticsearch/package.json @@ -1,6 +1,6 @@ { "name": "elasticsearch", - "version": "1.0.0", + "version": "1.0.1", "nx": { "targets": { "lint": {}, diff --git a/build/quickstatements/CHANGELOG.md b/build/quickstatements/CHANGELOG.md new file mode 100644 index 000000000..285580764 --- /dev/null +++ b/build/quickstatements/CHANGELOG.md @@ -0,0 +1,5 @@ +## **quickstatements@1.0.1** (2024-10-09) + +### 📖 Documentation + +- Switch from `.example.com` to `.example` diff --git a/build/quickstatements/package.json b/build/quickstatements/package.json index 6d6dd3c38..3157cd5e6 100644 --- a/build/quickstatements/package.json +++ b/build/quickstatements/package.json @@ -1,6 +1,6 @@ { "name": "quickstatements", - "version": "1.0.0", + "version": "1.0.1", "nx": { "targets": { "lint": {}, diff --git a/build/wdqs-frontend/CHANGELOG.md b/build/wdqs-frontend/CHANGELOG.md new file mode 100644 index 000000000..1be944c36 --- /dev/null +++ b/build/wdqs-frontend/CHANGELOG.md @@ -0,0 +1,9 @@ +## **wdqs-frontend@1.0.1** (2024-10-09) + +### 📖 Documentation + +- Switch from `.example.com` to `.example` + +### 🩹 Fixes + +- Link to Query Builder now points to the source code repository ([#664](https://github.com/wmde/wikibase-release-pipeline/issues/664)) diff --git a/build/wdqs-frontend/package.json b/build/wdqs-frontend/package.json index 7c856a4cd..5eacbb164 100644 --- a/build/wdqs-frontend/package.json +++ b/build/wdqs-frontend/package.json @@ -1,6 +1,6 @@ { "name": "wdqs-frontend", - "version": "1.0.0", + "version": "1.0.1", "nx": { "targets": { "lint": {}, diff --git a/build/wdqs-proxy/CHANGELOG.md b/build/wdqs-proxy/CHANGELOG.md new file mode 100644 index 000000000..b2feb6e26 --- /dev/null +++ b/build/wdqs-proxy/CHANGELOG.md @@ -0,0 +1,5 @@ +## **wdqs-proxy@1.0.1** (2024-10-09) + +### 📖 Documentation + +- Switch from `.example.com` to `.example` diff --git a/build/wdqs-proxy/package.json b/build/wdqs-proxy/package.json index ffce24b6d..9e8bf48f4 100644 --- a/build/wdqs-proxy/package.json +++ b/build/wdqs-proxy/package.json @@ -1,6 +1,6 @@ { "name": "wdqs-proxy", - "version": "1.0.0", + "version": "1.0.1", "nx": { "targets": { "lint": {}, diff --git a/build/wdqs/CHANGELOG.md b/build/wdqs/CHANGELOG.md new file mode 100644 index 000000000..1dac2c8a8 --- /dev/null +++ b/build/wdqs/CHANGELOG.md @@ -0,0 +1,7 @@ +## **wdqs@1.0.1** (2024-10-09) + +### 📖 Documentation + +- Switch from `.example.com` to `.example` +- Add comments in "Updater keeps restarting" FAQ entry +- Correct typos diff --git a/build/wdqs/package.json b/build/wdqs/package.json index bd178fad7..da8047b21 100644 --- a/build/wdqs/package.json +++ b/build/wdqs/package.json @@ -1,6 +1,6 @@ { "name": "wdqs", - "version": "1.0.0", + "version": "1.0.1", "nx": { "targets": { "lint": {}, diff --git a/build/wikibase/CHANGELOG.md b/build/wikibase/CHANGELOG.md new file mode 100644 index 000000000..bc7146b9a --- /dev/null +++ b/build/wikibase/CHANGELOG.md @@ -0,0 +1,11 @@ +## **wikibase@3.0.1** (2024-10-09) + +### 📖 Documentation + +- Link to MediaWiki bundled extensions +- Switch from `.example.com` to `.example` + +### 🏡 Chore + +- Removes re-installation of extensions already packaged with MediaWiki (ConfirmEdit, Nuke, Scribunto, SyntaxHighlight_Geshi, VisualEditor) +- Updates Wikibase EDTF extension diff --git a/build/wikibase/package.json b/build/wikibase/package.json index 496db5f27..fe09e8095 100644 --- a/build/wikibase/package.json +++ b/build/wikibase/package.json @@ -1,6 +1,6 @@ { "name": "wikibase", - "version": "3.0.0", + "version": "3.0.1", "nx": { "targets": { "lint": {}, diff --git a/deploy/CHANGELOG.md b/deploy/CHANGELOG.md new file mode 100644 index 000000000..6ab1ae47e --- /dev/null +++ b/deploy/CHANGELOG.md @@ -0,0 +1,17 @@ +## **deploy@3.0.1** (2024-10-09) + +### 🩹 Fixes + +- `*_PUBLIC_HOST` URLs default to `.example` TLD from `example.com` ([T372455](https://phabricator.wikimedia.org/T372455)) +- Removes published ports for wikibase, quickstatements, and wdqs-frontend services ([T372455](https://phabricator.wikimedia.org/T372455)) +- Wikibase waits for elasticsearch service to be up ([T371162](https://phabricator.wikimedia.org/T371162)) + +### 📖 Documentation + +- Do not use `--wait` in `docker compose up` in order to see logs +- Link to WDQS updater crash FAQ entry +- Corrected typos + +### 🏡 Chore + +- Adds default Traefik LetsEncrypt configuration for services diff --git a/deploy/package.json b/deploy/package.json index eabeef09f..5ee26ddc7 100644 --- a/deploy/package.json +++ b/deploy/package.json @@ -1,6 +1,6 @@ { "name": "deploy", - "version": "3.0.0", + "version": "3.0.1", "nx": { "targets": { "lint": {}, diff --git a/nx.json b/nx.json index 82bd4a6e1..d86ca0ec0 100644 --- a/nx.json +++ b/nx.json @@ -8,6 +8,20 @@ } }, "release": { + "conventionalCommits": { + "types": { + "build": true, + "chore": true, + "ci": true, + "docs": true, + "feat": true, + "fix": true, + "perf": true, + "refactor": true, + "style": true, + "test": true + } + }, "groups": { "images": { "projects": [ "build/*" ] @@ -21,7 +35,16 @@ "conventionalCommits": true }, "changelog": { - "projectChangelogs": true + "projectChangelogs": { + "renderOptions": { + "authors": false + } + }, + "workspaceChangelog": { + "renderOptions": { + "authors": false + } + } } }, "targetDefaults": { From f3e867f83505ee4fc37c2004a31a0c3ab05ade24 Mon Sep 17 00:00:00 2001 From: Robert Timm Date: Fri, 11 Oct 2024 06:30:34 +0000 Subject: [PATCH 2/6] build: fix dockerhub image registry prefix --- build/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/build.sh b/build/build.sh index 5df0686a7..3ca79ac4f 100755 --- a/build/build.sh +++ b/build/build.sh @@ -76,7 +76,7 @@ IMAGE_NAME=$(jq -r '.name' package.json) # publish to Dockerhub if [ "$PUBLISH" == true ]; then - IMAGE_REGISTRY=dockerhub.io + # IMAGE_REGISTRY implies dockerhub if empty IMAGE_NAMESPACE=wikibase # build/test in CI elif [ "$GITHUB_ACTIONS" == true ]; then From 47283c1ef64163a78599db30b81a5c27436fd501 Mon Sep 17 00:00:00 2001 From: Robert Timm Date: Fri, 11 Oct 2024 06:36:54 +0000 Subject: [PATCH 3/6] ci(build_publish_image): fix image name processing --- .github/workflows/build_publish_image_release.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_publish_image_release.yml b/.github/workflows/build_publish_image_release.yml index de638a4b9..e9231b706 100644 --- a/.github/workflows/build_publish_image_release.yml +++ b/.github/workflows/build_publish_image_release.yml @@ -19,17 +19,18 @@ jobs: runs-on: ubuntu-latest steps: - - name: Extract imageName and confirm it is a valid semantic version tag + - name: Extract image name and confirm it is a valid semantic version tag id: extract_tag run: | + set -x + # Extract the tag name TAG_NAME=$(echo ${{ github.ref }} | sed 's/refs\/tags\///') # Use regex to extract the imageName before the @ and confirm the version is valid semver version tag if [[ "$TAG_NAME" =~ ^([^@]+)@([0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?)$ ]]; then - # Sets and passes the imageName output from this step, which is used in the subsequent step - # e.g. `steps.extract_tag.outputs.imageName` gets set to "wikibase" matched from "wikibase@1.0.1") - echo "{imageName}=${BASH_REMATCH[1]}" >> $GITHUB_OUTPUT + # Store image name in environment for later steps + echo "IMAGE_NAME=${BASH_REMATCH[1]}" >> $GITHUB_ENV else echo "Tag does not match the pattern {imageName}@{semantic-version}" exit 1 @@ -55,4 +56,4 @@ jobs: git config --global user.name 'wikibase suite github actions bot' git config --global user.email 'wikibase-suite-github-actions-bot@users.noreply.github.com' - ./nx release publish -p ${{ steps.extract_tag.outputs.imageName }} + ./nx release publish -p $IMAGE_NAME From 5549bbb3835a6e08bbd39ad36c0f1ff5b6904035 Mon Sep 17 00:00:00 2001 From: Robert Timm Date: Fri, 11 Oct 2024 06:49:56 +0000 Subject: [PATCH 4/6] ci(build_publish_image): remove git config, unused --- .github/workflows/build_publish_image_release.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/build_publish_image_release.yml b/.github/workflows/build_publish_image_release.yml index e9231b706..2351b1ea2 100644 --- a/.github/workflows/build_publish_image_release.yml +++ b/.github/workflows/build_publish_image_release.yml @@ -22,7 +22,7 @@ jobs: - name: Extract image name and confirm it is a valid semantic version tag id: extract_tag run: | - set -x + set -x # show commands # Extract the tag name TAG_NAME=$(echo ${{ github.ref }} | sed 's/refs\/tags\///') @@ -53,7 +53,4 @@ jobs: set -e # abort on error set -x # show commands - git config --global user.name 'wikibase suite github actions bot' - git config --global user.email 'wikibase-suite-github-actions-bot@users.noreply.github.com' - ./nx release publish -p $IMAGE_NAME From 4bf134453d6094364c2332fcfe4c3fb0b8ca4318 Mon Sep 17 00:00:00 2001 From: Loren Johnson Date: Fri, 11 Oct 2024 15:25:35 +0200 Subject: [PATCH 5/6] chore(pipeline): Remove extraneous DockerHub auth in Release workflow (#791) --- .github/workflows/create_release.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 1655b7c19..f3f32eeef 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -42,12 +42,6 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} - - uses: docker/login-action@v3 - with: - # implicitly docker hub - username: wmdetravisbot - password: ${{ secrets.WBS_PUBLISH_TOKEN }} - - name: Create release run: | set -e # abort on error From 3524ddc3996795258e8ec2ca4114c9613dfdb9a9 Mon Sep 17 00:00:00 2001 From: Robert Timm Date: Mon, 21 Oct 2024 10:07:11 +0000 Subject: [PATCH 6/6] ci: workaround - trigger on multiple tags --- .github/workflows/build_publish_image_release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build_publish_image_release.yml b/.github/workflows/build_publish_image_release.yml index 2351b1ea2..9f676775d 100644 --- a/.github/workflows/build_publish_image_release.yml +++ b/.github/workflows/build_publish_image_release.yml @@ -9,6 +9,8 @@ on: - 'wdqs-frontend@*' - 'wdqs-proxy@*' - 'wikibase@*' + branches-ignore: + - '**' # weird workaround to trigger on multiple tags for a single commit permissions: contents: write