| name | guidewire-deploy-integration |
| description | Deploy Guidewire InsuranceSuite integrations to Guidewire Cloud Platform.
Use when deploying configuration packages, managing releases,
or implementing blue-green deployments.
Trigger with phrases like "deploy guidewire", "guidewire cloud deployment",
"release management", "configuration deployment", "guidewire promotion".
|
| allowed-tools | Read, Write, Edit, Bash(curl:*), Bash(gradle:*), Grep |
| version | 1.0.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
Guidewire Deploy Integration
Overview
Deploy Guidewire InsuranceSuite configurations and integrations to Guidewire Cloud Platform using proper release management practices.
Prerequisites
- Guidewire Cloud Console access
- Service account with deployment permissions
- Configuration package built and tested
- Approval for target environment
Deployment Architecture
+------------------+ +------------------+ +------------------+
| | | | | |
| Development |----->| Sandbox |----->| Production |
| Environment | | Environment | | Environment |
| | | | | |
+------------------+ +------------------+ +------------------+
| | |
v v v
Build Package Deploy & Test Deploy & Verify
Run Unit Tests Integration Tests Production Tests
Code Review UAT Approval Go-Live Approval
Instructions
Step 1: Prepare Configuration Package
// build.gradle - Configuration package creation
tasks.register('createConfigPackage', Zip) {
description = 'Creates configuration package for Guidewire Cloud deployment'
group = 'deployment'
archiveFileName = "config-${project.version}-${new Date().format('yyyyMMddHHmmss')}.zip"
destinationDirectory = file("$buildDir/packages")
from('modules/configuration') {
include 'gsrc/**'
include 'config/**'
exclude '**/*.swp'
exclude '**/test/**'
}
from('modules/integration') {
include 'gsrc/**'
exclude '**/*Test.gs'
}
// Include metadata
from('.') {
include 'version.properties'
include 'deployment-manifest.json'
}
}
tasks.register('validatePackage') {
description = 'Validates configuration package before deployment'
dependsOn 'createConfigPackage'
doLast {
def packageFile = file("$buildDir/packages").listFiles().find { it.name.endsWith('.zip') }
// Validate package size
def sizeMB = packageFile.length() / (1024 * 1024)
if (sizeMB > 100) {
throw new GradleException("Package too large: ${sizeMB}MB (max 100MB)")
}
// Validate required files
def zipFile = new java.util.zip.ZipFile(packageFile)
def requiredFiles = ['deployment-manifest.json', 'version.properties']
requiredFiles.each { required ->
if (!zipFile.entries().any { it.name == required }) {
throw new GradleException("Missing required file: ${required}")
}
}
zipFile.close()
println "Package validation passed: ${packageFile.name} (${sizeMB}MB)"
}
}
Step 2: Deployment Manifest
{
"manifestVersion": "2.0",
"packageInfo": {
"name": "policycenter-custom-config",
"version": "1.5.0",
"description": "Custom PolicyCenter configuration with integration extensions",
"buildNumber": "${BUILD_NUMBER}",
"buildTimestamp": "${BUILD_TIMESTAMP}"
},
"targetApplications": [
{
"application": "PolicyCenter",
"minimumVersion": "202503",
"maximumVersion": "202507"
}
],
"components": [
{
"type": "gosu",
Step 3: Deployment API Client
interface DeploymentStatus {
id: string;
status: 'PENDING' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED' | 'ROLLED_BACK';
startTime: string;
endTime?: string;
progress: number;
message?: string;
logs?: string[];
}
interface DeploymentRequest {
environment: string;
packagePath: string;
rollbackOnFailure: boolean;
validationMode?: 'STRICT' | 'LENIENT';
}
class GuidewireDeploymentClient {
private baseUrl: string;
private tokenManager: TokenManager;
constructor(baseUrl: string, tokenManager: TokenManager) {
this.baseUrl = baseUrl;
this.tokenManager = tokenManager;
}
async deploy(: ): <> {
token = ..();
packageBuffer = fs.(request.);
uploadResponse = (, {
: ,
: {
: ,
: ,
: request.,
: (request.),
: request. ||
},
: packageBuffer
});
(!uploadResponse.) {
error = uploadResponse.();
();
}
result = uploadResponse.();
result.;
}
(: ): <> {
token = ..();
response = (
,
{
: { : }
}
);
response.();
}
(
: ,
: = ,
: =
): <> {
startTime = .();
(.() - startTime < timeoutMs) {
status = .(deploymentId);
.();
(status. === ) {
status;
}
(status. === || status. === ) {
();
}
(pollIntervalMs);
}
();
}
(: ): <> {
token = ..();
response = (
,
{
: ,
: { : }
}
);
(!response.) {
();
}
}
}
Step 4: Blue-Green Deployment
interface EnvironmentSlot {
name: 'blue' | 'green';
status: 'active' | 'standby';
version: string;
healthUrl: string;
}
class BlueGreenDeployment {
private deploymentClient: GuidewireDeploymentClient;
private loadBalancer: LoadBalancerClient;
async deploy(packagePath: string): Promise<void> {
const slots = await this.getSlotStatus();
const activeSlot = slots.find(s => s.status === 'active')!;
const standbySlot = slots.find(s => s.status === 'standby')!;
console.log(`Current active: ${activeSlot.name} (${activeSlot.version})`);
console.log();
deploymentId = ..({
: standbySlot.,
packagePath,
:
});
..(deploymentId);
healthy = .(standbySlot.);
(!healthy) {
();
}
smokeTestsPassed = .(standbySlot.);
(!smokeTestsPassed) {
();
}
.();
..(standbySlot.);
newActive = .();
(newActive !== standbySlot.) {
();
}
.();
}
(): <> {
slots = .();
standbySlot = slots.( s. === )!;
.();
..(standbySlot.);
.();
}
(: ): <> {
( i = ; i < ; i++) {
{
response = (healthUrl);
health = response.();
(health. === ) {
;
}
} (error) {
.();
}
();
}
;
}
}
Step 5: Environment Promotion
interface PromotionRequest {
sourceEnvironment: string;
targetEnvironment: string;
packageId: string;
approver: string;
changeTicket: string;
}
class EnvironmentPromotion {
async promote(request: PromotionRequest): Promise<string> {
const validPaths = [
['dev', 'sandbox'],
['sandbox', 'staging'],
['staging', 'production']
];
const isValidPath = validPaths.some(
([from, to]) => from === request.sourceEnvironment && to === request.targetEnvironment
);
if (!isValidPath) {
throw new Error(`Invalid promotion path: ${request.sourceEnvironment} -> ${request.targetEnvironment}`);
}
const sourcePackage = await this.getPackage(request., request.);
(!sourcePackage) {
();
}
.(request);
promotionId = .(request);
deploymentId = ..({
: request.,
: sourcePackage.,
:
});
..(deploymentId);
.(promotionId, );
promotionId;
}
(: ): <> {
(request. === ) {
approval = .(request.);
(!approval.) {
();
}
}
activeDeployments = .(request.);
(activeDeployments. > ) {
();
}
(request. === ) {
inWindow = .();
(!inWindow) {
();
}
}
}
}
Step 6: Deployment Verification
// Post-deployment verification tests
package gw.deployment.verify
uses gw.api.util.Logger
uses gw.api.database.Query
class DeploymentVerification {
private static final var LOG = Logger.forCategory("DeploymentVerification")
static function runVerification() : VerificationResult {
var result = new VerificationResult()
// Check database connectivity
result.addCheck("Database", verifyDatabaseConnection())
// Check product model loaded
result.addCheck("ProductModel", verifyProductModel())
// Check integrations configured
result.addCheck("Integrations", verifyIntegrations())
// Check custom Gosu classes loaded
result.addCheck("CustomCode", verifyCustomCode())
return result
}
private static function verifyDatabaseConnection() : boolean {
try {
var count = Query.make(Account).select().Count
LOG.info("Database check passed: ${count} accounts found")
return true
} catch (e : Exception) {
LOG.error("Database check failed", e)
return false
}
}
private static function verifyProductModel() : boolean {
try {
var products = gw.api.productmodel.ProductLookup.getAll()
LOG.info("Product model check passed: ${products.Count} products loaded")
return products.Count > 0
} catch (e : Exception) {
LOG.error("Product model check failed", e)
return false
}
}
private static function verifyIntegrations() : boolean {
try {
// Verify integration endpoints are configured
var endpoints = IntegrationConfig.getAllEndpoints()
LOG.info("Integration check passed: ${endpoints.Count} endpoints configured")
return true
} catch (e : Exception) {
LOG.error("Integration check failed", e)
return false
}
}
private static function verifyCustomCode() : boolean {
try {
// Try to instantiate custom classes
var instance = new gw.custom.MyCustomClass()
LOG.info("Custom code check passed")
return true
} catch (e : Exception) {
LOG.error("Custom code check failed", e)
return false
}
}
}
Output
- Configuration package created and validated
- Deployment manifest with dependencies
- Blue-green deployment capability
- Environment promotion workflow
- Post-deployment verification
Error Handling
| Error | Cause | Solution |
|---|
| Package validation failed | Missing required files | Check manifest and include all files |
| Deployment timeout | Large package or slow network | Increase timeout, optimize package |
| Health check failed | Application errors | Check logs, fix issues, redeploy |
| Rollback failed | State inconsistency | Manual intervention required |
Resources
Next Steps
For webhook and event handling, see guidewire-webhooks-events.