-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How sn-cicd handle data migration #3
Comments
Good point. So all deployment related objects must be part of the updateset. The 'Create Application File from Record' OOB feature can help to attach such records to an updateset. It actually creates an XML dump of the record into a sys_metadata_link record. Alternatively the below script can be used to manually add any kind of files to an update-set. function addToUpdateSet(usSysId, className, sysId) {
// check if us exists
var us = new GlideRecord('sys_update_set');
if (us.get(usSysId)) {
// 'Make This My Current Set'
new GlideUpdateSet().set(usSysId);
} else {
throw Error('Updateset not found' + usSysId);
}
var gr = new GlideRecord(className);
if (gr.get(sysId)) {
// add record to update-set
new GlideUpdateManager2().saveRecord(gr);
gs.info("done");
} else {
gs.info("record not found: " + className + ':' + sysId);
}
} There is also the option to create an UI action with the above script to allwo to collect records to US from the UI. If a deployment requires some script to be executed post go-live, there is also an option to create a scheduler (sysauto_script) with all scripts. After a successful run, the scheduler can disabling (or even delete) itself. |
Thanks @bmoers , will try it. close it now. |
Update set with 'group' data records committed successfully, but the data record can't be see from system groups: Source and Target servers: Steps to produce:
Any thing wrong with the target server committed the updateset ? |
More tests: using the same updateset generated from above steps
Any difference between SN-CICD |
sn-cicd-integration: Turn out this code working:
The following one can't handle the data record of the update set
@bmoers , Can you please confirm my finding? |
Seems the HierarchyUpdateSetCommitAjax does not work for forced records. The 'commitRemoteUpdateSet' only works for non-hierarchical update-sets. So it requires a check first to run either or. Let me check. |
I was not able to reproduce the issue. Attached the one I have used. |
The simple updateset just with a |
Deployed a fix in bmoers/sn-cicd-integration@7d3d70c |
Great, close this. 👍 |
When we migrate updateset from dev instance to test instance,
some updateset requires additional data or configuration changes.
How will SN-CICD handle it? or any good practice for that case?
The text was updated successfully, but these errors were encountered: