Skip to content

Release Process

Vadim edited this page Jul 20, 2024 · 5 revisions

Prerequisites

Before creating a release, ensure that all prerequisites are satisfied.
  • Checkout all repositories
  • Before doing any batch changes using scripts, the branch protection needs to be adjusted.
  • All projects are ready to be released
  • If meta model has been changed, increment version in namespace URI and update version in all projects
  • All bundle and feature versions have been updated to the new version
  • The version information in the PCM UI bundle has been updated
  • Version in splash screen
  • Version in about text of PalladioProduct extension
  • All manual test cases for the projects to be released have been successfully executed
  • No open issues for version to be released
  • All nightly builds of bundles to be released work
  • All examples have been migrated to work with nightly branch

Release Process

To create a release, preform the following steps.

Create and release a new target platform for new Eclipse version
  1. Add a new target platform definition to the Maven-Build-TargetPlatforms-Repository.
  • The list of features of the most recent eclipse version can be found here.
  • Add the new target platform as target file for the target-platform-validation-plugin in the pom of the repository in order for it to be verified automatically.
  1. Release a new version
  • Change version in the pom: Remove SNAPSHOT (0.3.3-SNAPSHOT --> 0.3.3)
  • Merge to master so that the release is staged in Sonatype
  • Release in Sonatype (Staging Repositories -> Close -> Release)
  1. Set new development version
  • Increment version number and append -SNAPSHOT (0.3.3 --> 0.3.4-SNAPSHOT)
  • Merge to master so that the release is staged in Sonatype
  • Release in Sonatype (Staging Repositories -> Close -> Release)
Release new versions of parent POMs

Read here how to release new versions of parent POMs.

Make all Palladio project use the new parent version and update the individual target platform definitions
  1. Update references to eclipse repository locations
  2. If possible: Change versions to 0.0.0 so the newest version in the repository is used. Exceptions apply to the following repositories:
    • Hamcrest
    • ...
  3. Update tycho-pomless version, if newer compatible version is available (Link)
    • .mvn/extensions.xml tycho-pomless
    • If necessary, use versions released before the new eclipse release to avoid errors
Increase the version of bundles/features to new release version

Set all versions of released artifacts to new release version, by using the forked version of tycho versions plugin. Do not update the bundle/feature versions for the following repositories, as there exist dependencies to third-party tools, licenses, etc. that could result in errors:

  • Palladio-Build-BuckminsterToTychoMigrationPlugin
  • Palladio-Build-DependencyTool
  • Palladio-Build-MavenJavaDocPlugin
  • Palladio-Build-MavenParent
  • Palladio-Build-MavenTP
  • Palladio-Build-MavenTPPlugin
  • Palladio-Build-MavenTychoVersionsPlugin
  • Palladio-Supporting-Branding
  • Palladio-ThirdParty-PerformanceModeleXtractor
  • Palladio-ThirdParty-Wrapper
  • Palladio-ThirdParty-YakinduStateCharts
Release new version artefacts
  • Ensure that the release update site aggregation file is up to date by regenerating it with the ant script located besides the aggregation file
  • Perform a release for every project to be released
    • Adhere to the order used in the nightly build job -> TODO: Add proper release order/dependency. The order is slightly different, as some projects from the nightly should not be released.
    • Start a parameterised build on the build server with the release flag and the version set
    • Tag the commit used for the release on Github with the version number
Create marketplace entry

Remember to adhere to the template and add all PCM strategists to the owners list.

Update documentation
Update Palladio Website

Updating Palladio website content shall be done via typo3 webinterface

  • Open https://www.palladio-simulator.com/typo3/ and login with your ATIS credentials
  • Edit the following content sections
    • Update header image with latest version number
    • Update version and links in section Tools - Download
    • Create a new release news entry visible in section Menu -> AboutPalladio -> Drop-down menu 'News'
      • Tab 'General'
        • Select in the left-hand menu WEB -> 'News Administration'
        • Select in the SDQ-Typo3 Tree view -> News storage => the News administration details view is displayed
        • Click the button 'Create new news record' on top of page of the displayed details view => a form to create the 'News' entry is displayed
        • Fill out the form with all required information
      • Tab 'Media'
        • Prerequisite: the icon is uploaded to left-hand menu File-list -> News ->
        • Upload news icon in section Media file
        • Set Image Metadata: Check 'Show in view, specify Title, Alternative Text and Description
      • Tab 'Categories'
        • Check 'Palladio News'
        • Click button 'Save' to publish new news entry
Update versions in JIRA

Each project in JIRA has a set of versions, which can be selected in issues. After a release, we have to release the version corresponding to the released version and add a new version for the next release. Releasing the existing version adds the version to the list of released version, which eases the selection of appropriate versions in the issue. A new version is, obviously, necessary to keep track of issues, which shall be solved with the next release.

The versions have to be changed for each project, which has been released, individually. Because this affects many projects, it is beneficial to use the script below. The script uses a heuristic to find relevant projects: Every project, which has a defined version (e.g. PCM 5.0) will receive a new version and the defined version will be released. The following steps allow releasing a defined version in batch mode.

  • Requires bash, curl and jq to be installed
  • Create a personal access token at Atlassian
  • Adjust the variables in the script below
  • Run the script
#!/bin/bash

# Constants
USER=first.second@kit.edu
TOKEN=INVALID
DOMAIN=palladio-simulator.atlassian.net

# Input parameters
OLDVERSION="PCM 5.0"
OLDDESCRIPTION="2020-12 release"
NEWVERSION="PCM 5.1"
NEWDESCRIPTION="Upcoming release"

# no changes required after this line

APIURL="https://$DOMAIN/rest/api/3"
TODAY=$(date +"%Y-%m-%d")

# find all projects
PROJECT_QUERY_JSON=$(curl -s --request GET \
  --url "$APIURL/project" \
  --user "$USER:$TOKEN" \
  --header 'Accept: application/json')
echo "Found projects"
echo $PROJECT_QUERY_JSON | jq -r '.[] | "\t" + .id + " " + .name'
echo

PROJECT_IDS=$(echo $PROJECT_QUERY_JSON | jq -r '[.[].id]|join(" ")')
for PROJECT_ID in $PROJECT_IDS; do
    echo "Processing $PROJECT_ID"

    # test if old version is available
    OLDVERSIONID=$(curl -s --request GET \
      --url "$APIURL/project/$PROJECT_ID/versions" \
      --user "$USER:$TOKEN" \
      --header 'Accept: application/json' \
      | jq -r ".[] | select(.name == \"$OLDVERSION\").id")
    if [ -z "$OLDVERSIONID" ]; then
        echo -e "\tNo version $OLDVERSION found. Skipping project."
        continue
    fi

    # release old version
    curl -s --request PUT \
    --url "$APIURL/version/$OLDVERSIONID" \
    --user "$USER:$TOKEN" \
    --header 'Accept: application/json' \
    --header 'Content-Type: application/json' \
    --data "{\"releaseDate\": \"$TODAY\", \"released\": true, \"description\": \"$OLDDESCRIPTION\"}"

    # create new version
    curl --request POST \
    --url "$APIURL/version" \
    --user "$USER:$TOKEN" \
    --header 'Accept: application/json' \
    --header 'Content-Type: application/json' \
    --data "{\"name\": \"$NEWVERSION\", \"description\": \"$NEWDESCRIPTION\", \"projectId\": $PROJECT_ID}"

done
Publish release