(→Consolidate Reports of Dependency Projects & Publish Them in Parent Project Report)
|
(→Add Random Test Results to a BuildLife)
|
Line 371: | |||
} </pre> | } </pre> | ||
- | = Add Random Test Results to a BuildLife = | ||
- | Script Notes: | ||
- | * Treat this mostly as a snippet for doing something more interesting with. | ||
- | ==== AHPSCRIPTS-1 ==== | ||
- | <pre>import com.urbancode.anthill3.domain.project.*; | ||
- | import com.urbancode.anthill3.domain.authentication.*; | ||
- | import com.urbancode.anthill3.domain.security.*; | ||
- | import com.urbancode.anthill3.domain.singleton.security.*; | ||
- | // Lookup Your roles | ||
- | buildRole = RoleFactory.getInstance().restoreForName("Build Master"); | ||
- | userRole = RoleFactory.getInstance().restoreForName("User"); | ||
- | // Look-up the LDAP realm here | ||
- | // This is a lookup by name, so insert the name of your LDAP realm. | ||
- | realm = AuthenticationRealmFactory.getInstance().restore("LDAP"); | ||
- | // Do this for each user: | ||
- | User user1 = new User(true, realm); | ||
- | user1.setName("JaneDoe"); | ||
- | user1.setPassword("Bogus"); | ||
- | user1.addRole(userRole); | ||
- | user1.addRole(buildRole); | ||
- | user1.store();</pre> | ||
= Export Project Configuration to XML = | = Export Project Configuration to XML = |