## SBMT Release Guide ### Recommended Environment Variable Configuration * `setenv JAVA_HOME /project/nearsdc/software/java/x86_64/latest` * `setenv ANT_HOME /usr/share/ant` * `setenv CLASSPATH com.sun.tools.javac.Main` (Needed by ant) * `setenv PATH /project/nearsdc/software/usr/bin:$PATH` * `setenv PATH ${JAVA_HOME}/bin:${PATH}` * `setenv PATH /project/nearsdc/software/apache-ant/latest/bin:${PATH}` * `setenv PATH /software/git-2.6.0/bin:${PATH}` * `setenv PATH /project/nearsdc/software/cmake/latest/bin:${PATH}` * `setenv PATH /software/pandoc-1.17.0.3/bin:${PATH}` * `setenv PATH /software/ruby-2.3.0/bin:${PATH}` * `setenv PYTHONPATH /project/nearsdc/software/spice/pyspice/install` * `setenv LD_LIBRARY_PATH /project/nearsdc/software/usr/lib` ### Release Instructions The `/project/sbmtpipeline/saavtk` and `/project/sbmtpipeline/sbmt` directories are clones of the `saavtk` and `sbmt` git repositories respectively. They are intended to be used for making releases, doing some level of system testing, and for executing cron jobs only. 1. Login as the `sbmt` user to the Linux machine `kenny` on the DMZ (kenny.jhuapl.edu). 2. Setup the `/project/sbmtpipeline/saavtk` directory. 1. Verify that the `/project/sbmtpipeline/saavtk` directory exists. If it does not exist then create a clone from the git repository by going to the `/project/sbmtpipeline` directory and calling the following command: * `git clone http://hardin:8080/scm/git/vtk/saavtk` 2. Review the status of the files in this local git repository – use `git status` to check for any files that need to be checked in before making the release. If you check something in, make sure you also do a `git push`. Also, make sure you are executing the correct version of `git` as defined by the PATH setting described in this document. * `git status` * `git commit` (if necessary) * `git push` (if necessary) 3. Make sure you are in the `master` branch by using `git branch` to check the name of the current branch that you are on. If you are not on the correct branch then you can use that command to switch to the correct one. * `git branch` * `git branch master` (if necessary) 4. Update the local git repository with all of the changes that have been committed and pushed since the last release. * `git pull` 3. Setup the `/project/sbmtpipeline/sbmt` directory. 1. Verify that the `/project/sbmtpipeline/sbmt` directory exists. If it does not exist then create a clone from the git repository by going to the `/project/sbmtpipeline` directory and calling the following command: * `git clone -b sbmt2 http://hardin:8080/scm/git/sbmt` 2. Review the status of the files in this local git repository – use `git status` to check for any files that need to be checked in before making the release. If you check something in, make sure you also do a `git push`. Also, make sure you are executing the correct version of `git` as defined by the PATH setting described in this document. * `git status` * `git commit` (if necessary) * `git push` (if necessary) 3. Make sure you are in the `sbmt2` branch by using `git branch` to check the name of the current branch that you are on. If you are not on the correct branch then you can use that command to switch to the correct one. * `git branch` * `git branch sbmt2` (if necessary) 4. Update the local git repository with all of the changes that have been committed and pushed since the last release. * `git pull` 4. Navigate to the `/project/sbmtpipeline/sbmt` directory and review the `misc/server/sbmt/internal/content/recentchanges.md` file to make sure all changes that went into this release are described near the top of the file. If you make changes to the file in this step make sure to also do a `git commit` and a `git push`. 5. From the `/project/sbmtpipeline/sbmt` directory, remove all old files that were generated from building the last release by doing a `make clean`. * `make clean` 6. From the `/project/sbmtpipeline/sbmt` directory, build all java applications and package then into releasable zip files by typing `make release` and supplying the release name. Before doing so, make sure the user’s environment is configured properly, as described in this document. Note, the release name you choose will be used in the file name of the released *.zip files, will appear in the “About Small Body Mapping Tool” dialog box, and should be used to create tags in the git repositories. Careful thought and selection of a release name is recommended. Things to consider are: the git branch it was created from, the date it was created, and a version number to distinguish multiple releases created on the same date from each other. For example, if your release name is “sbmt-2017.02.17”, then type: * `make release RELEASE=sbmt-2017.02.17` 7. From the `/project/sbmtpipeline/sbmt` directory, deploy the release *.zip files and the static website files to the live `/disks/d0180/htdocs-sbmt` folder by typing `make deploy` and providing the same release name you used to create the release files. * `make deploy RELEASE=sbmt-2017.02.17` 8. Create tags in both `saavtk` and `sbmt` git repositories to identify the release. Perform the following steps in both the `/project/sbmtpipeline/saavtk` and `/project/sbmtpipeline/sbmt` directories. * `git tag –a [fill in release name]` * (vi editor opens) * Press `i` to go into insert mode * Enter the commit message `“tagging release [fill in release name]”` * Press `ESC` to exit insert mode * Type `:wq` to write and quit the vi editor * `git push –-follow-tags`