CloudFormationManager.prototype.hasChangeSetCreationCompleted = function()

in pipeline/local_modules/cloudformation/cloudformation_manager.js [145:161]


CloudFormationManager.prototype.hasChangeSetCreationCompleted = function (stackName, changeSetName) {
    var self = this;
    return self.getChangeSetStatus(stackName, changeSetName)
        .then(function (result) {
            console.log("ChangeSet information: [changeSet: " + changeSetName + ", stack: " + stackName + ", info: " + JSON.stringify(result) + "]");
            if (result.status === CHANGE_SET_DOES_NOT_EXIST) {
                throw new Error("Cannot find changeSet: " + changeSetName + " for stack: " + stackName);
            }
            if (result.status == 'CREATE_IN_PROGRESS') {
                return false;
            }
            if (result.status == 'CREATE_COMPLETE') {
                return true;
            }
            throw new Error("Unexpected stack creation status: " + result.status + " for changeSet: " + changeSetName + " for stack: " + stackName);
        });
}