PCM Development/Palladio Release Process

Aus SDQ-Wiki
Warning
This page was moved to the GitHub wiki

Prerequisites

Einleitung mit best practices/prerequisites -> auschecken aller projekte etc.

  • 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 -> Link
    • 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

  1. Create and release a new target platform for new Eclipse version
  2. Release new versions of parent POMs
  3. Make all Palladio project use the new parent version and update the individual target platform definitions
  4. Increase the version of bundles/features to new release version
  5. Release new version artifacts
  6. Create Marketplace Entry
  7. Update Documentation
  8. Update Palladio Website
  9. Update Versions in JIRA
  10. Publish Release

Update Feature and Bundle Versions

  • Set all versions of released artifacts to new release version, by using the forked version of tycho versions plugin (how to use is explained on GitHub).
    • 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

Artifact Release

  • 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 parameterized 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

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'
        • Pre-requiste: the icon is uploaded to left-hand menu Filelist -> News -> <new release folder>
        • 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