ReleaseEngineering/Archive/Promote Unagi to beta: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
{{Release Engineering How To|Promote_Unagi_to_beta}}
{{Release Engineering How To|Promote_Unagi_to_beta}}


= Convert date to build ID =
= Provided information =  
Since we build nightly and beta as separate builds, their build IDs may be different. You need to find build ID for the beta build. For example, if release-drivers want to promote 12-12-12 build:
* go to http://update.boot2gecko.org/betatest/
* search for update_20121212*.xml
* open that file and search for buildID (20121212102240 in my case)


Note that we do two 'nightlies' a day, so the initial request has to be precise enough to distinguish which to use.
QA will ask us to promote a build with information like this:
<pre>Release Engineering Reference - Please PROMOTE THE FOLLOWING BUILD:
Build updated from:
·        gecko: e86df153bcab6e1b645e187c646b0c64e97bd68d
·        gaia: 21cedfd1787f4aff26721fc0f160e771db5cd67d
·        build ID: 20130211070202
</pre>
They will probably not tell you what branch that came from, so you need to search for ''releng-beta.py'' in [http://hg.mozilla.org/build/buildbot-configs/file/production/mozilla/| b2g_config.py].
 
Now you know the $buildID and the $branch for the following steps, substitute as necessary.
 
= Publish update to beta channel =
To make updates work properly you need to copy sone files from the nightly directory to the beta directory.


= Publish updates =
To make updates work properly you need to copy 2 files from the betatest direcotry to the beta directory:
* MAR file (you also need to rename it)
* application.ini file
Use a buildbot master as a jump host:
Use a buildbot master as a jump host:
  ssh -i .ssh/b2gbld_dsa ec2-user@update.boot2gecko.org
  ssh -i .ssh/b2gbld_dsa ec2-user@update.boot2gecko.org
  bid=20121212102240
  buildID=<your $buildID here>
  cd /data/update-channels/beta
  cd /data/update-channels/beta
  cp -avi ../betatest/b2g_update_$bid.mar ./b2g_beta_update_$bid.mar
  cp -avi ../nightly/b2g_update_${buildID}.mar ./b2g_beta_update_${buildID}.mar
  cp -avi ../betatest/b2g_update_source_$bid.xml ./b2g_beta_update_$bid.xml
  cp -avi ../nightly/b2g_update_source_${buildID}.xml ./b2g_beta_update_${buildID}.xml
  cp -avi ../betatest/application_$bid.ini .
  cp -avi ../nightly/application_${buildID}.ini .
* Double check if http://update.boot2gecko.org/beta/update.xml returns proper build ID
* Verify that http://update.boot2gecko.org/beta/update.xml returns proper $buildID


= Upload image file for flashing =
= Copy image file for flashing =
The [https://etherpad.mozilla.org/b2g-testdrivers-flashing flashing doc] points to https://releases.mozilla.com/b2g-testdrivers/unagi_beta_latest.zip, so we need to update that too.
The [https://etherpad.mozilla.org/b2g-testdrivers-flashing flashing doc] points to https://releases.mozilla.com/b2g-testdrivers/unagi_beta_latest.zip, so we need to update that too.


First you need to identify the unagi.zip file corresponding to the update pushed.  
Use a buildbot master as a jump host:
* If you are given an URL to publish like <tt>https://pvtbuilds.mozilla.org/pub/mozilla.org/b2g/nightly/mozilla-b2g18-unagi/2013/01/2013-01-04-07-02-03/</tt> then you should be able to substitute <tt>mozilla-b2g18-unagi_betatest</tt> for <tt>mozilla-b2g18-unagi</tt>. If you get a 404 from the ftp server it means the buildIDs are different, skip to the next point
ssh -i .ssh/b2gbld_dsa b2gbld@stage.mozilla.org
* Otherwise use the buildID you figured out above to locate the beta channel build at <tt>https://pvtbuilds.mozilla.org/pub/mozilla.org/b2g/nightly/mozilla-b2g18-unagi_betatest/YYYY/MM/YYYY-MM-DD-HH-mm-ss/</tt>. Use the buildID you had earlier to substitute the YYYY, MM etc (eg 20130104070203 becomes 2013/01/2013-01-04-07-02-03).
buildID=<your $buildID here>
 
branch=<your $branch here>
'''The key thing is to make sure that the sources.xml files matche for the nightly build which QA signed off on, and the build you are publishing'''. A diff of the two files is good way to do that.
datestr=`echo $buildID | sed -r 's,([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2}),\1/\2/\1-\2-\3-\4-\5-\6,'`


From that directory download the unagi.zip as unagi_beta_$bid.zip
  if [ ! -e /mnt/pvt_builds/pub/mozilla.org/b2g/nightly/${branch}-unagi/${datestr}/unagi.zip ]; then
 
   echo ERROR: /mnt/pvt_builds/pub/mozilla.org/b2g/nightly/${branch}-unagi/${datestr}/unagi.zip not found, check variables
Copy it to stage.m.o using one of the masters:
  else
  set +o history
  cp -avi /mnt/pvt_builds/pub/mozilla.org/b2g/nightly/${branch}-unagi/${datestr}/unagi.zip \
#bid=BUILDID
          /mnt/netapp/stage/releases.mozilla.com/b2g-testdrivers/unagi_beta_${buildID}.zip && \
#DATESTR=YYYY/MM/YYYY-MM-DD-HH-mm-ss
   ln -sfv unagi_beta_${buildID}.zip /mnt/netapp/stage/releases.mozilla.com/b2g-testdrivers/unagi_beta_latest.zip
#USERNAME=foo@mozilla.com
  fi
#PASSWD="PASSWD"
wget --http-user="$USERNAME" --http-password="$PASSWD" \
  -O "unagi_beta_$bid.zip" \
   https://pvtbuilds.mozilla.org/pub/mozilla.org/b2g/nightly/mozilla-b2g18-unagi_betatest/$DATESTR/unagi.zip
  chmod 644 unagi_beta_$bid.zip
rsync -avP -e "ssh -i $HOME/.ssh/b2gbld_dsa" \
  unagi_beta_$bid.zip b2gbld@stage.mozilla.org:/mnt/netapp/stage/releases.mozilla.com/b2g-testdrivers/
ssh -i $HOME/.ssh/b2gbld_dsa b2gbld@stage.mozilla.org \
   ln -sf unagi_beta_$bid.zip /mnt/netapp/stage/releases.mozilla.com/b2g-testdrivers/unagi_beta_latest.zip
  # do the double check? requires manual password entry:
curl -I --user $USERNAME https://releases.mozilla.com/b2g-testdrivers/unagi_beta_latest.zip
curl -I --user $USERNAME https://releases.mozilla.com/b2g-testdrivers/unagi_beta_$bid.zip


* Double check if you can download the files using
* Double check if you can download the files using
  * https://releases.mozilla.com/b2g-testdrivers/unagi_beta_latest.zip
  * https://releases.mozilla.com/b2g-testdrivers/unagi_beta_latest.zip
  * https://releases.mozilla.com/b2g-testdrivers/unagi_beta_$bid.zip
  * https://releases.mozilla.com/b2g-testdrivers/unagi_beta_${buildID}.zip


= Create RIL repack =
= Create RIL repack =
 
The $datestr from above is used for UNAGI_DATE in these [https://intranet.mozilla.org/RelEngWiki/index.php/How_To/Create_B2G_RIL_Repack instructions]
[https://intranet.mozilla.org/RelEngWiki/index.php/How_To/Create_B2G_RIL_Repack instructions]


= Notify partners =
= Notify partners =
[https://intranet.mozilla.org/RelEngWiki/index.php/How_To/Notify_Partners_of_good_b2g_build details here]
[https://intranet.mozilla.org/RelEngWiki/index.php/How_To/Notify_Partners_of_good_b2g_build details here]

Revision as of 10:12, 13 February 2013


Provided information

QA will ask us to promote a build with information like this:

Release Engineering Reference - Please PROMOTE THE FOLLOWING BUILD:
Build updated from:
·         gecko: e86df153bcab6e1b645e187c646b0c64e97bd68d
·         gaia: 21cedfd1787f4aff26721fc0f160e771db5cd67d
·         build ID: 20130211070202

They will probably not tell you what branch that came from, so you need to search for releng-beta.py in b2g_config.py.

Now you know the $buildID and the $branch for the following steps, substitute as necessary.

Publish update to beta channel

To make updates work properly you need to copy sone files from the nightly directory to the beta directory.

Use a buildbot master as a jump host:

ssh -i .ssh/b2gbld_dsa ec2-user@update.boot2gecko.org
buildID=<your $buildID here>
cd /data/update-channels/beta
cp -avi ../nightly/b2g_update_${buildID}.mar ./b2g_beta_update_${buildID}.mar
cp -avi ../nightly/b2g_update_source_${buildID}.xml ./b2g_beta_update_${buildID}.xml
cp -avi ../nightly/application_${buildID}.ini .

Copy image file for flashing

The flashing doc points to https://releases.mozilla.com/b2g-testdrivers/unagi_beta_latest.zip, so we need to update that too.

Use a buildbot master as a jump host:

ssh -i .ssh/b2gbld_dsa b2gbld@stage.mozilla.org
buildID=<your $buildID here>
branch=<your $branch here>
datestr=`echo $buildID | sed -r 's,([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2}),\1/\2/\1-\2-\3-\4-\5-\6,'`
if [ ! -e /mnt/pvt_builds/pub/mozilla.org/b2g/nightly/${branch}-unagi/${datestr}/unagi.zip ]; then
  echo ERROR: /mnt/pvt_builds/pub/mozilla.org/b2g/nightly/${branch}-unagi/${datestr}/unagi.zip not found, check variables
else
  cp -avi /mnt/pvt_builds/pub/mozilla.org/b2g/nightly/${branch}-unagi/${datestr}/unagi.zip \
          /mnt/netapp/stage/releases.mozilla.com/b2g-testdrivers/unagi_beta_${buildID}.zip && \
  ln -sfv unagi_beta_${buildID}.zip /mnt/netapp/stage/releases.mozilla.com/b2g-testdrivers/unagi_beta_latest.zip
fi
  • Double check if you can download the files using
* https://releases.mozilla.com/b2g-testdrivers/unagi_beta_latest.zip
* https://releases.mozilla.com/b2g-testdrivers/unagi_beta_${buildID}.zip

Create RIL repack

The $datestr from above is used for UNAGI_DATE in these instructions

Notify partners

details here