This article explains how super administrators and Script Administrators move many libraries to a new version of a shared custom script at once, and how to roll a deployment back. Use it, for example, after you fix a bug in a script used by many libraries.
Note: A deployment only updates libraries that already use the script. To start using a shared script in a library, a library administrator selects it on a trigger. Learn more: Use a shared custom script in your library
Automatically generated table of contents
Before you start: tag your libraries
Tags group libraries so you can find them quickly when you deploy a version – for example, all the libraries of one department.
- Tag names are up to 64 characters, and unique on your domain (upper and lower case are ignored).
- A library can have up to 5 tags.
- Removing a tag from a library doesn't delete the tag.
1. Open the AODocs tenant administration.
2. Open the domain Libraries list. The list shows the tags of each library.
3. Select one or more libraries.
4. Search for a tag, or create a new one, and apply it to all the selected libraries.
To remove a tag from a library, remove it in the same list. The tag itself isn't deleted.
On a script's Deployments page, the tags are shown next to each library that uses the script, and you can filter the libraries by tag before you select them.
Note: Tags can't be renamed or deleted from the interface yet. Library tags aren't the same as library labels, which organize the libraries on the AODocs homepage.
Deploy a version to several libraries
1. In the AODocs tenant administration, open Custom scripts.
2. Open the script, then click Deployments. The page lists every library that uses the script, with its tags and the versions it uses.
3. Find the libraries to update: search the list, or filter it by tag or by Version.
4. Select the libraries one by one, or select all the filtered libraries.
5. Click Deploy version to selected libraries.
6. Select the Version to deploy. The latest promoted version is selected by default. The dialog shows how many libraries will be updated.
7. Click Deploy.
The deployment runs in the background and can take some time on many libraries.
What a deployment changes
- Only promoted versions can be deployed. Drafts can't be deployed to several libraries.
- In each selected library, every trigger that uses the script moves to the deployed version. All the triggers of a library that use the script end up on the same version.
- Triggers that use a draft of the script are skipped and left unchanged.
- Libraries that don't use the script aren't affected: a deployment never adds the script to a new trigger.
- Triggers already on the deployed version are left unchanged. You can run the same deployment again safely.
- If the deployment fails in some libraries, it still completes in the others. The result shows which triggers were updated, unchanged, skipped or failed, so you can deploy again to the failed ones only.
To see the result of a deployment for each trigger, open it in the Deployment history tab of Custom scripts: see View the deployment history.
View the deployment history
Every deployment is recorded in the deployment history: what was deployed, when, by whom, and to which libraries, for all the shared scripts of your domain.
1. In the AODocs tenant administration, open Custom scripts.
2. Select the Deployment history tab.
3. To see the deployments of one script only, filter the list by script.
Note: Changes that library administrators make in their own library aren't recorded in the deployment history.
Roll back a deployment
If a deployment turns out to be wrong, you can put every trigger it changed back on the version it used just before.
1. In the Deployment history tab, find the deployment.
2. Click Restore on its row. The confirmation shows how many libraries will be affected.
3. Confirm.
Important: A rollback restores the version recorded before the deployment, whatever the trigger uses now. If a library administrator or a later deployment changed the trigger since, that change is overwritten.
- The rollback runs in the background.
- Triggers removed since the deployment are skipped. Skipped or failed triggers don't block the others.
- The rollback is recorded in the deployment history, so you can roll it back too.
Audit log
Each deployment and each rollback creates a single entry in the AODocs tenant audit log, with the user and the date. The details for each library are in the deployment history. Learn more: View and export the AODocs tenant audit log