rudimusmaximus / DevFlow

A Dev Flow for Google Appscript
52 stars 11 forks source link

Modify DevFlow to account for multiple release candidate scripts #56

Open rudimusmaximus opened 6 years ago

rudimusmaximus commented 6 years ago

objective / purpose
we need to check our overall process as we designed for one registered script to publish to a domain; let's expand to allow for publishing to groups, unlisted links, domains, and market. Establish guidelines, see discussions. Dedicated scripts for each, but review and document.

completion checklist

POST LIVE:

full pipeline documentation


Overview - describe with history and related items

see working notes Registered scripts (IDs by type), make test ready (current stated domain)

Solution Design

Create new enums:

Modify logic here to account for new enums for registered scripts (additional or logic)
see Add-on/Con-stants-structs-tainers.gs

/**
 *  Returns the requested hardcoded literal as a string when logic is required
 * to determine. otherwise, use appropriate Enums.
 *
 * @param  {string} requestedField - field name of hard coded value for curent version of CF Maker
 * @return {string} responseString - the value associated with the requested field name.
 */
function getLiteral(requestedField) {
  var response = "";
  switch (requestedField) {
    case "currentStatedDomainCode":
        //STATED DOMAINS are unique to the domain the script is deployed from (assumed same id when published via developer dashboard)
        // if not set at deployment, undregistered scripts will be treated as a disposable alhpa, meaning the script is a test copy and not a script file that gets pushed to a production domain (ie published to the store)
        var scriptId = ScriptApp.getScriptId();
        if (scriptId === RCM$.ThisAddon.Enums.RCC_REGISTERED_SCRIPT_ID) {
            response = RCM$.ThisAddon.Enums.REDCROWCONSULTING_STATED_DOMAIN_CODE;
            break;
        } else if (scriptId === RCM$.ThisAddon.Enums.RCM_REGISTERED_SCRIPT_ID) {
            response = RCM$.ThisAddon.Enums.REDCROWMETHODS_STATED_DOMAIN_CODE;
            break;
        };
        response = RCM$.ThisAddon.Enums.DISPOSABLE_ALPHA_STATED_DOMAIN_CODE; //is unrecognized and likely a "disposable alpha script which could be in any domain and if so the user email will be a developer and give it away; note: this value is checked in go listing so change with care
        break;
    default:
        response = "Requested field not defined among literals.";
        break;
  } //end switch
  return response;
} //end getLiteral

What's New Entry

Solution Implementation Notes

Completed for two domains as follows and will test to LNK from RCM domain in phase II project.

screen shot 2018-09-05 at 11 20 39 am

Developer Testing- Disposable Alpha and Release Candidate

For existing registered scripts, From @RCM

Scenario Results Comments
1. unregistered newly created, standalone script created script and sheets target named
DevFlow TC - 0.5.4-registeredScripts.3 - Wed Sep 05 2018 12:36:11 GMT-0500 (CDT)
able to test, no issues, found edge case [^1]
2. registered MKT a. with long semVer renamed script and created identical target sheet
DevFlow RC - 0.5.4-registeredScripts.3 - Wed Sep 05 2018 12:43:36 GMT-0500 (CDT)
b. with short semVer, reanamed script with no target sheet as expected (see notes)
a. able to test, no issues
b. no target to test and not yet published, no issues [^2]
3. registered LNK a. with long semVer
b. with short semVer
a. able to test, no issues
b. able to test, no issues

Notes

[^1]: Potential issue or training note. When pulling into new script and semVer is short, the make test ready will stop as follows: [18-09-05 13:06:16:664 CDT] Starting analytics... [18-09-05 13:06:16:665 CDT] Setting 'GoNoGo Status' to 'N'... [18-09-05 13:06:16:724 CDT] Checking if already goListed... [18-09-05 13:06:17:395 CDT] Not listed. Creating new goListRcd... [18-09-05 13:06:17:401 CDT] Creating standard name... [18-09-05 13:06:17:402 CDT] Renaming script to: 'Unexpected goListStatus in renaming. Investigate.'... [18-09-05 13:06:18:504 CDT] Writing goListRcd... [18-09-05 13:06:18:745 CDT] Priming script properties... [18-09-05 13:06:18:822 CDT] Creating matching target Sheet for testing...

[18-09-05 13:06:19:561 CDT] Sheet is at https://docs.google.com/a/redcrowconsulting.com/spreadsheets/d/1hKLgQHLoSvKcUGYBbcVJEcigwIuI_MbdAFUniEjVRYM/edit [18-09-05 13:06:19:562 CDT] Completing successfully. [18-09-05 13:06:19:562 CDT] Tracking analytics... [18-09-05 13:06:20:187 CDT] STATUS: Renamed script, created goListRcd, file link https://script.google.com/a/redcrowconsulting.com/d/1pvIALzhxpkzV1MlgNX4Q1qtIBDD9LD4fh0HfXWnYwNcsjFLlYIIFH3WP/edit?usp=drivesdk SHEETS: 0 hidden, 0 deleted, 0 created, 0 made visible

Naming your script 'Unexpected goListStatus in renaming. Investigate.'

From @RCC

Scenario Results Comments
1. unregistered newly created, standalone script pass pass
2. registered MKT pass pass
3. registered LNK n/a n/a

Table results make test ready

Live Testing - Beta live to a controlled audience

Customer Experience - Re-open and append if issues for customers

rudimusmaximus commented 6 years ago

regarding error on 3, does work as intended as you should not make test ready a non registered script with a short semVer! review in write up. ok to move forward

rudimusmaximus commented 6 years ago

check notes and footnotes

rudimusmaximus commented 5 years ago

Review for effect of CWS to GSM migration. Also consider amending RC in rename to indicate which RC like RC.MKT etc

rudimusmaximus commented 5 years ago

@RedCrowMethods.com Manual Script properties: https://script.google.com/a/redcrowmethods.com/d/1h5JNPZUx9qn1fwTIdgAvCWjWqm2LkPHqkvYxDgT7aKpHE697VbWnXHM-/edit Name currently set to DevFlow but was "DevFlow Demos for Add-on Makers" when published to unlisted link. ISSUE: compare LNK to MKT and resolve name and name in installed version...confirm which file published listing. appears LNK is correct and confirmed by opening script tied to executions running from the live link. the script was renamed to DevFlow (TODO: review renaming and file property notes.