This site is a Confluence Cloud site. It was migrated from the former Plugin Studio site (Migration from Plugin Studio). In migration and restructuring scenarios, it is easy to have lots of broken links and missing images. Also, many administrators know that pages that look ok to administrators may have serious problems for anonymous or other users that do not have the same authority. Links to restricted pages or images associated with restricted pages and spaces are not available to be used on open pages. The following is a way to test that the site does not show invalid (internal) links or UNKNOWN images. Unknown images result is something that looks like: .
- Verify you have the GINT Installation and Dependencies covered.
- Verify you have Atlassian Command Line Interface (CLI) or Confluence Command Line Interface (CLI) installed.
- Set up a CLI command to run against your site with minimal authority. anonymous is best if you have an open site, but you will need a specific user for Cloud sites as Atlassian restricts anonymous remote access.
- Run the test. You may want to do your initial test against a small test space. Modify the script as indicated to put in a specific space key.
Schedule to run regularly with Bamboo
Use the gint task from Groovy Tasks for Bamboo to fully automate the test. This site is automatically tested daily and the build can be run manually if there are lots of page changes that need to be verified. The automated build takes about 30+ minutes running against 2000+ pages. In addition, we automatically upload the error list (unknownErrors.csv) to this site using Confluence CLI task from Run CLI Actions in Bamboo. The page uses the CSV Macro to show any errors including linking to the page with the problem. This gives easy access to page authors.
I prefer to customize the atlassian.sh (or atlassian.bat for Windows) to make it easier to run CLI commands against a wide variety of remote systems or for using different logins. For this test:
And then use:
Or you can just use similar directly on the command line: