This pullrequest introduces Updatecli to automate Wiremock version update.
Updatecli will monitor Wiremock releases and if something change, it will create a temporary branch, and a open a pull request targeting main with suggested change. If anything goes wrong, we can still refuse the PR or disable Updatecli later on
To work we need two things:
An Updatecli GitHub workflow
Updatecli is command line tool, the workflow can be triggered either manually with the workflow_dispatch event or via the cronjob every hour. Each time Updatecli is executed, it loads manifests that describe update pipeline.
An Updatecli manifest
The manifest describes
Where the source information comes from, in this case the Wiremock latest GitHub release
Validate conditions, in this case that a docker image exist for the retrieved version
Update if necessary the targets. In this case we have a file named "_config.yml" with two information to update
The configuration for the pullrequest (actions)
The git repository to interact with (scms)
I executed the Updatecli command locally to see what would be changed
Console Output
```
=> updatecli diff --config updatecli/updatecli.d/
+++++++++++
+ PREPARE +
+++++++++++
Loading Pipeline "updatecli/updatecli.d/wiremock.yaml"
SCM repository retrieved: 1
++++++++++++++++++
+ AUTO DISCOVERY +
++++++++++++++++++
++++++++++++
+ PIPELINE +
++++++++++++
#########################################################
# DOCS: BUMP WIREMOCK VERSION USED IN THE DOCUMENTATION #
#########################################################
SOURCES
=======
wiremock
--------
Searching for version matching pattern "*"
✔ GitHub release version "3.2.0" found matching pattern "*" of kind "semver"
CHANGELOG:
----------
Release published on the 2023-09-27 14:49:16 +0000 UTC at the url https://github.com/wiremock/wiremock/releases/tag/3.2.0
## 💥 Breaking changes
* Enable local response templating by default in standalone (#2386) @tomakehurst
* Add startup option to enable/disable extension scanning and set to disabled by default when running from Java (#2385) @tomakehurst
## 🚀 New features and improvements
* Exposing MappingsLoader as an extension point (#2334) @bharatnpti
* Include more info when webhook refusal logged (#2389) @Mahoney
* HTTP Server Factory as an extension point (#2391) @tomakehurst
* Print loaded extensions at startup (#2381) @tomakehurst
## 🐛 Bug fixes
* Fix json string schema rejecting numbers (#2390) @Mahoney
* Fix FileSource backed blobstore keys bug (#2392) @tomakehurst
* Fixed #2388 - empty getPath() returned from new FileStore implementation passed to transformers (#2396) @tomakehurst
## 📦 Dependency updates
* Bump io.netty:netty-all from 4.1.97.Final to 4.1.98.Final (#2394) @dependabot
CONDITIONS:
===========
docker
------
✔ docker image wiremock/wiremock:3.2.0 found
TARGETS
========
wiremock_version
----------------
**Dry Run enabled**
✔ - key "$.wiremock_version" already set to "3.2.0", from file "_config.yml"
wiremock_baseline
-----------------
**Dry Run enabled**
✔ - key "$.wiremock_baseline" already set to "3.x", from file "_config.yml"
ACTIONS
========
=============================
REPORTS:
✔ docs: bump wiremock version used in the documentation:
Source:
✔ [wiremock] Get latest Wiremock version
Condition:
✔ [docker] Check that a docker image is available for the latest version
Target:
✔ [wiremock_baseline] docs: update Wiremock version to 3.2.0
✔ [wiremock_version] docs: update Wiremock version to 3.2.0
Run Summary
===========
Pipeline(s) run:
* Changed: 0
* Failed: 0
* Skipped: 0
* Succeeded: 1
* Total: 1
```
References
TODO
Submitter checklist
[x] The PR request is well described and justified, including the body and the references
[x] The PR title represents the desired changelog entry
[x] If the change against WireMock 2 functionality (incompatible with WireMock 3),
it is submitted against the 2.x branch
[x] The repository's code style is followed (see the contributing guide)
fix #171
This pullrequest introduces Updatecli to automate Wiremock version update. Updatecli will monitor Wiremock releases and if something change, it will create a temporary branch, and a open a pull request targeting
main
with suggested change. If anything goes wrong, we can still refuse the PR or disable Updatecli later onTo work we need two things:
An Updatecli GitHub workflow Updatecli is command line tool, the workflow can be triggered either manually with the workflow_dispatch event or via the cronjob every hour. Each time Updatecli is executed, it loads manifests that describe update pipeline.
An Updatecli manifest
The manifest describes
source
information comes from, in this case the Wiremock latest GitHub releaseconditions
, in this case that a docker image exist for the retrieved versiontargets
. In this case we have a file named "_config.yml" with two information to updateI executed the Updatecli command locally to see what would be changed
Console Output
``` => updatecli diff --config updatecli/updatecli.d/ +++++++++++ + PREPARE + +++++++++++ Loading Pipeline "updatecli/updatecli.d/wiremock.yaml" SCM repository retrieved: 1 ++++++++++++++++++ + AUTO DISCOVERY + ++++++++++++++++++ ++++++++++++ + PIPELINE + ++++++++++++ ######################################################### # DOCS: BUMP WIREMOCK VERSION USED IN THE DOCUMENTATION # ######################################################### SOURCES ======= wiremock -------- Searching for version matching pattern "*" ✔ GitHub release version "3.2.0" found matching pattern "*" of kind "semver" CHANGELOG: ---------- Release published on the 2023-09-27 14:49:16 +0000 UTC at the url https://github.com/wiremock/wiremock/releases/tag/3.2.0 ## 💥 Breaking changes * Enable local response templating by default in standalone (#2386) @tomakehurst * Add startup option to enable/disable extension scanning and set to disabled by default when running from Java (#2385) @tomakehurst ## 🚀 New features and improvements * Exposing MappingsLoader as an extension point (#2334) @bharatnpti * Include more info when webhook refusal logged (#2389) @Mahoney * HTTP Server Factory as an extension point (#2391) @tomakehurst * Print loaded extensions at startup (#2381) @tomakehurst ## 🐛 Bug fixes * Fix json string schema rejecting numbers (#2390) @Mahoney * Fix FileSource backed blobstore keys bug (#2392) @tomakehurst * Fixed #2388 - empty getPath() returned from new FileStore implementation passed to transformers (#2396) @tomakehurst ## 📦 Dependency updates * Bump io.netty:netty-all from 4.1.97.Final to 4.1.98.Final (#2394) @dependabot CONDITIONS: =========== docker ------ ✔ docker image wiremock/wiremock:3.2.0 found TARGETS ======== wiremock_version ---------------- **Dry Run enabled** ✔ - key "$.wiremock_version" already set to "3.2.0", from file "_config.yml" wiremock_baseline ----------------- **Dry Run enabled** ✔ - key "$.wiremock_baseline" already set to "3.x", from file "_config.yml" ACTIONS ======== ============================= REPORTS: ✔ docs: bump wiremock version used in the documentation: Source: ✔ [wiremock] Get latest Wiremock version Condition: ✔ [docker] Check that a docker image is available for the latest version Target: ✔ [wiremock_baseline] docs: update Wiremock version to 3.2.0 ✔ [wiremock_version] docs: update Wiremock version to 3.2.0 Run Summary =========== Pipeline(s) run: * Changed: 0 * Failed: 0 * Skipped: 0 * Succeeded: 1 * Total: 1 ```References
Submitter checklist
Details: Contributor Guide