Scope
This document describes how to set up a patch file to patch the JOC Cockpit.
This article replaces Patching - Create Patches for JOC Cockpit.
Naming convention
File Extension of the Patch File
- The patch file has to be a zip file.
- Only files with the extension zip will be picked up by the patch-executor.
- Applications to create a zip file are available for most Operating Systems
- Files with file extension tgz and tar.gz are available only for linux Operating Systems and are rarely available on Microsoft Operating Systems
Naming of the Patch File
- We have only ONE patch file for all patches of per release. The naming structure of the patch file has to look like this:
patch-<date-of-release>-<releaseVersion>.zip
where the date has the formatYYYYMMdd
- Example: patch-20200402-1.13.3.zip
Structure of the Patch File
- The patch file has to have the same structure as the joc.war file for all front end stuff i.e. all files outside the WEB-INF folder.
- The WEB-INF folder contains only one jar and the version.json
- ./lib/_patch-<releaseVersion>.jar (the leading underline is important to provide that this jar is loaded at first.
- ./classes/version.json
_path-<releaseVersion>.jar
- This jar contains only class files which were changed because of an issue.
- All changed class files based on the Git-Tag of the release which is patched.
- For this a new branch with the name "patch-<releaseVersion>" is created starting on the Git-Tag of the release if it doesn't already exist.
- Select Git-Tag (e.g. v1.13.3) in Git Extensions
- Click on "Create New Branch" of the context menu
- Type the name in the following dialog and push the button.
- ...
version.json
- This file is read during the login and the "version" is logged in the JOC log.
This file is edited to know which exact version (including the patches) the user has.
- The "version" contains the Jira-Tickets
- The "date" contains the creation date of the patch file.
- Example
{ "version":"1.13.3 Patch JOC-877, JOC-880, JOC-892", "gitHash":"188987909bb722a8b1a0bd021f51e12d0c8ae494", "date":"2020-02-21" }