Actions

Developer Area/Release Instructions/Template:The Release: Difference between revisions

From Mahara Wiki

< Developer Area‎ | Release Instructions
(Created template)
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<br />
{{Developer_Area/Release_Instructions/Template:Final_Checks}}
==📋 Final checks==
🟡 '''Security team''' (if you don't have +2 review status, you won't be able to see these patches)
 
🚨 Make sure that any security reviews/patches are merged before proceeding 🚨
 
*Merge the 'Private' security patches.
*Update the related Launchpad bugs to 'Public security'.
 
🟡 '''Release manager'''
 
*CVE #'s - Security issues have an assigned CVE number?
*Backporting - security fixes backported to all supported versions that need them?
*Bugs fixed - all bugs going into his release have their fixes ''merged'' for all supported versions?
*Comms - to Mahara partners + drafted the [[Developer Area/Release Instructions/Pre-release investigation and tasks#.F0.9F.93.B0 Comms|forum posts]]?
 
🟡 '''All devs'''
 
*Confirm your minor point release number, i.e. check the latest minor point release and add 1, e.g. 21.10.4 -> 21.10.5
*(Security team) Cherry-pick the security bugs with the status ' Confirmed' to your minor point branch. e.g. _DEV
*Create a [[Developer Area/Release Instructions/Pre-release investigation and tasks#Creating a release on Launchpad|release]] on the milestone on Launchpad to receive the release generated tarballs
*<code>git pull [https://git.mahara.org/scripts/mahara-scripts mahara-scripts]</code>
*Valid GPG - ensure you have a [https://wiki.mahara.org/wiki/Developer_Area/Release_Instructions/Creating_a_GPG_key valid GPG key] added to your Launchpad account: See https://launchpad.net/~username/+editpgpkeys
*<code>lptools</code> - ensure you have the lp-upload-project installed for uploading the release tars: <code> apt-get install lptools</code>
 
==📓 Changelog and release notes==
==📓 Changelog and release notes==
Use the templates below to structure your changelog and release notes.
Use the templates below to structure your changelog and release notes.
Line 32: Line 8:
Note: You can copy the list of bugs from the milestone page (https://launchpad.net/mahara/+milestone/XX.YY.Z) and re-format the list.
Note: You can copy the list of bugs from the milestone page (https://launchpad.net/mahara/+milestone/XX.YY.Z) and re-format the list.


[[File:Changelog template.png|720x720px|link=https://wiki.mahara.org/wiki/File:Changelog_template.png]]
[[File:Changelog template.png|720x720px|link=]]
====Release notes templates====
====Release notes templates====
See paste: [https://paste.wgtn.cat-it.co.nz/BjqzmddeQ8RLPOhq#HJYM6/6JF46ErvKAHVR0Lw$0 release notes template for major releases].
See paste: [https://paste.wgtn.cat-it.co.nz/BjqzmddeQ8RLPOhq#HJYM6/6JF46ErvKAHVR0Lw$0 release notes template for major releases].


[[File:Major release release notes 21.10.png|774x774px|link=https://wiki.mahara.org/wiki/File:Major_release_release_notes_21.10.png]]
[[File:Major release release notes 21.10.png|774x774px|link=]]


See paste: [https://paste.wgtn.cat-it.co.nz/1Nf6ZBfG7H5azgP6#D668H8zI4mhgupx98Z50iA$0 release notes template for minor point releases].
See paste: [https://paste.wgtn.cat-it.co.nz/1Nf6ZBfG7H5azgP6#D668H8zI4mhgupx98Z50iA$0 release notes template for minor point releases].


[[File:Minor point release release notes.png|484x484px|link=https://wiki.mahara.org/wiki/File:Minor_point_release_release_notes.png]]
[[File:Minor point release release notes.png|484x484px|link=]]
==⚡ The release script==
==⚡ The release script==


Line 131: Line 107:
#Check that the milestone is inactive now that it has a release.
#Check that the milestone is inactive now that it has a release.


[[File:Inactive milestone.png|alt=Screenshot showing the status for a milestone for it is 'inactive'.|link=https://wiki.mahara.org/wiki/File:Inactive_milestone.png]]
[[File:Inactive milestone.png|alt=Screenshot showing the status for a milestone for it is 'inactive'.|link=]]
==📗 Update wiki.mahara.org releases page==
==📗 Update wiki.mahara.org releases page==


Line 140: Line 116:
#Update the major version where 18 months has passed since its release to be 'unsupported'.
#Update the major version where 18 months has passed since its release to be 'unsupported'.


[[File:Updating current and upcoming releases.png|799x799px|link=https://wiki.mahara.org/wiki/File:Updating_current_and_upcoming_releases.png]]
[[File:Updating current and upcoming releases.png|799x799px|link=]]
==🌏 Update the language packs==
==🌏 Update the language packs==
[[Developer Area/Language Packs/Launchpad Branching|Create a new translation branch on launchpad.net and update the language scripts]] for the new release so that they appear on [http://langpacks.mahara.org/ http://langpacks.mahara.org].
[[Developer Area/Language Packs/Launchpad Branching|Create a new translation branch on launchpad.net and update the language scripts]] for the new release so that they appear on [http://langpacks.mahara.org/ http://langpacks.mahara.org].

Latest revision as of 15:59, 6 Mayıs 2022

Template:Developer Area/Release Instructions/Template:Final Checks

📓 Changelog and release notes

Use the templates below to structure your changelog and release notes.

(Release candidate) Skip the changelog and release notes

Do not populate the changelog. For the release notes put something like 'First release candidate for 1.4'.

Changelog template

Note: You can copy the list of bugs from the milestone page (https://launchpad.net/mahara/+milestone/XX.YY.Z) and re-format the list.

Changelog template.png

Release notes templates

See paste: release notes template for major releases.

Major release release notes 21.10.png

See paste: release notes template for minor point releases.

Minor point release release notes.png

⚡ The release script

  • A git repo will be created at /tmp/mahara.####/mahara/ cloned from https://git.mahara.org/mahara/mahara .
  • It builds Mahara archives based on the given _DEV branch and puts thme into your current folder. ( .zip, .tar.gz.asc, and .tar.bz2.asc)
  • You will get a release-X.Y.Z-cleanup.sh script to run later.
  • (Major releases .0) A new _STABLE branch is created off the _DEV branch.

Run the script

  1. Go into mahara-scripts and git pull the latest version.
  2. Run ./release.php X.Y.Z X.Y_DEV.
    • X.Y.Z is the new branch that will be made. This is also used in the archive file names.
    • X.Y_DEV is the existing branch we will create the new release from.
    • If the Z in X.Y.Z is "0" this will also create a new _STABLE branch.
  3. When prompted, insert your changelog.

Any data you enter for the prompts will go into the Launchpad release page. You can enter it here, or leave it empty here and enter it directly into the Launchpad webpage.

Check the terminal output in case there are GPG errors

E.g. Tag new version bump commit as 'X.YRC2_RELEASE' error: gpg failed to sign the data error: unable to sign the tag

So this is what I did to fix it, all commands are on command line:

  1. Update the gpg program with: git config --global gpg.program gpg2
  2. Test if it is working with: echo "test" | gpg2 --clearsign

It wasn't so I had to do: export GPG_TTY=$(tty)

then run again echo "test" | gpg2 --clearsign

Run release.php command again and check if it still gives the error.

Do not reboot your machine in the middle of doing a release or you will have to run through the release script again.

Note: For release candidates the commit message should be empty.

✅ Testing

With continuous Behat testing throughout development, we only need to some basic manual testing.

Extract the build and prep the database

Test that we can install Mahara with the pre-built packages.

  1. Extract the build (.tar or .zip) of your pre-built Mahara and make sure you can connect to it via web installer.
  2. Drop the database and create a new blank one.

Test case #1: Install the site with the web interface

  1. Go to your Mahara site and click 'Install'.
  2. Reset your database and repeat with MySQL/PostgreSQL.

Note: If we are doing a .0 release the install will complain about missing $versions->$currentmajorversion->latest release number but don't panic this is because the local copy of the release has the series version that doesn't exist upstream yet so we can ignore this warning·

Test case #2: Manual upgrade with the CLI and the web interface

Web interface

  1. Install a fresh site on version X.Y.Z(-1), i.e. (an earlier version).
  2. Create a portfolio, a blog with a blogpost, a group with a forum and forum post.
  3. Switch the code to your current release.
  4. Check that everything still works.
  5. Go to the site and click 'Upgrade' to get the site version to X.Y.Z .
  6. Repeat with PostgreSQL/MySQL.

CLI

  1. Install a fresh site on version X.Y.Z(-1), i.e. (an earlier version).
  2. Create a portfolio, a blog with a blogpost, a group with a forum and forum post.
  3. Switch the code to your current release.
  4. Upgrade to X.Y.Z with the CLI script htdocs/admin/cli/upgrade.php
  5. Check that everything still works.
  6. Repeat with PostgreSQL/MySQL.

🚀 Sign and upload the tarballs

Run ./release-X.Y.Z-cleanup.sh to upload the release and clean up any temporary files.

Note I: If running this file stops before completion for any reason you will need to edit it and comment out the bits that did finish so that you don't run those buts twice then try the script again. For example the script does the bit where it pushes the tag to the git remote and signs the zipped files but doesn't upload them - you would need to comment out the 'git push' lines and the 'gpg --armor' lines.

Note II: If the zipped files fail to upload to Launchpad via the script then you will need to manually upload the zipped files and their corresponding .asc files. To do this go to the milestone page in Launchpad and click the 'Add download file' link. Set the description to: release tarball and choose the matching zipped and .asc file to upload. You will need to do this for all the three types: .zip, .tar.bz2, .tar.gz

🐛 Update bugs statuses

Go to Launchpad and click on all of the bugs targeted for that milestone and move them from 'Fix committed' to 'Fix released'.

OR

In Firefox, go to the milestone page and open all the bugs in new tabs at once by pasting the following into the browser console.

var result = document.evaluate("//tbody//tr[contains(., 'Committed')]//a[contains(@href, 'bugs')]", document, null, XPathResult.ANY_TYPE,null ); var mycount=0; while(node = result.iterateNext()) { window.open(node.href, '_blank'); mycount++; if (mycount == 50) { break; } }

You will ned to allow popups for the site for this to work and it will open up to 50 bugs where the status is 'Committed'. If you have more than 50 to do - mark the first ones 'released' - refresh the list and do again.

Now is also a good time to create the next release number in the series. Any remaining bugs that were not fixed for this release may be transferred to the next one, if they're still on the roadmap but were simply delayed.

📔 Update your milestone

  1. Paste your release notes into the 'Release notes' area.
  2. Check that the milestone is inactive now that it has a release.

Screenshot showing the status for a milestone for it is 'inactive'.

📗 Update wiki.mahara.org releases page

  1. Go to the releases page's section 'Current and upcoming releases.'
  2. Update the text: "The latest stable version of Mahara is MAJOR_VERSION , released on DATE"
  3. Add a new row for the major release. (If you edit the area, there is a template available to copy)
  4. Add the release date and release notes for the minor point releases.
  5. Update the major version where 18 months has passed since its release to be 'unsupported'.

Updating current and upcoming releases.png

🌏 Update the language packs

Create a new translation branch on launchpad.net and update the language scripts for the new release so that they appear on http://langpacks.mahara.org.

Check that the language packs have updated:

  1. Install a site on the released version.
  2. Install the Japanese language pack (a fully translated lang pack is easier to check with)

Note: The number of language packs we support can be more than the supported Mahara versions as some people want to update old lang packs.

📣 Announcements

General announcements

  1. Publish your prepared security forum and news forum posts.
  2. (RC only) Publish news forum posts to get people to test the release.
  3. (Major release only) Publish news forum posts to announce the major release.

🔒 Update MITRE about release for CVE number publication

🟡 Kristina

If the release included security updates for which CVE numbers had been issued, request an update to the CVE number so it can be published.