Pushing Static Docs (htdocs): Difference between revisions

From Genecats
Jump to navigationJump to search
(Creating new page for pushing static pages)
 
No edit summary
 
Line 1: Line 1:
This page provides an overview of the process to push a static doc from dev to the RR.
This page provides an overview of the process to push a static doc from dev to the RR.


=Preparation - Dev + Beta=
==Preparation - Dev + Beta==


Make the edits to the page you would like to change. This will typically be in htdocs:
Make the edits to the page you would like to change. This will typically be in htdocs:
Line 19: Line 19:
Next run a '''make beta''' again from htdocs or htdocsExtras and review the change again: http://hgwbeta.soe.ucsc.edu/
Next run a '''make beta''' again from htdocs or htdocsExtras and review the change again: http://hgwbeta.soe.ucsc.edu/


=Pushing file from beta to live servers=
==Pushing file from beta to live servers==


Now that changes are committed and staged on beta, static files can be pushed using the '''htdocsPush''' script. Note that this script must be run as super user (sudo).
Now that changes are committed and staged on beta, static files can be pushed using the '''htdocsPush''' script. Note that this script must be run as super user (sudo).
Line 62: Line 62:
The last step is to make sure the changes look as expected on the RR: http://genome.ucsc.edu/
The last step is to make sure the changes look as expected on the RR: http://genome.ucsc.edu/


=Notes about htdocsPush script=
==Notes about htdocsPush script==


* Wildcards are '''not supported'''
* Wildcards are '''not supported'''
Line 70: Line 70:
* An archive of previous static doc push requests (for checking file paths, etc.) can still be found on the google group: https://groups.google.com/a/soe.ucsc.edu/forum/#!forum/push-request
* An archive of previous static doc push requests (for checking file paths, etc.) can still be found on the google group: https://groups.google.com/a/soe.ucsc.edu/forum/#!forum/push-request


=Reverting a static page change that has been committed=
==Reverting a static page change that has been committed==


If a static page has been edited/committed and those changes need to be undone, see the following git page for an overview of the process: http://genomewiki.ucsc.edu/genecats/index.php/Revert_Git_Change
If a static page has been edited/committed and those changes need to be undone, see the following git page for an overview of the process: http://genomewiki.ucsc.edu/genecats/index.php/Revert_Git_Change


The page can be reverted, then repushed.
The page can be reverted, then repushed.

Latest revision as of 22:04, 20 May 2021

This page provides an overview of the process to push a static doc from dev to the RR.

Preparation - Dev + Beta

Make the edits to the page you would like to change. This will typically be in htdocs:

~/kent/src/hg/htdocs

Or less typically htdocsExtras:

~/htdocsExtras

Once the edit is made, make or make alpha from htdocs or htdocsExtras and check in sandbox or dev (https://hgwdev.gi.ucsc.edu/). If everything looks like it should, the git add, commit, and push the file(s) (http://genomewiki.ucsc.edu/index.php/Getting_Started_With_Git)/

Next run a make beta again from htdocs or htdocsExtras and review the change again: http://hgwbeta.soe.ucsc.edu/

Pushing file from beta to live servers

Now that changes are committed and staged on beta, static files can be pushed using the htdocsPush script. Note that this script must be run as super user (sudo).

$ sudo htdocsPush -h
Usage: htdocsPush [-chiqvy] 

  -c | --check    : Don't do the push, just say what would be pushed.
  -h | --help     : Print this message.
  -i              : Interactive mode. Ask me before doing any command.
  -q | --quiet    : Quiet mode. Don't print anything unless necessary.
  -v | --verbose  : Increase verbosity.
  -y | --noprompt : Just do it, don't ask me.

First invoke the script:

$ sudo htdocsPush

Enter the files to push to, one per line.  End with a '.'

### BEGIN FILE LIST ###

Then enter the full apache file paths for the pages you would like to push, followed by a period. For example:

$ sudo htdocsPush

Enter the files to push to, one per line.  End with a '.'

### BEGIN FILE LIST ###
/usr/local/apache/htdocs/goldenPath/newsarch.html
/usr/local/apache/htdocs/indexNews.html
.

This will push the indexNews page (http://genome.ucsc.edu/index.html) and news archive (http://genome.ucsc.edu/goldenPath/newsarch.html) pages to RR/Euro/Asia. Note that the script can also be run with the -c flag in order to test your file paths and ensure there are no errors.

The last step is to make sure the changes look as expected on the RR: http://genome.ucsc.edu/

Notes about htdocsPush script

  • Wildcards are not supported
  • Every push creates an entry in the log file on dev: /var/log/htdocsPush.log
  • Some htdocs directories are blocked which we typically do not push (htdocs/js, htdocs/style) - these go out with the build
  • This is only for htdocs/htdocsExtras, so push requests are still needed for tables, gbdb, downloads, etc.
  • An archive of previous static doc push requests (for checking file paths, etc.) can still be found on the google group: https://groups.google.com/a/soe.ucsc.edu/forum/#!forum/push-request

Reverting a static page change that has been committed

If a static page has been edited/committed and those changes need to be undone, see the following git page for an overview of the process: http://genomewiki.ucsc.edu/genecats/index.php/Revert_Git_Change

The page can be reverted, then repushed.