Open samreid opened 3 years ago
Here is a patch we considered that asserts that if the branch is provided, it must be master--how does this look to you?
I think this is fine for now, and the patch looks good to me. In the future, we may want to support more flexibility in terms of which branch we use, but for now only master is supported.
We aren't sure what this function is used for, do you think it should be changed?
The grunt function triggers a build-server procedure that redeploys all images for all sims from master to the phet brand production releases, for when we make an image configuration change that should affect all sims in production but not trigger a maintenance release. We should probably remove the branch and brands options.
@samreid @zepumph - anything else to do here?
EDIT: removed accidental tag of CM
Should it be an error to call deployImages
without options.branch
? When would we want to run the last half of deployImages
without preparing the working copy? Also, the call site doesn't mention that "branch" is an option:
/**
* taskQueue ensures that only one build/deploy process will be happening at the same time. The main build/deploy logic is here.
*
* @param {Object}
* @property {JSON} repos
* @property {String} api
* @property {String} locales - comma separated list of locale codes
* @property {String} simName - lower case simulation name used for creating files/directories
* @property {String} version - sim version identifier string
* @property {String} servers - deployment targets, subset of [ 'dev', 'production' ]
* @property {string[]} brands - deployment brands
* @property {String} email - used for sending notifications about success/failure
* @property {String} translatorId - rosetta user id for adding translators to the website
* @property {String} res - express response object
* @property {winston} winston - logger
*/
async function taskWorker( options ) {
if ( options.deployImages ) {
try {
await deployImages( options );
What about instead we just remove and notion of options.branch from this task, and hard code master? That is probably the clearest, and it will have the same behavior. With this let's add documentation that deployImages with checkout master, since it already doing that work anyways. Let's just document it and clean up a bit.
That sounds reasonable to me, but I would recommend @mattpen take the lead or confirm, thanks!
Discovered in https://github.com/phetsims/perennial/issues/240, @zepumph and I saw this code in deployImages:
Note that we check out
options.branch
for chipper and perennial-alias. However, immediately afterwards inprocessSim
we run :Therefore, it seems we may want to assert that
options.branch
is master when runningdeployImages
. @mattpen does that sound right to you? Or if we do needoptions.branch
, then how does that relate to checking out master of all repos immediately afterwards?Here is a patch we considered that asserts that if the branch is provided, it must be master--how does this look to you? Or can
options.branch
be deleted altogether?We also saw this command line interface:
But note that it tries to check out the same branch name on chipper and perennial-alias at the moment. We aren't sure what this function is used for, do you think it should be changed?